@fuzdev/fuz_ui 0.206.7 → 0.206.9

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 (221) hide show
  1. package/README.md +3 -3
  2. package/dist/Alert.svelte +21 -25
  3. package/dist/Alert.svelte.d.ts.map +1 -1
  4. package/dist/ApiDeclarationList.svelte +2 -2
  5. package/dist/ApiDeclarationList.svelte.d.ts.map +1 -1
  6. package/dist/ApiIndex.svelte +4 -4
  7. package/dist/ApiIndex.svelte.d.ts.map +1 -1
  8. package/dist/ApiModule.svelte +13 -10
  9. package/dist/ApiModule.svelte.d.ts.map +1 -1
  10. package/dist/ApiModulesList.svelte +2 -2
  11. package/dist/ApiModulesList.svelte.d.ts.map +1 -1
  12. package/dist/Breadcrumb.svelte +31 -19
  13. package/dist/Breadcrumb.svelte.d.ts.map +1 -1
  14. package/dist/Card.svelte +17 -17
  15. package/dist/Card.svelte.d.ts.map +1 -1
  16. package/dist/ColorSchemeInput.svelte +6 -6
  17. package/dist/ColorSchemeInput.svelte.d.ts.map +1 -1
  18. package/dist/Contextmenu.svelte +6 -4
  19. package/dist/Contextmenu.svelte.d.ts.map +1 -1
  20. package/dist/ContextmenuEntry.svelte +8 -8
  21. package/dist/ContextmenuEntry.svelte.d.ts.map +1 -1
  22. package/dist/ContextmenuIcon.svelte +3 -3
  23. package/dist/ContextmenuIcon.svelte.d.ts.map +1 -1
  24. package/dist/ContextmenuLinkEntry.svelte +14 -14
  25. package/dist/ContextmenuLinkEntry.svelte.d.ts.map +1 -1
  26. package/dist/ContextmenuMenu.svelte +10 -10
  27. package/dist/ContextmenuMenu.svelte.d.ts.map +1 -1
  28. package/dist/ContextmenuRoot.svelte +7 -7
  29. package/dist/ContextmenuRootForSafariCompatibility.svelte +15 -15
  30. package/dist/ContextmenuSeparator.svelte +2 -2
  31. package/dist/ContextmenuSubmenu.svelte +15 -12
  32. package/dist/ContextmenuSubmenu.svelte.d.ts.map +1 -1
  33. package/dist/ContextmenuTextEntry.svelte +4 -4
  34. package/dist/ContextmenuTextEntry.svelte.d.ts.map +1 -1
  35. package/dist/CopyToClipboard.svelte +7 -7
  36. package/dist/CopyToClipboard.svelte.d.ts.map +1 -1
  37. package/dist/DeclarationDetail.svelte +35 -28
  38. package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
  39. package/dist/DeclarationLink.svelte +7 -7
  40. package/dist/DeclarationLink.svelte.d.ts.map +1 -1
  41. package/dist/Details.svelte +3 -3
  42. package/dist/Details.svelte.d.ts.map +1 -1
  43. package/dist/Dialog.svelte +7 -7
  44. package/dist/Dialog.svelte.d.ts.map +1 -1
  45. package/dist/DialogContent.svelte +6 -6
  46. package/dist/DialogContent.svelte.d.ts.map +1 -1
  47. package/dist/Docs.svelte +14 -12
  48. package/dist/Docs.svelte.d.ts.map +1 -1
  49. package/dist/DocsContent.svelte +4 -4
  50. package/dist/DocsContent.svelte.d.ts.map +1 -1
  51. package/dist/DocsFooter.svelte +7 -8
  52. package/dist/DocsFooter.svelte.d.ts.map +1 -1
  53. package/dist/DocsLink.svelte +24 -21
  54. package/dist/DocsLink.svelte.d.ts.map +1 -1
  55. package/dist/DocsList.svelte +3 -3
  56. package/dist/DocsList.svelte.d.ts.map +1 -1
  57. package/dist/DocsMenu.svelte +13 -10
  58. package/dist/DocsMenu.svelte.d.ts.map +1 -1
  59. package/dist/DocsMenuHeader.svelte +2 -2
  60. package/dist/DocsMenuHeader.svelte.d.ts.map +1 -1
  61. package/dist/DocsPageLinks.svelte +9 -7
  62. package/dist/DocsPageLinks.svelte.d.ts.map +1 -1
  63. package/dist/DocsPrimaryNav.svelte +5 -5
  64. package/dist/DocsPrimaryNav.svelte.d.ts.map +1 -1
  65. package/dist/DocsSearch.svelte +3 -3
  66. package/dist/DocsSearch.svelte.d.ts.map +1 -1
  67. package/dist/DocsSecondaryNav.svelte +3 -3
  68. package/dist/DocsSecondaryNav.svelte.d.ts.map +1 -1
  69. package/dist/DocsTertiaryNav.svelte +8 -8
  70. package/dist/DocsTertiaryNav.svelte.d.ts.map +1 -1
  71. package/dist/EcosystemLinks.svelte +3 -3
  72. package/dist/EcosystemLinks.svelte.d.ts.map +1 -1
  73. package/dist/EcosystemLinksPanel.svelte +2 -2
  74. package/dist/EcosystemLinksPanel.svelte.d.ts.map +1 -1
  75. package/dist/GithubLink.svelte +10 -10
  76. package/dist/GithubLink.svelte.d.ts.map +1 -1
  77. package/dist/Glyph.svelte +4 -2
  78. package/dist/Glyph.svelte.d.ts.map +1 -1
  79. package/dist/Hashlink.svelte +5 -5
  80. package/dist/Hashlink.svelte.d.ts.map +1 -1
  81. package/dist/HueInput.svelte +5 -5
  82. package/dist/HueInput.svelte.d.ts.map +1 -1
  83. package/dist/ImgOrSvg.svelte +20 -20
  84. package/dist/ImgOrSvg.svelte.d.ts.map +1 -1
  85. package/dist/LibraryDetail.svelte +16 -16
  86. package/dist/LibraryDetail.svelte.d.ts.map +1 -1
  87. package/dist/LibrarySummary.svelte +10 -8
  88. package/dist/LibrarySummary.svelte.d.ts.map +1 -1
  89. package/dist/MdnLink.svelte +8 -8
  90. package/dist/MdnLink.svelte.d.ts.map +1 -1
  91. package/dist/ModuleLink.svelte +5 -5
  92. package/dist/ModuleLink.svelte.d.ts.map +1 -1
  93. package/dist/PasteFromClipboard.svelte +1 -1
  94. package/dist/PasteFromClipboard.svelte.d.ts.map +1 -1
  95. package/dist/PendingAnimation.svelte +12 -11
  96. package/dist/PendingAnimation.svelte.d.ts.map +1 -1
  97. package/dist/PendingButton.svelte +3 -3
  98. package/dist/PendingButton.svelte.d.ts.map +1 -1
  99. package/dist/ProjectActivityChart.svelte +137 -0
  100. package/dist/ProjectActivityChart.svelte.d.ts +30 -0
  101. package/dist/ProjectActivityChart.svelte.d.ts.map +1 -0
  102. package/dist/ProjectLinks.svelte +29 -48
  103. package/dist/ProjectLinks.svelte.d.ts.map +1 -1
  104. package/dist/Redirect.svelte +12 -8
  105. package/dist/Redirect.svelte.d.ts.map +1 -1
  106. package/dist/Sparkline.svelte +131 -0
  107. package/dist/Sparkline.svelte.d.ts +42 -0
  108. package/dist/Sparkline.svelte.d.ts.map +1 -0
  109. package/dist/Spiders.svelte +5 -5
  110. package/dist/Spiders.svelte.d.ts.map +1 -1
  111. package/dist/StyleVariableButton.svelte +6 -6
  112. package/dist/StyleVariableButton.svelte.d.ts.map +1 -1
  113. package/dist/Svg.svelte +5 -5
  114. package/dist/Svg.svelte.d.ts.map +1 -1
  115. package/dist/Teleport.svelte +2 -2
  116. package/dist/Teleport.svelte.d.ts.map +1 -1
  117. package/dist/ThemeInput.svelte +10 -8
  118. package/dist/ThemeInput.svelte.d.ts.map +1 -1
  119. package/dist/ThemeRoot.svelte +10 -11
  120. package/dist/ThemeRoot.svelte.d.ts.map +1 -1
  121. package/dist/TomeContent.svelte +11 -11
  122. package/dist/TomeContent.svelte.d.ts.map +1 -1
  123. package/dist/TomeHeader.svelte +6 -6
  124. package/dist/TomeLink.svelte +7 -7
  125. package/dist/TomeLink.svelte.d.ts.map +1 -1
  126. package/dist/TomeSection.svelte +8 -8
  127. package/dist/TomeSection.svelte.d.ts.map +1 -1
  128. package/dist/TomeSectionHeader.svelte +12 -12
  129. package/dist/TomeSectionHeader.svelte.d.ts.map +1 -1
  130. package/dist/TypeLink.svelte +11 -11
  131. package/dist/TypeLink.svelte.d.ts.map +1 -1
  132. package/dist/alert.js +1 -1
  133. package/dist/api_search.svelte.d.ts.map +1 -1
  134. package/dist/api_search.svelte.js +5 -7
  135. package/dist/autofocus.svelte.d.ts.map +1 -1
  136. package/dist/context_helpers.js +1 -1
  137. package/dist/contextmenu_helpers.d.ts.map +1 -1
  138. package/dist/contextmenu_helpers.js +3 -3
  139. package/dist/contextmenu_state.svelte.d.ts.map +1 -1
  140. package/dist/contextmenu_state.svelte.js +4 -4
  141. package/dist/csp.d.ts.map +1 -1
  142. package/dist/csp.js +27 -27
  143. package/dist/csp_of_fuzdev.d.ts.map +1 -1
  144. package/dist/csp_of_fuzdev.js +1 -1
  145. package/dist/declaration.svelte.d.ts +44 -256
  146. package/dist/declaration.svelte.d.ts.map +1 -1
  147. package/dist/declaration.svelte.js +132 -52
  148. package/dist/declaration_contextmenu.d.ts.map +1 -1
  149. package/dist/declaration_contextmenu.js +2 -2
  150. package/dist/docs_helpers.svelte.d.ts.map +1 -1
  151. package/dist/icons.js +200 -200
  152. package/dist/intersect.svelte.d.ts.map +1 -1
  153. package/dist/library.svelte.d.ts +31 -18
  154. package/dist/library.svelte.d.ts.map +1 -1
  155. package/dist/library.svelte.js +76 -21
  156. package/dist/logos.js +42 -42
  157. package/dist/module.svelte.d.ts +30 -37
  158. package/dist/module.svelte.d.ts.map +1 -1
  159. package/dist/module.svelte.js +88 -35
  160. package/dist/module_contextmenu.d.ts.map +1 -1
  161. package/dist/module_contextmenu.js +2 -2
  162. package/dist/project_stats.d.ts +121 -0
  163. package/dist/project_stats.d.ts.map +1 -0
  164. package/dist/project_stats.js +153 -0
  165. package/dist/project_stats_data.d.ts +3 -0
  166. package/dist/project_stats_data.d.ts.map +1 -0
  167. package/dist/project_stats_data.js +469 -0
  168. package/dist/project_stats_update.task.d.ts +4 -0
  169. package/dist/project_stats_update.task.d.ts.map +1 -0
  170. package/dist/project_stats_update.task.js +50 -0
  171. package/dist/projects.d.ts +17 -0
  172. package/dist/projects.d.ts.map +1 -0
  173. package/dist/projects.js +20 -0
  174. package/dist/publish.task.d.ts +3 -0
  175. package/dist/publish.task.d.ts.map +1 -0
  176. package/dist/publish.task.js +23 -0
  177. package/dist/site.svelte.d.ts.map +1 -1
  178. package/dist/sparkline.d.ts +102 -0
  179. package/dist/sparkline.d.ts.map +1 -0
  180. package/dist/sparkline.js +63 -0
  181. package/dist/style_variable_helpers.svelte.d.ts.map +1 -1
  182. package/dist/svg.d.ts.map +1 -1
  183. package/dist/theme_state.svelte.d.ts.map +1 -1
  184. package/dist/theme_state.svelte.js +1 -1
  185. package/dist/tome.d.ts.map +1 -1
  186. package/dist/tome.js +1 -1
  187. package/dist/vite_plugin_pkg_json.d.ts.map +1 -1
  188. package/dist/vite_plugin_pkg_json.js +1 -1
  189. package/package.json +3 -22
  190. package/src/lib/alert.ts +3 -3
  191. package/src/lib/api_search.svelte.ts +9 -11
  192. package/src/lib/autofocus.svelte.ts +2 -2
  193. package/src/lib/context_helpers.ts +2 -2
  194. package/src/lib/contextmenu_helpers.ts +21 -21
  195. package/src/lib/contextmenu_state.svelte.ts +32 -34
  196. package/src/lib/csp.ts +42 -54
  197. package/src/lib/csp_of_fuzdev.ts +2 -2
  198. package/src/lib/declaration.svelte.ts +157 -62
  199. package/src/lib/declaration_contextmenu.ts +5 -5
  200. package/src/lib/dialog.ts +1 -1
  201. package/src/lib/docs_helpers.svelte.ts +9 -9
  202. package/src/lib/icons.ts +205 -205
  203. package/src/lib/intersect.svelte.ts +5 -5
  204. package/src/lib/library.svelte.ts +103 -36
  205. package/src/lib/library_helpers.ts +2 -2
  206. package/src/lib/logos.ts +43 -43
  207. package/src/lib/module.svelte.ts +98 -49
  208. package/src/lib/module_contextmenu.ts +4 -4
  209. package/src/lib/project_stats.ts +220 -0
  210. package/src/lib/project_stats_data.ts +472 -0
  211. package/src/lib/project_stats_update.task.ts +53 -0
  212. package/src/lib/projects.ts +49 -0
  213. package/src/lib/publish.task.ts +22 -0
  214. package/src/lib/site.svelte.ts +5 -5
  215. package/src/lib/sparkline.ts +173 -0
  216. package/src/lib/storage.ts +2 -2
  217. package/src/lib/style_variable_helpers.svelte.ts +2 -2
  218. package/src/lib/svg.ts +2 -2
  219. package/src/lib/theme_state.svelte.ts +8 -8
  220. package/src/lib/tome.ts +8 -8
  221. package/src/lib/vite_plugin_pkg_json.ts +8 -8
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Pure geometry helpers behind `Sparkline` and `ProjectActivityChart`.
3
+ *
4
+ * Computes polyline points, alpha-fade gradient stops, and the end-dot
5
+ * position for a series of values, so components stay thin and the math is
6
+ * testable and reusable outside Svelte.
7
+ *
8
+ * @module
9
+ */
10
+ /**
11
+ * Vertical scale for a sparkline's geometry. The nonlinear options compress
12
+ * the top of the range so small values stay legible under a large shared
13
+ * max — increasingly so from `'sqrt'` to smaller power exponents (a number
14
+ * in `(0, 1]`, where `1` is linear and `1 / 3` is cube root) to `'log'`.
15
+ */
16
+ export type SparklineScale = 'linear' | 'sqrt' | 'log' | number;
17
+ export interface SparklineOptions {
18
+ /**
19
+ * Width of the drawing area in px.
20
+ */
21
+ width: number;
22
+ /**
23
+ * Height of the drawing area in px.
24
+ */
25
+ height: number;
26
+ /**
27
+ * The value rendered at full height and full alpha.
28
+ * Pass a shared max across sparklines for comparable scales.
29
+ * Defaults to the local max of the values.
30
+ */
31
+ max?: number;
32
+ /**
33
+ * Vertical scale for the line's geometry. The alpha fade always tracks
34
+ * the linear ratio regardless of `scale`.
35
+ *
36
+ * @default 'linear'
37
+ */
38
+ scale?: SparklineScale;
39
+ /**
40
+ * @default 2
41
+ */
42
+ stroke_width?: number;
43
+ /**
44
+ * Alpha at a value of 0, scaling linearly to 1 at the max.
45
+ *
46
+ * @default 0.4
47
+ */
48
+ alpha_floor?: number;
49
+ /**
50
+ * Reserve padding for an end dot of radius `stroke_width` at the final point.
51
+ *
52
+ * @default false
53
+ */
54
+ end_dot?: boolean;
55
+ }
56
+ /**
57
+ * A gradient stop for the per-point alpha fade.
58
+ */
59
+ export interface SparklineStop {
60
+ /**
61
+ * Gradient offset in `[0, 1]`.
62
+ */
63
+ offset: number;
64
+ /**
65
+ * Stop opacity in `[alpha_floor, 1]`.
66
+ */
67
+ opacity: number;
68
+ }
69
+ export interface SparklineGeometry {
70
+ /**
71
+ * SVG polyline `points` string.
72
+ */
73
+ points: string;
74
+ /**
75
+ * Alpha-fade gradient stops, thinned to runs' boundaries so long flat
76
+ * stretches (like all-zero history) cost a constant number of stops.
77
+ */
78
+ stops: Array<SparklineStop>;
79
+ /**
80
+ * X coordinate of the final point.
81
+ */
82
+ end_x: number;
83
+ /**
84
+ * Y coordinate of the final point.
85
+ */
86
+ end_y: number;
87
+ /**
88
+ * Alpha of the final point.
89
+ */
90
+ end_alpha: number;
91
+ /**
92
+ * Radius for an end dot, equal to the stroke width.
93
+ */
94
+ dot_radius: number;
95
+ }
96
+ /**
97
+ * Computes the rendering geometry for a sparkline of `values`.
98
+ *
99
+ * Returns `null` when `values` has fewer than 2 points, which cannot form a line.
100
+ */
101
+ export declare const sparkline_geometry: (values: Array<number>, options: SparklineOptions) => SparklineGeometry | null;
102
+ //# sourceMappingURL=sparkline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparkline.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sparkline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACnB;AAID;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC9B,QAAQ,KAAK,CAAC,MAAM,CAAC,EACrB,SAAS,gBAAgB,KACvB,iBAAiB,GAAG,IA8DtB,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Pure geometry helpers behind `Sparkline` and `ProjectActivityChart`.
3
+ *
4
+ * Computes polyline points, alpha-fade gradient stops, and the end-dot
5
+ * position for a series of values, so components stay thin and the math is
6
+ * testable and reusable outside Svelte.
7
+ *
8
+ * @module
9
+ */
10
+ const round = (n) => Math.round(n * 100) / 100;
11
+ /**
12
+ * Computes the rendering geometry for a sparkline of `values`.
13
+ *
14
+ * Returns `null` when `values` has fewer than 2 points, which cannot form a line.
15
+ */
16
+ export const sparkline_geometry = (values, options) => {
17
+ if (values.length < 2)
18
+ return null;
19
+ const { width, height, max, scale = 'linear', stroke_width = 2, alpha_floor = 0.4, end_dot = false } = options;
20
+ const local_max = max ?? Math.max(0, ...values);
21
+ const scale_max = local_max > 0 ? local_max : 1;
22
+ const dot_radius = stroke_width;
23
+ // inset by half the stroke (or the dot radius) so the extremes aren't clipped
24
+ const pad = end_dot ? Math.max(stroke_width / 2, dot_radius) : stroke_width / 2;
25
+ const x_coord = (index) => pad + (index * (width - 2 * pad)) / (values.length - 1);
26
+ const y_coord = (value) => {
27
+ const clamped = Math.min(value, scale_max);
28
+ const ratio = clamped / scale_max;
29
+ const scaled = scale === 'linear'
30
+ ? ratio
31
+ : scale === 'sqrt'
32
+ ? Math.sqrt(ratio)
33
+ : scale === 'log'
34
+ ? Math.log1p(clamped) / Math.log1p(scale_max)
35
+ : ratio ** scale;
36
+ return height - pad - scaled * (height - 2 * pad);
37
+ };
38
+ const alpha = (value) => alpha_floor + (1 - alpha_floor) * (Math.min(value, scale_max) / scale_max);
39
+ const points = values
40
+ .map((value, index) => `${round(x_coord(index))},${round(y_coord(value))}`)
41
+ .join(' ');
42
+ const opacities = values.map((value) => round(alpha(value)));
43
+ const stops = [];
44
+ for (let i = 0; i < values.length; i++) {
45
+ const opacity = opacities[i];
46
+ // keep the first and last stops and each run's boundaries; drop run interiors
47
+ if (i > 0 &&
48
+ i < values.length - 1 &&
49
+ opacity === opacities[i - 1] &&
50
+ opacity === opacities[i + 1]) {
51
+ continue;
52
+ }
53
+ stops.push({ offset: round(x_coord(i) / width), opacity });
54
+ }
55
+ return {
56
+ points,
57
+ stops,
58
+ end_x: round(x_coord(values.length - 1)),
59
+ end_y: round(y_coord(values[values.length - 1])),
60
+ end_alpha: opacities[values.length - 1],
61
+ dot_radius
62
+ };
63
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"style_variable_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/style_variable_helpers.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,yBAAyB;;;CAAwD,CAAC;AAG/F,qBAAa,qBAAqB;IACjC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAiB;gBAEhC,OAAO,GAAE,aAAa,GAAG,IAAW;CAGhD"}
1
+ {"version":3,"file":"style_variable_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/style_variable_helpers.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAIjE,eAAO,MAAM,yBAAyB;;;CAAwD,CAAC;AAG/F,qBAAa,qBAAqB;IACjC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAiB;gBAEhC,OAAO,GAAE,aAAa,GAAG,IAAW;CAGhD"}
package/dist/svg.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"svg.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/svg.ts"],"names":[],"mappings":"A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AC,cAAc,CAAC,CAAC;AAExD,qBAAa,UAAU;IACtB,KAAK,EAAE,KAAK,CAAiB;IAC7B,YAAY,EAAE,WAAW,CAAiB;gBAE9B,OAAO,CAAC,EAAE,iBAAiB;IAUvC,MAAM,IAAI,cAAc;CAMxB;AACD,eAAO,MAAM,mBAAmB;2CAAwB,UAAU;4BAAV,UAAU;uBAAV,UAAU,WAAV,UAAU;CAAG,CAAC;AAEtE,eAAO,MAAM,iBAAiB,GAAI,cAAc,WAAW,GAAG,IAAI,KAAG,IAOpE,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAE7C,eAAO,MAAM,iBAAiB,GAC7B,cAAc,WAAW,GAAG,IAAI,EAChC,YAA8B,KAC5B,IAEF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC7B,WAAU,WAAoB,EAC9B,YAA8B,KAC5B,WAA4E,CAAC;AAEhF,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,GAAG,IAAI,EAAE,YAAuB,KAAG,IAEzE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAU,KAA0B,EAAE,YAAuB,KAAG,KAC3C,CAAC"}
@@ -18,7 +18,7 @@ export class ThemeState {
18
18
  toJSON() {
19
19
  return {
20
20
  theme: this.theme,
21
- color_scheme: this.color_scheme,
21
+ color_scheme: this.color_scheme
22
22
  };
23
23
  }
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tome.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,eAAO,MAAM,aAAa;2CAAwB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;4BAAjB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;uBAAjB,GAAG,CAAC,MAAM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MAAM,EACnB,kBAA6B,EAC7B,OAAO,MAAM,KACX,MAIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,MAAiC,CAAC;AAE7E,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,IAK/C,CAAC"}
package/dist/tome.js CHANGED
@@ -24,7 +24,7 @@ export const Tome = z.object({
24
24
  Component: z.custom(),
25
25
  related_tomes: z.array(z.string()),
26
26
  related_modules: z.array(z.string()),
27
- related_declarations: z.array(z.string()),
27
+ related_declarations: z.array(z.string())
28
28
  });
29
29
  /**
30
30
  * @param hash - URL fragment to append, with or without the `#`
@@ -1 +1 @@
1
- {"version":3,"file":"vite_plugin_pkg_json.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/vite_plugin_pkg_json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,KAAK,EAAC,MAAM,EAAS,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAkBlE,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACxC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,WAAW,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAS,wBAA6B,KAAG,MA6D7E,CAAC"}
1
+ {"version":3,"file":"vite_plugin_pkg_json.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/vite_plugin_pkg_json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,MAAM,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAkBpE,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACxC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,WAAW,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAS,wBAA6B,KAAG,MA6D7E,CAAC"}
@@ -121,6 +121,6 @@ export const vite_plugin_pkg_json = (options = {}) => {
121
121
  if (id !== RESOLVED_VIRTUAL_ID)
122
122
  return undefined;
123
123
  return cached ?? read_curated(this);
124
- },
124
+ }
125
125
  };
126
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.206.7",
3
+ "version": "0.206.9",
4
4
  "description": "Svelte UI library",
5
5
  "tagline": "friendly user zystem",
6
6
  "glyph": "🧶",
@@ -63,10 +63,10 @@
63
63
  "devDependencies": {
64
64
  "@changesets/changelog-git": "^0.2.1",
65
65
  "@fuzdev/blake3_wasm": "^0.1.1",
66
- "@fuzdev/fuz_code": "^0.47.0",
66
+ "@fuzdev/fuz_code": "^0.48.0",
67
67
  "@fuzdev/fuz_css": "^0.63.2",
68
68
  "@fuzdev/fuz_util": "^0.65.2",
69
- "@fuzdev/gro": "^0.206.0",
69
+ "@fuzdev/gro": "^0.209.0",
70
70
  "@fuzdev/mdz": "^0.3.0",
71
71
  "@ryanatkn/eslint-config": "^0.12.2",
72
72
  "@sveltejs/adapter-static": "^3.0.10",
@@ -79,8 +79,6 @@
79
79
  "eslint-plugin-svelte": "^3.19.0",
80
80
  "esm-env": "^1.2.2",
81
81
  "jsdom": "^29.1.1",
82
- "prettier": "^3.7.4",
83
- "prettier-plugin-svelte": "^3.5.1",
84
82
  "svelte": "^5.56.4",
85
83
  "svelte-check": "^4.7.2",
86
84
  "svelte-docinfo": "^0.5.4",
@@ -91,23 +89,6 @@
91
89
  "vitest": "^4.0.15",
92
90
  "zod": "^4.3.6"
93
91
  },
94
- "prettier": {
95
- "plugins": [
96
- "prettier-plugin-svelte"
97
- ],
98
- "useTabs": true,
99
- "printWidth": 100,
100
- "singleQuote": true,
101
- "bracketSpacing": false,
102
- "overrides": [
103
- {
104
- "files": "package.json",
105
- "options": {
106
- "useTabs": false
107
- }
108
- }
109
- ]
110
- },
111
92
  "sideEffects": [
112
93
  "**/*.css"
113
94
  ],
