@diegopluna/narvi 0.0.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/README.md +116 -44
  2. package/dist/base.css +96 -0
  3. package/dist/color.d.ts +1 -1
  4. package/dist/color.js +1 -1
  5. package/dist/components/activity/ActivityContent.svelte +3 -15
  6. package/dist/components/activity/ActivityStep.svelte +12 -12
  7. package/dist/components/activity/ActivityThought.svelte +4 -4
  8. package/dist/components/activity/ActivityTrigger.svelte +5 -6
  9. package/dist/components/app-shell/AppShellBar.svelte +89 -0
  10. package/dist/components/app-shell/AppShellBar.svelte.d.ts +20 -0
  11. package/dist/components/app-shell/AppShellHeader.svelte +17 -17
  12. package/dist/components/app-shell/AppShellHeader.svelte.d.ts +2 -2
  13. package/dist/components/app-shell/AppShellMain.svelte +4 -20
  14. package/dist/components/app-shell/AppShellPanel.svelte +21 -19
  15. package/dist/components/app-shell/AppShellPanes.svelte +58 -0
  16. package/dist/components/app-shell/AppShellPanes.svelte.d.ts +11 -0
  17. package/dist/components/app-shell/AppShellRail.svelte +85 -0
  18. package/dist/components/app-shell/AppShellRail.svelte.d.ts +11 -0
  19. package/dist/components/app-shell/AppShellRoot.svelte +50 -24
  20. package/dist/components/app-shell/AppShellRoot.svelte.d.ts +8 -6
  21. package/dist/components/app-shell/AppShellSheet.svelte +95 -0
  22. package/dist/components/app-shell/AppShellSheet.svelte.d.ts +17 -0
  23. package/dist/components/app-shell/AppShellSidebar.svelte +41 -65
  24. package/dist/components/app-shell/AppShellSidebar.svelte.d.ts +1 -5
  25. package/dist/components/app-shell/AppShellToggle.svelte +62 -23
  26. package/dist/components/app-shell/AppShellToggle.svelte.d.ts +2 -0
  27. package/dist/components/app-shell/context.d.ts +6 -0
  28. package/dist/components/app-shell/index.d.ts +9 -1
  29. package/dist/components/app-shell/index.js +5 -1
  30. package/dist/components/approval/Approval.svelte +99 -23
  31. package/dist/components/approval/Approval.svelte.d.ts +7 -0
  32. package/dist/components/avatar/AvatarFallback.svelte +1 -2
  33. package/dist/components/avatar/AvatarRoot.svelte +2 -2
  34. package/dist/components/badge/Badge.svelte +5 -5
  35. package/dist/components/button/Button.svelte +227 -51
  36. package/dist/components/button/Button.svelte.d.ts +38 -2
  37. package/dist/components/card/Card.svelte +19 -33
  38. package/dist/components/change-stats/ChangeStats.svelte +1 -2
  39. package/dist/components/changes-summary/ChangesSummary.svelte +14 -15
  40. package/dist/components/checkbox/Checkbox.svelte +31 -25
  41. package/dist/components/checkbox/Checkbox.svelte.d.ts +5 -0
  42. package/dist/components/code/Code.svelte +1 -2
  43. package/dist/components/collapsible/CollapsibleContent.svelte +38 -0
  44. package/dist/components/collapsible/CollapsibleContent.svelte.d.ts +11 -0
  45. package/dist/components/collapsible/CollapsibleRoot.svelte +44 -0
  46. package/dist/components/collapsible/CollapsibleRoot.svelte.d.ts +11 -0
  47. package/dist/components/collapsible/CollapsibleTrigger.svelte +83 -0
  48. package/dist/components/collapsible/CollapsibleTrigger.svelte.d.ts +13 -0
  49. package/dist/components/collapsible/context.d.ts +5 -0
  50. package/dist/components/collapsible/context.js +11 -0
  51. package/dist/components/collapsible/index.d.ts +7 -0
  52. package/dist/components/collapsible/index.js +4 -0
  53. package/dist/components/command/CommandItem.svelte +1 -1
  54. package/dist/components/command/styles.d.ts +3 -2
  55. package/dist/components/command/styles.js +15 -12
  56. package/dist/components/composer/ComposerAttachButton.svelte +1 -1
  57. package/dist/components/composer/ComposerAttachment.svelte +13 -18
  58. package/dist/components/composer/ComposerModelPicker.svelte +24 -28
  59. package/dist/components/composer/ComposerRoot.svelte +15 -13
  60. package/dist/components/composer/ComposerSubmit.svelte +12 -20
  61. package/dist/components/composer/ComposerTextarea.svelte +1 -1
  62. package/dist/components/composer/ComposerToggle.svelte +16 -18
  63. package/dist/components/composer/ComposerTray.svelte +78 -0
  64. package/dist/components/composer/ComposerTray.svelte.d.ts +15 -0
  65. package/dist/components/composer/index.d.ts +3 -1
  66. package/dist/components/composer/index.js +3 -2
  67. package/dist/components/conversation/ConversationContent.svelte +3 -2
  68. package/dist/components/conversation/ConversationEmpty.svelte +1 -1
  69. package/dist/components/conversation/ConversationScrollButton.svelte +9 -11
  70. package/dist/components/dialog/ConfirmDialog.svelte +1 -1
  71. package/dist/components/dialog/DialogContent.svelte +5 -1
  72. package/dist/components/dialog/styles.d.ts +2 -26
  73. package/dist/components/dialog/styles.js +12 -49
  74. package/dist/components/divider/Divider.svelte +3 -3
  75. package/dist/components/empty-state/EmptyState.svelte +4 -5
  76. package/dist/components/field/Field.svelte +4 -4
  77. package/dist/components/frame/Frame.svelte +6 -7
  78. package/dist/components/frame/Frame.svelte.d.ts +1 -1
  79. package/dist/components/grid/Grid.svelte +111 -0
  80. package/dist/components/grid/Grid.svelte.d.ts +27 -0
  81. package/dist/components/heading/Heading.svelte +2 -2
  82. package/dist/components/hover-card/HoverCardContent.svelte +50 -0
  83. package/dist/components/hover-card/HoverCardContent.svelte.d.ts +10 -0
  84. package/dist/components/hover-card/HoverCardRoot.svelte +22 -0
  85. package/dist/components/hover-card/HoverCardRoot.svelte.d.ts +5 -0
  86. package/dist/components/hover-card/index.d.ts +7 -0
  87. package/dist/components/hover-card/index.js +7 -0
  88. package/dist/components/kbd/Kbd.svelte +12 -7
  89. package/dist/components/link/Link.svelte +9 -7
  90. package/dist/components/link/Link.svelte.d.ts +4 -1
  91. package/dist/components/markdown/Markdown.svelte +714 -0
  92. package/dist/components/markdown/Markdown.svelte.d.ts +80 -0
  93. package/dist/components/markdown/MarkdownBlock.svelte +231 -0
  94. package/dist/components/markdown/MarkdownBlock.svelte.d.ts +11 -0
  95. package/dist/components/markdown/MarkdownBlocks.svelte +115 -0
  96. package/dist/components/markdown/MarkdownBlocks.svelte.d.ts +15 -0
  97. package/dist/components/markdown/MarkdownCode.svelte +583 -0
  98. package/dist/components/markdown/MarkdownCode.svelte.d.ts +23 -0
  99. package/dist/components/markdown/MarkdownDiagram.svelte +310 -0
  100. package/dist/components/markdown/MarkdownDiagram.svelte.d.ts +6 -0
  101. package/dist/components/markdown/MarkdownFile.svelte +134 -0
  102. package/dist/components/markdown/MarkdownFile.svelte.d.ts +19 -0
  103. package/dist/components/markdown/MarkdownFootnotes.svelte +61 -0
  104. package/dist/components/markdown/MarkdownFootnotes.svelte.d.ts +8 -0
  105. package/dist/components/markdown/MarkdownFresh.svelte +69 -0
  106. package/dist/components/markdown/MarkdownFresh.svelte.d.ts +6 -0
  107. package/dist/components/markdown/MarkdownHtml.svelte +72 -0
  108. package/dist/components/markdown/MarkdownHtml.svelte.d.ts +7 -0
  109. package/dist/components/markdown/MarkdownImage.svelte +150 -0
  110. package/dist/components/markdown/MarkdownImage.svelte.d.ts +8 -0
  111. package/dist/components/markdown/MarkdownInlines.svelte +225 -0
  112. package/dist/components/markdown/MarkdownInlines.svelte.d.ts +7 -0
  113. package/dist/components/markdown/MarkdownLink.svelte +120 -0
  114. package/dist/components/markdown/MarkdownLink.svelte.d.ts +25 -0
  115. package/dist/components/markdown/MarkdownMath.svelte +138 -0
  116. package/dist/components/markdown/MarkdownMath.svelte.d.ts +7 -0
  117. package/dist/components/markdown/MarkdownTable.svelte +265 -0
  118. package/dist/components/markdown/MarkdownTable.svelte.d.ts +17 -0
  119. package/dist/components/markdown/caret.d.ts +14 -0
  120. package/dist/components/markdown/caret.js +67 -0
  121. package/dist/components/markdown/context.d.ts +93 -0
  122. package/dist/components/markdown/context.js +128 -0
  123. package/dist/components/markdown/copy.d.ts +13 -0
  124. package/dist/components/markdown/copy.js +74 -0
  125. package/dist/components/markdown/hidden.d.ts +12 -0
  126. package/dist/components/markdown/hidden.js +31 -0
  127. package/dist/components/markdown/kept.d.ts +32 -0
  128. package/dist/components/markdown/kept.js +71 -0
  129. package/dist/components/markdown/labels.d.ts +46 -0
  130. package/dist/components/markdown/labels.js +35 -0
  131. package/dist/components/markdown/save.d.ts +11 -0
  132. package/dist/components/markdown/save.js +58 -0
  133. package/dist/components/markdown/scrollable.d.ts +24 -0
  134. package/dist/components/markdown/scrollable.js +152 -0
  135. package/dist/components/markdown/static.d.ts +37 -0
  136. package/dist/components/markdown/static.js +233 -0
  137. package/dist/components/markdown/styles.d.ts +328 -0
  138. package/dist/components/markdown/styles.js +302 -0
  139. package/dist/components/menu/MenuRadioItem.svelte +3 -3
  140. package/dist/components/menu/index.d.ts +23 -0
  141. package/dist/components/menu/index.js +3 -1
  142. package/dist/components/message/MessageAction.svelte +24 -5
  143. package/dist/components/message/MessageAction.svelte.d.ts +9 -0
  144. package/dist/components/message/MessageActions.svelte +2 -3
  145. package/dist/components/message/MessageContent.svelte +2 -3
  146. package/dist/components/message/MessageCopy.svelte +66 -8
  147. package/dist/components/message/MessageCopy.svelte.d.ts +17 -1
  148. package/dist/components/message/MessageHeader.svelte +3 -3
  149. package/dist/components/message/MessagePending.svelte +1 -1
  150. package/dist/components/message/MessageRoot.svelte +3 -4
  151. package/dist/components/message/MessageTime.svelte +3 -4
  152. package/dist/components/notice/Notice.svelte +14 -10
  153. package/dist/components/plan/Plan.svelte +25 -21
  154. package/dist/components/progress/Progress.svelte +34 -38
  155. package/dist/components/questionnaire/Questionnaire.svelte +19 -22
  156. package/dist/components/queued-message/QueuedMessage.svelte +14 -7
  157. package/dist/components/rail/RailItem.svelte +43 -40
  158. package/dist/components/rail/RailItem.svelte.d.ts +3 -1
  159. package/dist/components/rail/RailRoot.svelte +18 -4
  160. package/dist/components/rail/RailRoot.svelte.d.ts +1 -1
  161. package/dist/components/rail/RailSeparator.svelte +17 -0
  162. package/dist/components/rail/RailSeparator.svelte.d.ts +18 -0
  163. package/dist/components/rail/index.d.ts +2 -1
  164. package/dist/components/rail/index.js +2 -1
  165. package/dist/components/reasoning/ReasoningContent.svelte +4 -8
  166. package/dist/components/reasoning/ReasoningTrigger.svelte +4 -5
  167. package/dist/components/resize-handle/ResizeHandle.svelte +4 -7
  168. package/dist/components/reveal/Reveal.svelte +89 -0
  169. package/dist/components/reveal/Reveal.svelte.d.ts +17 -0
  170. package/dist/components/reveal/revealed.d.ts +38 -0
  171. package/dist/components/reveal/revealed.js +79 -0
  172. package/dist/components/segmented/SegmentedControl.svelte +11 -16
  173. package/dist/components/select/Select.svelte +1 -1
  174. package/dist/components/separator/Separator.svelte +1 -1
  175. package/dist/components/settings-row/SettingsRow.svelte +5 -5
  176. package/dist/components/sheet/SheetContent.svelte +63 -0
  177. package/dist/components/sheet/SheetContent.svelte.d.ts +18 -0
  178. package/dist/components/sheet/index.d.ts +12 -0
  179. package/dist/components/sheet/index.js +12 -0
  180. package/dist/components/sheet/styles.d.ts +51 -0
  181. package/dist/components/sheet/styles.js +65 -0
  182. package/dist/components/shimmer/Shimmer.svelte +41 -26
  183. package/dist/components/sidebar/SidebarContent.svelte +1 -1
  184. package/dist/components/sidebar/SidebarFolder.svelte +142 -0
  185. package/dist/components/sidebar/SidebarFolder.svelte.d.ts +19 -0
  186. package/dist/components/sidebar/SidebarFooter.svelte +1 -1
  187. package/dist/components/sidebar/SidebarGroup.svelte +41 -35
  188. package/dist/components/sidebar/SidebarGroup.svelte.d.ts +3 -3
  189. package/dist/components/sidebar/SidebarHeader.svelte +12 -6
  190. package/dist/components/sidebar/SidebarHeader.svelte.d.ts +4 -1
  191. package/dist/components/sidebar/SidebarItem.svelte +34 -38
  192. package/dist/components/sidebar/SidebarRoot.svelte +62 -0
  193. package/dist/components/sidebar/SidebarRoot.svelte.d.ts +14 -0
  194. package/dist/components/sidebar/index.d.ts +5 -1
  195. package/dist/components/sidebar/index.js +3 -1
  196. package/dist/components/skeleton/Skeleton.svelte +26 -15
  197. package/dist/components/slider/Slider.svelte +200 -0
  198. package/dist/components/slider/Slider.svelte.d.ts +55 -0
  199. package/dist/components/spinner/Spinner.svelte +4 -11
  200. package/dist/components/stack/Stack.svelte +37 -44
  201. package/dist/components/stack/Stack.svelte.d.ts +12 -6
  202. package/dist/components/status-indicator/StatusIndicator.svelte +1 -1
  203. package/dist/components/suggestions/SuggestionsItem.svelte +11 -13
  204. package/dist/components/switch/Switch.svelte +16 -25
  205. package/dist/components/tab-strip/TabStrip.svelte +340 -0
  206. package/dist/components/tab-strip/TabStrip.svelte.d.ts +31 -0
  207. package/dist/components/tabs/Tabs.svelte +15 -14
  208. package/dist/components/tabs/Tabs.svelte.d.ts +4 -0
  209. package/dist/components/text/Text.svelte +64 -14
  210. package/dist/components/text/Text.svelte.d.ts +13 -3
  211. package/dist/components/toast/Toaster.svelte +12 -10
  212. package/dist/components/toggle/Toggle.svelte +40 -0
  213. package/dist/components/toggle/Toggle.svelte.d.ts +15 -0
  214. package/dist/components/toggle-group/ToggleGroupItem.svelte +37 -0
  215. package/dist/components/toggle-group/ToggleGroupItem.svelte.d.ts +12 -0
  216. package/dist/components/toggle-group/ToggleGroupRoot.svelte +95 -0
  217. package/dist/components/toggle-group/ToggleGroupRoot.svelte.d.ts +33 -0
  218. package/dist/components/toggle-group/context.d.ts +6 -0
  219. package/dist/components/toggle-group/context.js +11 -0
  220. package/dist/components/toggle-group/index.d.ts +5 -0
  221. package/dist/components/toggle-group/index.js +3 -0
  222. package/dist/components/tool/ToolContent.svelte +3 -8
  223. package/dist/components/tool/ToolSection.svelte +4 -5
  224. package/dist/components/tool/ToolTrigger.svelte +14 -15
  225. package/dist/components/tooltip/TooltipContent.svelte +9 -6
  226. package/dist/components/work-fold/WorkFold.svelte +17 -34
  227. package/dist/components/work-fold/WorkFold.svelte.d.ts +1 -1
  228. package/dist/index.d.ts +38 -10
  229. package/dist/index.js +38 -12
  230. package/dist/internal/Chevron.svelte +2 -3
  231. package/dist/internal/Code.svelte +3 -4
  232. package/dist/internal/Collapse.svelte +6 -5
  233. package/dist/internal/Collapse.svelte.d.ts +2 -1
  234. package/dist/internal/Glyph.svelte +16 -0
  235. package/dist/internal/Glyph.svelte.d.ts +6 -0
  236. package/dist/internal/Tile.svelte +17 -37
  237. package/dist/internal/control.d.ts +4 -4
  238. package/dist/internal/control.js +21 -18
  239. package/dist/internal/layer.d.ts +3 -5
  240. package/dist/internal/layer.js +14 -18
  241. package/dist/internal/layout.d.ts +13 -0
  242. package/dist/internal/layout.js +453 -0
  243. package/dist/internal/markers.stylex.d.ts +8 -0
  244. package/dist/internal/markers.stylex.js +4 -0
  245. package/dist/internal/plugin-order.d.ts +8 -0
  246. package/dist/internal/plugin-order.js +16 -0
  247. package/dist/internal/responsive.d.ts +45 -0
  248. package/dist/internal/responsive.js +42 -0
  249. package/dist/internal/roving.js +5 -2
  250. package/dist/internal/shared.d.ts +8 -1
  251. package/dist/internal/shared.js +21 -5
  252. package/dist/internal/sx.d.ts +31 -4
  253. package/dist/internal/sx.js +17 -0
  254. package/dist/internal/toggle.d.ts +73 -0
  255. package/dist/internal/toggle.js +83 -0
  256. package/dist/internal/visible.d.ts +32 -0
  257. package/dist/internal/visible.js +44 -0
  258. package/dist/markdown/ast.d.ts +209 -0
  259. package/dist/markdown/ast.js +10 -0
  260. package/dist/markdown/blocks.d.ts +177 -0
  261. package/dist/markdown/blocks.js +1489 -0
  262. package/dist/markdown/code-info.d.ts +10 -0
  263. package/dist/markdown/code-info.js +16 -0
  264. package/dist/markdown/common.d.ts +25 -0
  265. package/dist/markdown/common.js +107 -0
  266. package/dist/markdown/diagrams.d.ts +2 -0
  267. package/dist/markdown/diagrams.js +18 -0
  268. package/dist/markdown/file-paths.d.ts +29 -0
  269. package/dist/markdown/file-paths.js +80 -0
  270. package/dist/markdown/files.d.ts +16 -0
  271. package/dist/markdown/files.js +133 -0
  272. package/dist/markdown/highlight.d.ts +30 -0
  273. package/dist/markdown/highlight.js +127 -0
  274. package/dist/markdown/html.d.ts +23 -0
  275. package/dist/markdown/html.js +289 -0
  276. package/dist/markdown/images.d.ts +15 -0
  277. package/dist/markdown/images.js +45 -0
  278. package/dist/markdown/index.d.ts +12 -0
  279. package/dist/markdown/index.js +5 -0
  280. package/dist/markdown/inlines.d.ts +48 -0
  281. package/dist/markdown/inlines.js +1714 -0
  282. package/dist/markdown/math.d.ts +2 -0
  283. package/dist/markdown/math.js +22 -0
  284. package/dist/markdown/parse.d.ts +81 -0
  285. package/dist/markdown/parse.js +204 -0
  286. package/dist/markdown/plugin.d.ts +178 -0
  287. package/dist/markdown/plugin.js +160 -0
  288. package/dist/markdown/sanitize.d.ts +78 -0
  289. package/dist/markdown/sanitize.js +522 -0
  290. package/dist/markdown/share.d.ts +12 -0
  291. package/dist/markdown/share.js +59 -0
  292. package/dist/markdown/table.d.ts +13 -0
  293. package/dist/markdown/table.js +60 -0
  294. package/dist/media.stylex.d.ts +52 -0
  295. package/dist/media.stylex.js +53 -0
  296. package/dist/preset.d.ts +40 -16
  297. package/dist/preset.js +169 -51
  298. package/dist/tokens.stylex.d.ts +70 -37
  299. package/dist/tokens.stylex.js +127 -62
  300. package/dist/typography.d.ts +48 -0
  301. package/dist/typography.js +55 -0
  302. package/dist/vite.d.ts +9 -1
  303. package/dist/vite.js +37 -4
  304. package/package.json +58 -6
  305. package/skills/building-ui/SKILL.md +242 -0
  306. package/skills/building-ui/references/components.md +207 -0
  307. package/skills/markdown/SKILL.md +452 -0
  308. package/skills/markdown/references/plugins.md +103 -0
  309. package/skills/setup/SKILL.md +191 -0
  310. package/skills/styling/SKILL.md +269 -0
  311. package/skills/theming/SKILL.md +184 -0
  312. package/dist/internal/loop.d.ts +0 -35
  313. package/dist/internal/loop.js +0 -72
