Seyed Mojtaba Hosseini Zeidabadi
a9c7615fb5
feat: make the Theme type support Swift 6 ( #351 )
2024-10-15 14:41:31 +02:00
Seyed Mojtaba Hosseini Zeidabadi
2d85915f15
feat: expose minimum width for lists ( #353 )
...
* feat: add exposed api to set the relative frame of the list markers
* refactor: reuse the functions inside the computed properties
2024-10-15 09:53:41 +02:00
Seyed Mojtaba Hosseini Zeidabadi
98d57f09b4
Fix documentation typos ( #354 )
...
* fix: a typo spelling: InlineContentBuilder
* fix: a typo spelling: markdown
2024-10-15 09:49:51 +02:00
Guille Gonzalez
5f61335814
Replace embedded cmark-gfm by swift-cmark ( #348 )
2024-10-11 08:58:59 +02:00
Shai Mishali
55441810c0
Allow customizing soft break mode ( #342 )
...
* Allow customizing soft break mode
Resolved #341
* Attributed renderer
* Tests
* Update snapshots
2024-08-12 11:06:38 +02:00
Guille Gonzalez
9a8119b37e
Fix custom font dynamic size ( #330 )
...
* Calling `fixedSize` constructor for dynamic type
* Fix tests
---------
Co-authored-by: Mike Lewis <ml@anthropic.com >
2024-06-16 10:48:02 +02:00
gonzalezreal
9f6c50ff63
Run swift format
2024-06-16 08:29:38 +00:00
tonyfreeman
993982f257
Fix circular reference ( #328 )
2024-06-16 10:04:46 +02:00
Antonio Cabezuelo Vivo
723249a1ba
Fix bullets in visionOS ( #308 )
...
Label does not align the icon with the center of the first line like on iOS
Signed-off-by: Antonio Cabezuelo Vivo <antonio@tapsandswipes.com >
2024-04-15 09:55:40 +02:00
kirk
8f6affc895
fix macCatalyst build failure: re-order #if canImport(UIKit) ( #283 )
...
by placing `#if canImport(UIKit)` first, it means that building for
`#if targetEnvironment(macCatalyst)` doesn't fail attempting to use
and link in `AppKit` things (since `macCatalyst` apps can link both
`UIKit` and `AppKit`
2023-12-31 15:31:11 +01:00
Seyed Mojtaba Hosseini Zeidabadi
2443543701
Prefer checking module availability over the os check ( #268 )
...
* refactor: prefer checking module availability over the os check for `AssetImageProvider`
* refactor: prefer checking module availability over the os check for `Color+RGBA`
2023-10-11 10:20:55 +02:00
kirk
e7b49f00d2
Add FontWidth text style ( #266 )
2023-10-10 09:26:43 +02:00
Tomas Srna
559dd00a4d
Add MarkdownContent HTML rendering ( #253 )
2023-09-10 08:29:11 +02:00
Guille Gonzalez
595a488b68
Adopt the NetworkImage package for image loading ( #258 )
2023-09-09 19:57:23 +02:00
Armin Shalchian
e599f4ccd5
visionOS support (new method) ( #252 )
...
* Changed UIKit OS checks for global use (visionOS)
* Added visionOS to package.swift
* Removed visionOS version in Package.swift
2023-09-03 15:43:27 +02:00
Guille Gonzalez
a20063b7b5
Fix code block truncation ( #256 )
...
* Fix unexpected code block truncation
* Remove unused code
* Update SnapshotTesting package
2023-09-03 12:34:47 +02:00
Guille Gonzalez
dba08f8641
Apply the current text style foreground color to code blocks ( #228 )
2023-04-27 10:10:44 +02:00
Guille Gonzalez
ffb2d80d37
Move fixedSize modifier to themes ( #222 )
2023-04-15 12:37:38 +02:00
Guille Gonzalez
3830c4c77b
Render HTML line breaks ( #221 )
2023-04-15 10:46:33 +02:00
Guille Gonzalez
c51f1a1b11
Add Markdown content to block configuration ( #220 )
...
* Add methods to access child content and render plain text
* Add the Markdown content to the block configuration
* Fix building with Swift 5.8
* Deprecate block-style methods with a label closure
* Fix deprecation warnings
* Update documentation
2023-04-11 11:47:39 +02:00
gonzalezreal
b12b137065
Run swift format
2023-04-08 06:49:57 +00:00
Guille Gonzalez
159f5a9dcc
Provide access to the language and the content of a code block from the body of the style. ( #215 )
...
* Provide access to the language and the content of a code block from the body of the style.
* Add deprecations
2023-04-08 08:42:45 +02:00
Guille Gonzalez
66dcceca0f
Fix deprecation message ( #214 )
2023-04-05 21:36:32 +02:00
Guille Gonzalez
71c424069f
Refactor Markdown parsing and implement the renderMarkdown() method. ( #210 )
2023-04-05 21:14:41 +02:00
Guille Gonzalez
5766bca162
Remove Markdown view @State property ( #197 )
...
* Remove state property from Markdown view
* Adopt task(id:priority:_:) in the default image view
2023-03-11 09:41:27 +01:00
Guille Gonzalez
d4d899384e
Render first level inline images ( #193 )
...
* Render inline images
* Update demo project with inline images
* Update documentation
2023-02-26 19:20:16 +01:00
Guille Gonzalez
39792adcf9
Fix the default image provider.
2023-02-04 15:49:11 +01:00
Guille Gonzalez
f1654efce0
Rename package
2023-01-22 17:53:16 +01:00
Guille Gonzalez
a9c8888539
Enable dark-mode-only and light-mode-only images ( #182 )
2023-01-22 16:57:06 +01:00
Guille Gonzalez
a538390f18
Documentation ( #178 )
...
* WIP
* WIP
* WIP
* Disambiguate size-related View methods
* Update demo
* WIP
* Rename `Size` to `RelativeSize`
* WIP
* WIP
* WIP
* WIP
Fix relative URLs and heading anchor navigation
* WIP
* WIP
2023-01-22 08:01:59 +01:00
Guille Gonzalez
c203e1e918
Fix relative URLs and heading anchor navigation
2023-01-19 21:47:23 +01:00
Guille Gonzalez
fa7fb79712
Fix ambiguity issue ( #181 )
2023-01-18 19:18:41 +01:00
Guille Gonzalez
5b480b4d7b
Disambiguate size-related View methods ( #180 )
...
* Disambiguate size-related View methods
* Update demo
2023-01-14 07:26:51 +01:00
Guille Gonzalez
2880bbc466
Rename BlockSpacing to BlockMargins ( #177 )
2022-12-30 19:13:45 +01:00
Guille Gonzalez
b704cbb48e
Improve theme API ( #176 )
...
* Text styles
* Heading styles
* More block styles
* List marker styles
* Table and thematic break styles
* Adopt refactored styles
* Code cleanup
* Update sample code
* Rename TextStyle protocol
* Update sample code
* Disable font properties test in tvOS
2022-12-30 18:03:04 +01:00
Guille Gonzalez
15eb3add92
Add ImageProvider API ( #175 )
...
* Add ImageProvider API
* Add images sample code
* Add image providers demo
2022-12-25 08:02:54 +01:00
Guille Gonzalez
2680e65051
Add support for code syntax highlighting through extensions ( #173 )
2022-12-23 07:55:15 +01:00
Guille Gonzalez
7487f40bf6
Add support for heading anchors ( #172 )
2022-12-23 07:31:48 +01:00
Guille Gonzalez
285f4fa027
Sample code ( #170 )
...
* Prevent some tests from running on iOS <16
* Add Swift Package Index manifest for documentation hosting
* Add a new demo project
* Add demo contents
* Remove commented code
* Set the GitHub theme as the default
2022-12-19 21:20:53 +01:00
Guille Gonzalez
5013266b4e
Add watchOS support ( #169 )
...
* Update basic theme code block style
* Add watchOS support
2022-12-16 17:25:22 +01:00
Guille Gonzalez
c91729dd98
Themes ( #168 )
...
* Add dynamic color extension
* Add a basic theme
* Add DocC theme
* Fix block spacing logic
* Update theme initializer
* Add DocC theme tests
* Add GitHub theme
2022-12-12 21:05:32 +01:00
Guille Gonzalez
0838208319
Organize source ( #167 )
2022-12-09 18:19:21 +01:00
Guille Gonzalez
49101f6861
Add FontStyle and Size ( #166 )
...
* Add FontStyle and Size
* Polish FontStyle public API
2022-12-09 17:24:38 +01:00
Guille Gonzalez
07656f4b22
Render tables ( #163 )
...
* Parse tables
* Render tables
* Fix markdown content table test availability
* Add table border style to theme
* Add image flow spacing to theme
* Add table rendering tests
* Tweak perceptual precision in the markdown table snapshot tests
2022-11-27 17:28:14 +01:00
Guille Gonzalez
f704ff78d5
Render HTML blocks as verbatim text ( #160 )
2022-11-07 09:22:35 +01:00
Guille Gonzalez
d61b362c3c
Render code blocks ( #158 )
...
* Parse code blocks
* Render code blocks
2022-11-04 19:02:20 +01:00
Guille Gonzalez
e5e36fca3a
Simpler block sequence ( #157 )
2022-11-04 17:20:41 +01:00
Guille Gonzalez
a5042d3d1d
Render thematic breaks ( #156 )
...
* Parse thematic breaks
* Render thematic breaks
2022-11-03 16:51:43 +01:00
Guille Gonzalez
73a42536cd
Space blocks by using the maximum between the top spacing of the block and the bottom spacing of its predecessor ( #155 )
2022-11-03 16:09:33 +01:00
Guille Gonzalez
90cfcbd256
Theme and styles refactoring ( #154 )
...
* Scale spacing preference relative to body
* Scale spacing before preference relative to body
* Make spacing and spacingBefore preferences optional
* Refactor image, blockquote, paragraph and heading styles into a single type
* Refactor list marker styles
* Remove TaskListItemStyle
* Refactor spaced sequence into its own view type
* Rename default block style and code inline style
* Refactor some block views into ApplyBlockStyle view
2022-11-01 21:13:02 +01:00