package/src/lib/alert.ts CHANGED
@@ -8,7 +8,7 @@ export interface AlertStatusOptions {
8
8
  }
9
9
 
10
10
  export const alert_status_options: Record<AlertStatus, AlertStatusOptions> = {
11
- inform: {color: 'var(--text_70)', icon: '✻'},
12
- help: {color: 'var(--color_b_50)', icon: '➺'},
13
- error: {color: 'var(--color_c_50)', icon: '!?'},
11
+ inform: { color: 'var(--text_70)', icon: '✻' },
12
+ help: { color: 'var(--color_b_50)', icon: '➺' },
13
+ error: { color: 'var(--color_c_50)', icon: '!?' }
14
14
  };
@@ -1,6 +1,6 @@
1
- import type {Declaration} from './declaration.svelte.ts';
2
- import type {Library} from './library.svelte.ts';
3
- import type {Module} from './module.svelte.ts';
1
+ import type { Declaration } from './declaration.svelte.ts';
2
+ import type { Library } from './library.svelte.ts';
3
+ import type { Module } from './module.svelte.ts';
4
4
 
5
5
  export interface DeclarationSearchState {
6
6
  query: string;
@@ -59,7 +59,7 @@ export const create_api_search = (library: Library): ApiSearchState => {
59
59
  },
60
60
  get filtered() {
61
61
  return filtered_modules;
62
- },
62
+ }
63
63
  },