@@ -4,65 +4,85 @@ import * as stylex from '@stylexjs/stylex';
4
4
  * `color-scheme`. Set `color-scheme: light dark` on `:root` to follow the
5
5
  * system, or force a scheme on any subtree with the `Theme` component.
6
6
  *
7
- * The palette is stone and moonlight: near-black and warm paper for surfaces,
8
- * and one silver-blue ("ithildin") that is used only for state.
7
+ * The palette is a grey with a trace of blue in it, a dark grey by night and white on
8
+ * grey by day, and one blue, the accent, that is used only for state. A preset swaps the
9
+ * grey for a warm one or a pure one, and the blue for another hue or for none.
10
+ *
11
+ * A token is named for its job, family first: `bg…` an opaque background, `fill…` a
12
+ * translucent fill over any background, `border…`, `text…`, `accent…`, `primary…` (the
13
+ * primary button), a status and its `…Soft` and `…Text`, `code…` and `tone…`. `on…` is
14
+ * what is written on a solid. No name says what a colour looks like, so a theme can
15
+ * change every value and no name turns false.
9
16
  */
10
17
  export const colors = stylex.defineVars({
11
- // Surfaces, from the page upwards
12
- bg: 'light-dark(#f4f3ef, #06080c)',
13
- bgRaised: 'light-dark(#fbfaf8, #0b0e14)',
14
- surface: 'light-dark(rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.028))',
15
- surfaceRaised: 'light-dark(#ffffff, rgb(255 255 255 / 0.055))',
16
- hover: 'light-dark(rgb(20 23 28 / 0.05), rgb(255 255 255 / 0.07))',
17
- // A recess: inputs, tracks, code
18
- well: 'light-dark(rgb(20 23 28 / 0.035), rgb(0 0 0 / 0.34))',
19
- // Lines. `edge` is the boundary of a control and holds 3:1 against its surface.
20
- line: 'light-dark(rgb(20 23 28 / 0.1), rgb(255 255 255 / 0.075))',
21
- lineStrong: 'light-dark(rgb(20 23 28 / 0.2), rgb(255 255 255 / 0.15))',
22
- edge: 'light-dark(#868c97, #5f6775)',
23
- edgeHover: 'light-dark(#6b717c, #7a8392)',
24
- // Light catching a top edge, and the shade under and inside things
25
- highlight: 'light-dark(rgb(255 255 255 / 0.95), rgb(255 255 255 / 0.07))',
26
- shade: 'light-dark(rgb(20 23 28 / 0.08), rgb(0 0 0 / 0.5))',
27
- // Text
28
- text: 'light-dark(#14171c, #e9edf3)',
29
- textMuted: 'light-dark(#555b66, #98a1b0)',
30
- textSubtle: 'light-dark(#626873, #818a99)',
31
- // Ithildin: focus, selection, progress. Nothing else.
32
- ithil: 'light-dark(#34598c, #bfd6f4)',
33
- ithilStrong: 'light-dark(#4a73ab, #8fb6ea)',
34
- onIthil: 'light-dark(#ffffff, #07101d)',
35
- ithilSoft: 'light-dark(rgb(52 89 140 / 0.1), rgb(160 200 255 / 0.1))',
36
- focusRing: 'light-dark(#34598c, #bfd6f4)',
37
- focusHalo: 'light-dark(rgb(52 89 140 / 0.18), rgb(150 195 255 / 0.18))',
38
- // A faint glow around lit state. Dark scheme only; it is transparent in light.
39
- glow: 'light-dark(rgb(52 89 140 / 0), rgb(140 190 255 / 0.2))',
40
- // Mithril: the solid button, a small piece of bright metal
41
- mithrilTop: 'light-dark(#30353e, #fafbfc)',
42
- mithrilBottom: 'light-dark(#16191e, #c9d2dd)',
43
- onMithril: 'light-dark(#f4f6f9, #0a0d12)',
44
- mithrilEdge: 'light-dark(rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.9))',
45
- mithrilDrop: 'light-dark(rgb(20 23 28 / 0.28), rgb(150 190 255 / 0.22))',
46
- // Status
47
- success: 'light-dark(#2f7d55, #6fd3a0)',
48
- warning: 'light-dark(#a56a14, #e8b765)',
49
- danger: 'light-dark(#b3372e, #f08a80)',
18
+ // Backgrounds are opaque: the page, and what is raised over it (cards, popovers, a sheet)
19
+ bg: 'light-dark(#f3f4f5, #151618)',
20
+ bgRaised: 'light-dark(#fdfdfe, #1e1f21)',
21
+ // The window behind an app shell's sheet: the page's colour, a shade deeper
22
+ bgWindow: 'light-dark(#e1e3e6, #0f1012)',
23
+ // Fills are translucent and go over any background. Each says one thing: the pointer is
24
+ // here, this is chosen, this is a flat block, this is a well.
25
+ fillHover: 'light-dark(rgb(22 24 28 / 0.05), rgb(255 255 255 / 0.07))',
26
+ // What is chosen or open now: the current row, a pressed toggle. A step past a hover,
27
+ // so the open row still reads as open while the pointer is on another.
28
+ fillSelected: 'light-dark(rgb(22 24 28 / 0.075), rgb(255 255 255 / 0.1))',
29
+ // A flat block: a skeleton, a blank region of a diagram, the person's own message
30
+ fillMuted: 'light-dark(rgb(22 24 28 / 0.05), rgb(255 255 255 / 0.07))',
31
+ // A well: code, a track, a tray
32
+ fillSunken: 'light-dark(rgb(22 24 28 / 0.04), rgb(0 0 0 / 0.26))',
33
+ // Borders. `border` divides and outlines quietly; `borderStrong` outlines a button or a
34
+ // dialog. `borderControl` is the boundary of an input and holds 3:1 against its surface,
35
+ // down to the hardest one it can stand on: a hovered row of the page.
36
+ border: 'light-dark(rgb(22 24 28 / 0.1), rgb(255 255 255 / 0.09))',
37
+ borderStrong: 'light-dark(rgb(22 24 28 / 0.2), rgb(255 255 255 / 0.16))',
38
+ borderControl: 'light-dark(#818489, #76797e)',
39
+ borderControlHover: 'light-dark(#727579, #86898d)',
40
+ // The one shadow: the drop under what floats over the page (a menu, a dialog, a drawer).
41
+ // Nothing that rests on the page casts one.
42
+ shadow: 'light-dark(rgb(22 24 28 / 0.16), rgb(0 0 0 / 0.5))',
43
+ // What dims the page behind a dialog or a drawer
44
+ scrim: 'light-dark(rgb(22 24 28 / 0.32), rgb(0 0 0 / 0.56))',
45
+ // The thumb of a switch or a slider
46
+ thumb: 'light-dark(#ffffff, #ffffff)',
47
+ // Text. The two quieter ones hold 4.5:1 where reading is hardest: on the open row of
48
+ // the page, and on the window itself.
49
+ text: 'light-dark(#16181c, #eaedf2)',
50
+ textMuted: 'light-dark(#5e6065, #adb0b5)',
51
+ textSubtle: 'light-dark(#616468, #9da0a5)',
52
+ // The accent: focus, selection, progress, something live. Nothing else. One definite
53
+ // hue: a solid that white text stands on by day, a bright one that dark text stands on
54
+ // by night. Both hold 4.5:1 on a hovered row of the page.
55
+ accent: 'light-dark(#0164cf, #72acfe)',
56
+ accentVivid: 'light-dark(#1b76e7, #4694ff)',
57
+ onAccent: 'light-dark(#ffffff, #0a1018)',
58
+ accentSoft: 'light-dark(rgb(1 100 207 / 0.1), rgb(114 172 254 / 0.14))',
59
+ focusRing: 'light-dark(#0164cf, #72acfe)',
60
+ focusHalo: 'light-dark(rgb(1 100 207 / 0.2), rgb(114 172 254 / 0.26))',
61
+ // The primary button: the one solid, flat, in the text's own colour
62
+ primary: 'light-dark(#1c1e21, #eceff4)',
63
+ onPrimary: 'light-dark(#fafafa, #0b0d11)',
64
+ // Status: definite colours, each holding 4.5:1 as small text on a hovered row of the
65
+ // page, on every stone a preset offers
66
+ success: 'light-dark(#007835, #37d16c)',
67
+ warning: 'light-dark(#8b6001, #f5af20)',
68
+ danger: 'light-dark(#c92228, #ff7a70)',
50
69
  // Behind a status: a wash of its colour, stronger at night so it still reads
51
- successSoft: 'light-dark(rgb(47 125 85 / 0.12), rgb(111 211 160 / 0.16))',
52
- warningSoft: 'light-dark(rgb(165 106 20 / 0.12), rgb(232 183 101 / 0.16))',
53
- dangerSoft: 'light-dark(rgb(179 55 46 / 0.12), rgb(240 138 128 / 0.16))',
70
+ successSoft: 'light-dark(rgb(0 120 53 / 0.12), rgb(55 209 108 / 0.16))',
71
+ warningSoft: 'light-dark(rgb(139 96 1 / 0.12), rgb(245 175 32 / 0.16))',
72
+ dangerSoft: 'light-dark(rgb(201 34 40 / 0.12), rgb(255 122 112 / 0.16))',
54
73
  // Small text in a status colour: mixed toward the text colour, so a 12px label
55
74
  // on its soft wash still holds 4.5:1
56
- successInk: 'light-dark(#24543e, #a0ddc1)',
57
- warningInk: 'light-dark(#6b4917, #e8ce9a)',
58
- dangerInk: 'light-dark(#732a27, #edb2ad)',
59
- // Code, as the stone shows it: keys in slate, strings in moss, numbers in copper,
60
- // literals in heather. Each holds 4.5:1 on a well in both schemes.
75
+ successText: 'light-dark(#195c2e, #a0dcac)',
76
+ warningText: 'light-dark(#674600, #f2ca8d)',
77
+ dangerText: 'light-dark(#7a342f, #ffb9b1)',
78
+ // Code: keys in slate blue, strings in green, numbers in copper, literals in magenta, and
79
+ // punctuation in a grey that stands back. Each holds 4.5:1 on `fillSunken` in both
80
+ // schemes, punctuation too: a brace is text.
61
81
  codeKey: 'light-dark(#4a5794, #aebcf0)',
62
82
  codeString: 'light-dark(#3b6e4c, #9fd2ac)',
63
83
  codeNumber: 'light-dark(#985616, #ecb47c)',
64
84
  codeLiteral: 'light-dark(#87397a, #e2a6d3)',
65
- codePunct: 'light-dark(#7a808a, #6d7686)'
85
+ codePunct: 'light-dark(#626872, #929baa)'
66
86
  });