64
64
  declarations: {
65
65
  get all() {
@@ -67,8 +67,8 @@ export const create_api_search = (library: Library): ApiSearchState => {
67
67
  },
68
68
  get filtered() {
69
69
  return filtered_declarations;
70
- },
71
- },
70
+ }
71
+ }
72
72
  };
73
73
  };
74
74
 
@@ -76,7 +76,7 @@ export const create_api_search = (library: Library): ApiSearchState => {
76
76
  * Creates search state for module-specific declaration lists.
77
77
  */
78
78
  export const create_module_declaration_search = (
79
- declarations: Array<Declaration>,
79
+ declarations: Array<Declaration>
80
80
  ): DeclarationSearchState => {
81
81
  let query = $state.raw('');
82
82
 
@@ -96,9 +96,7 @@ export const create_module_declaration_search = (
96
96
 
97
97
  return terms.every(
98
98
  (term) =>
99
- name_lower.includes(term) ||
100
- kind_lower.includes(term) ||
101
- module_path_lower.includes(term),
99
+ name_lower.includes(term) || kind_lower.includes(term) || module_path_lower.includes(term)
102
100
  );
103
101
  });
104
102
 
@@ -117,6 +115,6 @@ export const create_module_declaration_search = (
117
115
  },
118
116
  get filtered() {
119
117
  return filtered;
120
- },
118
+ }
121
119
  };
122
120
  };
@@ -4,7 +4,7 @@
4
4
  * @module
5
5
  */
6
6
 
7
- import type {Attachment} from 'svelte/attachments';
7
+ import type { Attachment } from 'svelte/attachments';
8
8
 
9
9
  /**
10
10
  * Creates an attachment that focuses the element on mount.
@@ -16,5 +16,5 @@ export const autofocus =
16
16
  (options?: FocusOptions): Attachment<HTMLElement | SVGElement> =>
17
17
  (el) => {
18
18
  // focusVisible missing from TS lib.dom.d.ts as of 5.9
19
- el.focus({focusVisible: true, ...options} as FocusOptions);
19
+ el.focus({ focusVisible: true, ...options } as FocusOptions);
20
20
  };
@@ -1,4 +1,4 @@
1
- import {getContext, setContext} from 'svelte';
1
+ import { getContext, setContext } from 'svelte';
2
2
 
3
3
  // This uses a function instead of a class because of the overloaded type signatures.
4
4
  // It could be implemented internally with a class like `SvelteContext`
@@ -42,6 +42,6 @@ export function create_context<T>(fallback?: () => T): {
42
42
  },
43
43
  get_maybe,
44
44
  // this is typesafe, so no runtime check:
45
- set: (value: T | undefined = fallback?.()) => setContext(key, value)!,
45
+ set: (value: T | undefined = fallback?.()) => setContext(key, value)!
46
46
  };
47
47
  }
@@ -1,12 +1,12 @@
1
- import {is_editable, swallow, inside_editable} from '@fuzdev/fuz_util/dom.ts';
2
- import {EMPTY_OBJECT} from '@fuzdev/fuz_util/object.ts';
3
- import type {Attachment} from 'svelte/attachments';
4
- import type {ComponentProps, Snippet} from 'svelte';
1
+ import { is_editable, swallow, inside_editable } from '@fuzdev/fuz_util/dom.ts';
2
+ import { EMPTY_OBJECT } from '@fuzdev/fuz_util/object.ts';
3
+ import type { Attachment } from 'svelte/attachments';
4
+ import type { ComponentProps, Snippet } from 'svelte';
5
5
 
6
6
  import {
7
7
  contextmenu_open,
8
8
  type ContextmenuOpenOptions,
9
- type ContextmenuState,
9
+ type ContextmenuState
10
10
  } from './contextmenu_state.svelte.ts';
11
11
  import type ContextmenuLinkEntry from './ContextmenuLinkEntry.svelte';
12
12
  import type ContextmenuTextEntry from './ContextmenuTextEntry.svelte';
@@ -91,7 +91,7 @@ export interface ContextmenuRootBaseProps {
91
91
  */