67
87
  /**
68
88
  * 4px spacing scale, in rem. Narvi is sized in rem throughout, so an app that
@@ -81,15 +101,23 @@ export const space = stylex.defineVars({
81
101
  x12: '3rem',
82
102
  x16: '4rem'
83
103
  });
84
- /** A frame is always its inner radius plus its padding: `frame` = `xl` + 5px (0.3125rem). */
104
+ /**
105
+ * Radii, named for what takes them, so two things of one kind agree without a number.
106
+ * A frame is always its inner radius plus its padding: `frame` = `card` + 5px (0.3125rem).
107
+ */
85
108
  export const radius = stylex.defineVars({
86
- xs: '0.3125rem',
87
- sm: '0.375rem',
88
- md: '0.5rem',
89
- lg: '0.625rem',
90
- xl: '0.75rem',
109
+ // A key cap, a checkbox, inline code, a small mark
110
+ chip: '0.3125rem',
111
+ // A small control, a segment, a thumbnail
112
+ item: '0.375rem',
113
+ // A control and a row: a button, a field, a menu item, a block of code
114
+ control: '0.5rem',
115
+ // A large control and a panel: a notice, a sheet, a rail item
116
+ panel: '0.625rem',
117
+ // What holds other things: a card, a popover, the composer
118
+ card: '0.75rem',
91
119
  frame: '1.0625rem',
92
- full: '9999px'
120
+ pill: '9999px'
93
121
  });