92
92
  export const contextmenu_is_valid_target = (
93
93
  target: EventTarget | null,
94
- shiftKey: boolean,
94
+ shiftKey: boolean
95
95
  ): target is HTMLElement | SVGElement =>
96
96
  !shiftKey &&
97
97
  (target instanceof HTMLElement || target instanceof SVGElement) &&
@@ -101,7 +101,7 @@ export const contextmenu_is_valid_target = (
101
101
  // TODO maybe bind these to the contextmenu instance instead of including the function wrapper
102
102
  // TODO customize
103
103
  export const contextmenu_create_keyboard_handlers = (
104
- contextmenu: ContextmenuState,
104
+ contextmenu: ContextmenuState
105
105
  ): Map<string, () => void> =>
106
106
  new Map([
107
107
  ['Escape', () => contextmenu.close()],
@@ -112,7 +112,7 @@ export const contextmenu_create_keyboard_handlers = (
112
112
  ['Home', () => contextmenu.select_first()],
113
113
  ['End', () => contextmenu.select_last()],
114
114
  [' ', () => contextmenu.activate_selected()],
115
- ['Enter', () => contextmenu.activate_selected()],
115
+ ['Enter', () => contextmenu.activate_selected()]
116
116
  ]);
117
117
 
118
118
  export const contextmenu_create_keydown_handler =
@@ -132,7 +132,7 @@ export const contextmenu_create_keydown_handler =
132
132
  export const contextmenu_calculate_constrained_x = (
133
133
  menu_x: number,
134
134
  menu_width: number,
135
- layout_width: number,
135
+ layout_width: number
136
136
  ): number => Math.max(0, menu_x + Math.min(0, layout_width - (menu_x + menu_width)));
137
137
 
138
138
  /**
@@ -143,7 +143,7 @@ export const contextmenu_calculate_constrained_x = (
143
143
  export const contextmenu_calculate_constrained_y = (
144
144
  menu_y: number,
145
145
  menu_height: number,
146
- layout_height: number,
146
+ layout_height: number
147
147
  ): number => Math.max(0, menu_y + Math.min(0, layout_height - (menu_y + menu_height)));
148
148
 
149
149
  export interface ContextmenuSubmenuTranslateOptions {
@@ -174,9 +174,9 @@ export interface ContextmenuSubmenuTranslateOptions {
174
174
  * Used by `ContextmenuSubmenu.svelte`.
175
175
  */
176
176
  export const contextmenu_calculate_submenu_translate = (
177
- options: ContextmenuSubmenuTranslateOptions,
178
- ): {x: number; y: number} => {
179
- const {base_x, base_y, width, height, parent_width, layout_width, layout_height} = options;
177
+ options: ContextmenuSubmenuTranslateOptions
178
+ ): { x: number; y: number } => {
179
+ const { base_x, base_y, width, height, parent_width, layout_width, layout_height } = options;
180
180
  let x: number;
181
181
  const overflow_right = base_x + width + parent_width - layout_width;
182
182
  if (overflow_right <= 0) {
@@ -192,7 +192,7 @@ export const contextmenu_calculate_submenu_translate = (
192
192
  }
193
193
  }
194
194
  const y = Math.min(0, layout_height - (base_y + height));
195
- return {x, y};
195
+ return { x, y };
196
196
  };
197
197
 
198
198
  export interface ContextmenuOpenFromEventOptions extends ContextmenuOpenOptions {
@@ -221,13 +221,13 @@ export const contextmenu_open_from_event = (
221
221
  e: MouseEvent,
222
222
  contextmenu: ContextmenuState,
223
223
  menu_el: HTMLElement | undefined,
224
- options?: ContextmenuOpenFromEventOptions,
224
+ options?: ContextmenuOpenFromEventOptions
225
225
  ): boolean => {
226
226
  const {
227
227
  open_offset_x = CONTEXTMENU_DEFAULT_OPEN_OFFSET_X,
228
- open_offset_y = CONTEXTMENU_DEFAULT_OPEN_OFFSET_Y,
228
+ open_offset_y = CONTEXTMENU_DEFAULT_OPEN_OFFSET_Y
229
229
  } = options ?? EMPTY_OBJECT;
230
- const {target} = e;
230
+ const { target } = e;
231
231
  if (!contextmenu_is_valid_target(target, e.shiftKey)) return false;
232
232
  // don't open the contextmenu when clicking on the menu itself
233
233
  if (menu_el?.contains(target)) return false;
@@ -237,7 +237,7 @@ export const contextmenu_open_from_event = (
237
237
  e.clientX + open_offset_x,
238
238
  e.clientY + open_offset_y,
239
239
  contextmenu,
240
- options,
240
+ options
241
241
  )
242
242
  ) {
243
243
  return false;
@@ -266,7 +266,7 @@ export const contextmenu_resolve_contextmenu_event = (
266
266
  contextmenu: ContextmenuState,
267
267
  menu_el: HTMLElement | undefined,
268
268
  open_guard: ContextmenuOpenGuard,
269
- options?: ContextmenuOpenFromEventOptions,
269
+ options?: ContextmenuOpenFromEventOptions
270
270
  ): boolean => {
271
271
  if (contextmenu_open_from_event(e, contextmenu, menu_el, options)) {
272
272
  // guard the menu from the residual events of the gesture that opened it
@@ -313,7 +313,7 @@ export const contextmenu_create_mousedown_handler =
313
313
  (
314
314
  contextmenu: ContextmenuState,
315
315
  get_menu_el: () => HTMLElement | undefined,
316
- open_guard?: ContextmenuOpenGuard,
316
+ open_guard?: ContextmenuOpenGuard
317
317
  ) =>
318
318
  (e: MouseEvent): void => {
319
319
  const menu_el = get_menu_el();
@@ -352,7 +352,7 @@ export const contextmenu_create_mousedown_handler =
352
352
  * doesn't need a host
353
353
  */
354
354
  export const contextmenu_resolve_popover_host = (
355
- target: HTMLElement | SVGElement | undefined,
355
+ target: HTMLElement | SVGElement | undefined
356
356
  ): HTMLDialogElement | null =>
357
357
  (target?.closest('dialog:modal') as HTMLDialogElement | null) ?? null;
358
358