94
122
  export const font = stylex.defineVars({
95
123
  // Interface text takes the font of the page it is placed on.
@@ -99,11 +127,19 @@ export const font = stylex.defineVars({
99
127
  // build, so either package works without a theme override.
100
128
  display: '"Cormorant Garamond", "Cormorant Garamond Variable", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif',
101
129
  mono: '"Geist Mono", "Geist Mono Variable", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace',
102
- sizeXs: '0.75rem',
103
- sizeSm: '0.8125rem',
104
- sizeMd: '0.875rem',
105
- sizeLg: '1rem',
106
- sizeXl: '1.0625rem',
130
+ // Sizes, named for what they set. `typography` binds each to a weight and a line height.
131
+ // A counter or a count inside tight chrome
132
+ sizeMicro: '0.6875rem',
133
+ // A caption, a key hint, a small label over a part
134
+ sizeCaption: '0.75rem',
135
+ // A dense row and a small control
136
+ sizeMeta: '0.8125rem',
137
+ // A label and running interface copy
138
+ sizeBody: '0.875rem',
139
+ // What is read or typed at length: a reply, the prompt
140
+ sizeReading: '1rem',
141
+ // A title in the text's own face: a dialog's, a section's
142
+ sizeTitle: '1.0625rem',
107
143
  weightRegular: '400',
108
144
  weightMedium: '500',
109
145
  weightSemibold: '600',
@@ -125,3 +161,32 @@ export const motion = stylex.defineVars({
125
161
  // For something that travels across the screen, such as a sliding thumb
126
162
  easeInOut: 'cubic-bezier(0.77, 0, 0.175, 1)'
127
163
  });
164
+ /**
165
+ * For an animation that never ends. Set `animationPlayState: play.whileVisible` on it and
166
+ * attach `whileVisible` to its element: it then runs only while it can be seen. Without the
167
+ * attachment it runs as any animation does. A constant, not a variable, so it is read on the
168
+ * element it is used on.
169
+ */
170
+ export const play = stylex.defineConsts({
171
+ whileVisible: 'var(--narvi-play, running)'
172
+ });
173
+ /**
174
+ * Motion for pages, not interfaces. An interface is used again and again, so nothing in it
175
+ * takes longer than `motion.slow`. A page is read once, as it is scrolled, and its motion is
176
+ * there to be seen: a section easing up into place, a line drawn in. Use this scale only
177
+ * there, as `Reveal` and its child styles do, and always behind
178
+ * `prefers-reduced-motion: no-preference`.
179
+ */
180
+ export const pageMotion = stylex.defineVars({
181
+ // Between items of a row that enter one after another
182
+ stagger: '80ms',
183
+ short: '400ms',
184
+ // Something easing up into place as it is reached
185
+ base: '600ms',
186
+ // Something that follows, such as a mark appearing on a finished drawing
187
+ long: '1200ms',
188
+ // A line drawn in, end to end
189
+ longest: '2000ms',
190
+ // Leaves fast and settles slowly, so the end of a long move is never abrupt
191
+ ease: 'cubic-bezier(0.2, 0.75, 0.2, 1)'
192
+ });
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The type roles: what a piece of text is, not how big it is. Each role is one size, one
3
+ * weight and one line height, so two labels cannot drift apart. Colour is separate: pick a
4
+ * tone (`colors.text`, `textMuted`, `textSubtle`).
5
+ *
6
+ * `Text` renders them with its `variant`. Use these on an element of your own:
7
+ *
8
+ * <span {...stylex.attrs(typography.caption, styles.count)}>
9
+ */
10
+ import * as stylex from '@stylexjs/stylex';
11
+ export declare const typography: Readonly<{
12
+ readonly title: Readonly<{
13
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
14
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
15
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", 1.3>;
16
+ }>;
17
+ readonly reading: Readonly<{
18
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
19
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
20
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
21
+ }>;
22
+ readonly label: Readonly<{
23
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
24
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
25
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
26
+ }>;
27
+ readonly body: Readonly<{
28
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
29
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
30
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
31
+ }>;
32
+ readonly meta: Readonly<{
33
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
34
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
35
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", 1.5>;
36
+ }>;
37
+ readonly caption: Readonly<{
38
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
39
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
40
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", 1.45>;
41
+ }>;
42
+ readonly micro: Readonly<{
43
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
44
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
45
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", 1.3>;
46
+ }>;
47
+ }>;
48
+ export type TypeRole = keyof typeof typography;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * The type roles: what a piece of text is, not how big it is. Each role is one size, one
3
+ * weight and one line height, so two labels cannot drift apart. Colour is separate: pick a
4
+ * tone (`colors.text`, `textMuted`, `textSubtle`).
5
+ *
6
+ * `Text` renders them with its `variant`. Use these on an element of your own:
7
+ *
8
+ * <span {...stylex.attrs(typography.caption, styles.count)}>
9
+ */
10
+ import * as stylex from '@stylexjs/stylex';
11
+ import { font } from './tokens.stylex.js';
12
+ export const typography = stylex.create({
13
+ // A title in the text's own face: a dialog's, a section's
14
+ title: {
15
+ fontSize: font.sizeTitle,
16
+ fontWeight: font.weightSemibold,
17
+ lineHeight: 1.3
18
+ },
19
+ // What is read or typed at length: a reply, the prompt
20
+ reading: {
21
+ fontSize: font.sizeReading,
22
+ fontWeight: font.weightRegular,
23
+ lineHeight: font.leadingNormal
24
+ },
25
+ // What names a thing: a row's title, a button, a menu item, a field's label
26
+ label: {
27
+ fontSize: font.sizeBody,
28
+ fontWeight: font.weightMedium,
29
+ lineHeight: font.leadingSnug
30
+ },
31
+ // Running interface copy: a description, a paragraph in a dialog
32
+ body: {
33
+ fontSize: font.sizeBody,
34
+ fontWeight: font.weightRegular,
35
+ lineHeight: font.leadingNormal
36
+ },
37
+ // A dense row and what sits beside a label: a time, a path, a count
38
+ meta: {
39
+ fontSize: font.sizeMeta,
40
+ fontWeight: font.weightRegular,
41
+ lineHeight: 1.5
42
+ },
43
+ // A caption, a hint under a field, a small label over a part
44
+ caption: {
45
+ fontSize: font.sizeCaption,
46
+ fontWeight: font.weightRegular,
47
+ lineHeight: 1.45
48
+ },
49
+ // A counter or a status inside tight chrome
50
+ micro: {
51
+ fontSize: font.sizeMicro,
52
+ fontWeight: font.weightMedium,
53
+ lineHeight: 1.3
54
+ }
55
+ });
package/dist/vite.d.ts CHANGED
@@ -21,8 +21,15 @@ export type NarviOptions = StylexOptions & {
21
21
  */
22
22
  tailwind?: boolean;
23
23
  };
24
+ /**
25
+ * The oldest browsers with `light-dark()`, which Narvi's colours are written in. The plugin
26
+ * makes them the build's CSS target unless the app sets `build.cssTarget` itself.
27
+ */
28
+ export declare const CSS_TARGET: string[];
24
29
  /** The cascade layer that holds all of Narvi's styles, and any StyleX of your own. */
25
30
  export declare const NARVI_LAYER = "narvi";
31
+ /** The layer inside it that holds `@diegopluna/narvi/base.css`, below every component. */
32
+ export declare const BASE_LAYER = "narvi.base";
26
33
  /**
27
34
  * Vite plugin that compiles Narvi's styles (and any StyleX you write yourself).
28
35
  *
@@ -30,7 +37,8 @@ export declare const NARVI_LAYER = "narvi";
30
37
  * - runs after the Svelte compiler, so `.svelte` files are handled
31
38
  * - emits one cascade layer, `narvi`, so your own unlayered CSS always wins over
32
39
  * Narvi's, and a layered framework can be ordered around it
33
- * - leaves `light-dark()` and `:dir()` alone, which the tokens and components rely on
40
+ * - leaves `light-dark()` and `:dir()` alone, which the tokens and components rely on, and
41
+ * targets browsers that have `light-dark()`, so Vite leaves it alone in your stylesheet too
34
42
  *
35
43
  * Add it after `sveltekit()` (or `svelte()`) in `vite.config.ts`.
36
44
  */
package/dist/vite.js CHANGED
@@ -1,8 +1,16 @@
1
1
  import stylex from '@stylexjs/unplugin';
2
2
  import { Features } from 'lightningcss';
3
+ import { assertAfterSvelte } from './internal/plugin-order.js';
3
4
  const PACKAGE = '@diegopluna/narvi';
5
+ /**
6
+ * The oldest browsers with `light-dark()`, which Narvi's colours are written in. The plugin
7
+ * makes them the build's CSS target unless the app sets `build.cssTarget` itself.
8
+ */
9
+ export const CSS_TARGET = ['chrome123', 'edge123', 'firefox120', 'safari17.5'];
4
10
  /** The cascade layer that holds all of Narvi's styles, and any StyleX of your own. */
5
11
  export const NARVI_LAYER = 'narvi';
12
+ /** The layer inside it that holds `@diegopluna/narvi/base.css`, below every component. */
13
+ export const BASE_LAYER = `${NARVI_LAYER}.base`;
6
14
  /**
7
15
  * Vite plugin that compiles Narvi's styles (and any StyleX you write yourself).
8
16
  *
@@ -10,7 +18,8 @@ export const NARVI_LAYER = 'narvi';
10
18
  * - runs after the Svelte compiler, so `.svelte` files are handled
11
19
  * - emits one cascade layer, `narvi`, so your own unlayered CSS always wins over
12
20
  * Narvi's, and a layered framework can be ordered around it
13
- * - leaves `light-dark()` and `:dir()` alone, which the tokens and components rely on
21
+ * - leaves `light-dark()` and `:dir()` alone, which the tokens and components rely on, and
22
+ * targets browsers that have `light-dark()`, so Vite leaves it alone in your stylesheet too
14
23
  *
15
24
  * Add it after `sveltekit()` (or `svelte()`) in `vite.config.ts`.
16
25
  */
@@ -18,9 +27,15 @@ export function narvi({ tailwind = false, ...options } = {}) {
18
27
  const plugin = stylex.vite({
19
28
  // StyleX orders its rules in layers of its own, `priority1` and up. They are
20
29
  // nested in one `narvi` layer, which other CSS can be placed around.
30
+ // `narvi.base`, which holds `base.css`, is declared first within it, so the base stays
31
+ // below every component whichever stylesheet the browser reads first.
21
32
  useCSSLayers: tailwind
22
- ? { before: ['theme', 'base'], prefix: NARVI_LAYER, after: ['components', 'utilities'] }
23
- : { prefix: NARVI_LAYER },
33
+ ? {
34
+ before: ['theme', 'base', BASE_LAYER],
35
+ prefix: NARVI_LAYER,
36
+ after: ['components', 'utilities']
37
+ }
38
+ : { before: [BASE_LAYER], prefix: NARVI_LAYER },
24
39
  ...options,
25
40
  // Narvi ships StyleX source, which must reach the compiler: Vite's dependency
26
41
  // pre-bundling would hand the page `stylex.create` calls that throw at runtime.
@@ -38,8 +53,25 @@ export function narvi({ tailwind = false, ...options } = {}) {
38
53
  }
39
54
  });
40
55
  const configureServer = plugin.configureServer;
41
- return {
56
+ const config = plugin.config;
57
+ const configResolved = plugin.configResolved;
58
+ const self = {
42
59
  ...plugin,
60
+ // Vite lowers the CSS it bundles for its default targets, which are older than
61
+ // `light-dark()`. That rewrites `base.css` into custom properties that follow only a
62
+ // `color-scheme` written in a stylesheet: one set from script would darken the
63
+ // components and leave the page light. An app that sets its own target keeps it.
64
+ config(user, env) {
65
+ const result = config?.call(this, user, env) ?? {};
66
+ if (user.build?.cssTarget !== undefined)
67
+ return result;
68
+ return { ...result, build: { ...result.build, cssTarget: CSS_TARGET } };
69
+ },
70
+ // A wrong order is the one mistake that stops the build, so it is named here
71
+ configResolved(config) {
72
+ assertAfterSvelte(config.plugins, self);
73
+ return configResolved?.call(this, config);
74
+ },
43
75
  // The StyleX plugin defaults to `enforce: 'pre'`, which would hand it raw
44
76
  // `.svelte` source. Dropping `enforce` lets the Svelte compiler go first.
45
77
  enforce: undefined,
@@ -68,5 +100,6 @@ export function narvi({ tailwind = false, ...options } = {}) {
68
100
  timer.unref?.();
69
101
  }
70
102
  };
103
+ return self;
71
104
  }
72
105
  export default narvi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopluna/narvi",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "packageManager": "pnpm@12.18.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -11,12 +11,18 @@
11
11
  "components",
12
12
  "design-system",
13
13
  "ui",
14
- "stylex"
14
+ "stylex",
15
+ "tanstack-intent"
15
16
  ],
16
17
  "files": [
17
18
  "dist",
18
19
  "!dist/**/*.test.*",
19
- "!dist/**/*.spec.*"
20
+ "!dist/**/*.spec.*",
21
+ "skills/setup",
22
+ "skills/styling",
23
+ "skills/theming",
24
+ "skills/building-ui",
25
+ "skills/markdown"
20
26
  ],
21
27
  "type": "module",
22
28
  "sideEffects": [
@@ -39,6 +45,39 @@
39
45
  "types": "./dist/tokens.stylex.d.ts",
40
46
  "default": "./dist/tokens.stylex.js"
41
47
  },
48
+ "./media.stylex.js": {
49
+ "types": "./dist/media.stylex.d.ts",
50
+ "default": "./dist/media.stylex.js"
51
+ },
52
+ "./markdown": {
53
+ "types": "./dist/markdown/index.d.ts",
54
+ "default": "./dist/markdown/index.js"
55
+ },
56
+ "./markdown/highlight": {
57
+ "types": "./dist/markdown/highlight.d.ts",
58
+ "default": "./dist/markdown/highlight.js"
59
+ },
60
+ "./markdown/math": {
61
+ "types": "./dist/markdown/math.d.ts",
62
+ "svelte": "./dist/markdown/math.js",
63
+ "default": "./dist/markdown/math.js"
64
+ },
65
+ "./markdown/diagrams": {
66
+ "types": "./dist/markdown/diagrams.d.ts",
67
+ "svelte": "./dist/markdown/diagrams.js",
68
+ "default": "./dist/markdown/diagrams.js"
69
+ },
70
+ "./markdown/files": {
71
+ "types": "./dist/markdown/files.d.ts",
72
+ "svelte": "./dist/markdown/files.js",
73
+ "default": "./dist/markdown/files.js"
74
+ },
75
+ "./markdown/images": {
76
+ "types": "./dist/markdown/images.d.ts",
77
+ "svelte": "./dist/markdown/images.js",
78
+ "default": "./dist/markdown/images.js"
79
+ },
80
+ "./base.css": "./dist/base.css",
42
81
  "./vite": {
43
82
  "types": "./dist/vite.d.ts",
44
83
  "default": "./dist/vite.js"
@@ -52,7 +91,7 @@
52
91
  "scripts": {
53
92
  "dev": "vite dev",
54
93
  "build": "pnpm run build:lib && pnpm run build:docs",
55
- "build:lib": "svelte-kit sync && svelte-package && publint",
94
+ "build:lib": "node scripts/base-css.js && svelte-kit sync && svelte-package && node scripts/check-types.js && publint",
56
95
  "build:docs": "vite build",
57
96
  "preview": "vite preview",
58
97
  "prepare": "svelte-kit sync || echo ''",
@@ -63,6 +102,7 @@
63
102
  "format": "prettier --write .",
64
103
  "test:unit": "vitest",
65
104
  "test": "npm run test:unit -- --run",
105
+ "test:browsers": "NARVI_BROWSERS=firefox,webkit vitest --run --project client src/tests/markdown",
66
106
  "deploy": "pnpm build:docs && wrangler deploy"
67
107
  },
68
108
  "devDependencies": {
@@ -93,8 +133,10 @@
93
133
  "@sveltejs/kit": "^3.0.0",
94
134
  "@sveltejs/package": "^2.5.8",
95
135
  "@sveltejs/vite-plugin-svelte": "^7.2.0",
136
+ "@tanstack/intent": "0.5.6",
96
137
  "@types/node": "^24",
97
138
  "@vitest/browser-playwright": "^4.1.8",
139
+ "axe-core": "^4.14.0",
98
140
  "eslint": "^10.4.1",
99
141
  "eslint-config-prettier": "^10.1.8",
100
142
  "eslint-plugin-svelte": "^3.19.0",
@@ -118,11 +160,21 @@
118
160
  "vite": ">=6"
119
161
  },
120
162
  "dependencies": {
163
+ "@pierre/highlights": "0.5.0",
121
164
  "@stylexjs/stylex": "0.19.1",
122
165
  "@stylexjs/unplugin": "0.19.1",
123
166
  "bits-ui": "^2.20.6",
167
+ "decode-named-character-reference": "1.3.0",
168
+ "dompurify": "3.4.17",
124
169
  "esm-env": "^1.2.2",
125
- "lightningcss": "^1.33.0"
170
+ "katex": "0.19.1",
171
+ "lightningcss": "^1.33.0",
172
+ "pele": "1.13.0"
126
173
  },
127
- "description": "A Svelte 5 component library styled with StyleX."
174
+ "description": "A Svelte 5 component library styled with StyleX.",
175
+ "intent": {
176
+ "version": 1,
177
+ "repo": "diegopluna/narvi",
178
+ "docs": "https://narvi.dpeter.dev"
179
+ }
128
180
  }