@hirobius/design-system 0.13.0 → 0.14.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 (74) hide show
  1. package/NOTICE.md +9 -0
  2. package/README.md +109 -43
  3. package/dist/contexts.js +62 -60
  4. package/dist/hirobius-ui.js +6810 -5807
  5. package/dist/manifest.js +5 -5
  6. package/dist/static.css +1 -1
  7. package/dist/styles.css +1 -1
  8. package/dist/tokens.css +1 -1
  9. package/dist/tokens.js +2 -2
  10. package/dist/types/src/app/components/activity-feed.d.ts +6 -0
  11. package/dist/types/src/app/components/alert.d.ts +1 -0
  12. package/dist/types/src/app/components/avatar.d.ts +1 -0
  13. package/dist/types/src/app/components/badge.d.ts +1 -0
  14. package/dist/types/src/app/components/box.d.ts +2 -2
  15. package/dist/types/src/app/components/breadcrumb.d.ts +1 -0
  16. package/dist/types/src/app/components/button.d.ts +1 -0
  17. package/dist/types/src/app/components/callout.d.ts +1 -0
  18. package/dist/types/src/app/components/card.d.ts +7 -2
  19. package/dist/types/src/app/components/checkbox.d.ts +1 -0
  20. package/dist/types/src/app/components/code-block.d.ts +1 -0
  21. package/dist/types/src/app/components/combobox.d.ts +1 -0
  22. package/dist/types/src/app/components/dialog.d.ts +5 -0
  23. package/dist/types/src/app/components/disclosure.d.ts +1 -0
  24. package/dist/types/src/app/components/divider.d.ts +4 -0
  25. package/dist/types/src/app/components/empty-state.d.ts +1 -0
  26. package/dist/types/src/app/components/field.d.ts +1 -0
  27. package/dist/types/src/app/components/form.d.ts +7 -1
  28. package/dist/types/src/app/components/icon-button.d.ts +2 -2
  29. package/dist/types/src/app/components/icon.d.ts +1 -1
  30. package/dist/types/src/app/components/inline-code.d.ts +3 -0
  31. package/dist/types/src/app/components/inline-link.d.ts +1 -0
  32. package/dist/types/src/app/components/input.d.ts +1 -0
  33. package/dist/types/src/app/components/menu.d.ts +1 -0
  34. package/dist/types/src/app/components/nav-group.d.ts +2 -2
  35. package/dist/types/src/app/components/nav-item.d.ts +1 -1
  36. package/dist/types/src/app/components/pagination.d.ts +1 -0
  37. package/dist/types/src/app/components/popover.d.ts +1 -0
  38. package/dist/types/src/app/components/progress.d.ts +1 -0
  39. package/dist/types/src/app/components/radio.d.ts +1 -0
  40. package/dist/types/src/app/components/skeleton.d.ts +1 -0
  41. package/dist/types/src/app/components/slider.d.ts +1 -0
  42. package/dist/types/src/app/components/spinner.d.ts +1 -0
  43. package/dist/types/src/app/components/stack.d.ts +1 -1
  44. package/dist/types/src/app/components/stat.d.ts +1 -0
  45. package/dist/types/src/app/components/status-list-item.d.ts +1 -0
  46. package/dist/types/src/app/components/status-tile.d.ts +1 -0
  47. package/dist/types/src/app/components/surface.d.ts +1 -1
  48. package/dist/types/src/app/components/table.d.ts +1 -0
  49. package/dist/types/src/app/components/tabs.d.ts +6 -0
  50. package/dist/types/src/app/components/tag.d.ts +1 -0
  51. package/dist/types/src/app/components/textarea.d.ts +1 -0
  52. package/dist/types/src/app/components/toast.d.ts +1 -0
  53. package/dist/types/src/app/components/toggle.d.ts +1 -0
  54. package/dist/types/src/app/context/TenantContext.d.ts +20 -6
  55. package/dist/types/src/app/context/index.d.ts +7 -7
  56. package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -2
  57. package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -3
  58. package/dist/types/src/app/design-system/theme.d.ts +1 -1
  59. package/dist/types/src/app/design-system/tokens.d.ts +2 -2
  60. package/dist/types/src/app/hooks/useHdsMotion.d.ts +16 -0
  61. package/dist/types/src/app/hooks/useReducedMotion.d.ts +1 -0
  62. package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +1 -1
  63. package/dist/types/src/app/lib/hds-search.d.ts +1 -1
  64. package/dist/types/src/brand/index.d.ts +1 -1
  65. package/dist/types/src/form/index.d.ts +3 -3
  66. package/dist/types/src/index.d.ts +253 -118
  67. package/dist/types/src/lib/env.d.ts +31 -0
  68. package/dist/types/src/lib/manifest-entry.d.ts +1 -1
  69. package/dist/types/src/scroll/index.d.ts +2 -2
  70. package/dist/variables.css +56 -34
  71. package/hirobius.tokens.json +200 -65
  72. package/package.json +56 -17
  73. package/public/hds-manifest.json +1575 -696
  74. /package/{LICENSE/main.tsx → LICENSE} +0 -0
@@ -329,5 +329,5 @@ declare const hds: {
329
329
  };
330
330
  /** @public */
331
331
  export default hds;
332
- export { ct } from './theme';
333
- export { tokenValues } from './generated-token-values';
332
+ export { ct } from './theme.js';
333
+ export { tokenValues } from './generated-token-values.js';
@@ -0,0 +1,16 @@
1
+ /** @internal — reactive `hds.motion.*` accessor; not part of the public API. */
2
+ /**
3
+ * useHdsMotion — the reactive read path for `hds.motion.*` (#190).
4
+ *
5
+ * `hds.motion.*` (src/app/design-system/tokens.ts) resolves duration as a
6
+ * static JS number computed once at module load, so a component that spreads
7
+ * it straight into a motion/react `transition` never collapses under
8
+ * `prefers-reduced-motion: reduce` — only the CSS custom-property path
9
+ * (Layer 1, theme.css) reacts automatically. Call this hook instead of
10
+ * reading `hds.motion.<category>` directly: it zeroes `duration` while
11
+ * useReducedMotion() is true, one fix point instead of a `MotionConfig`
12
+ * wrapper per component.
13
+ */
14
+ import hds from '../design-system/tokens.js';
15
+ export type HdsMotionCategory = keyof typeof hds.motion;
16
+ export declare function useHdsMotion<Category extends HdsMotionCategory>(category: Category): (typeof hds.motion)[Category];
@@ -0,0 +1 @@
1
+ export declare function useReducedMotion(): boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import { type DocLayoutContentMaxWidth } from './DocLayout';
2
+ import { type DocLayoutContentMaxWidth } from './DocLayout.js';
3
3
  /** @public */
4
4
  export declare function HdsSystemDocLayout({ contentSlot, contentMaxWidth, }: {
5
5
  contentSlot: ReactNode;
@@ -13,7 +13,7 @@
13
13
  * narrow interface): the UI shell now imports { buildIndex, rank } and owns no
14
14
  * search logic.
15
15
  */
16
- import type { ManifestSpec, RoleToken, SystemManifest } from '../data/manifest-types';
16
+ import type { ManifestSpec, RoleToken, SystemManifest } from '../data/manifest-types.js';
17
17
  export type { ManifestSpec, RoleToken, SystemManifest };
18
18
  export type ResultKind = 'component' | 'pattern' | 'template' | 'utility' | 'token' | 'section';
19
19
  export interface PaletteResult {
@@ -6,4 +6,4 @@
6
6
  * no React and no Node built-ins, so it is safe to pull into a build step or an
7
7
  * edge runtime. See ./overlay.ts and docs on the Astro consumption path.
8
8
  */
9
- export { brandOverlayVars, brandOverlayStyle, brandOverlayCss, type BrandPalette } from './overlay';
9
+ export { brandOverlayVars, brandOverlayStyle, brandOverlayCss, type BrandPalette } from './overlay.js';
@@ -25,6 +25,6 @@
25
25
  *
26
26
  * @doc-ignore subpath barrel, not an HDS component
27
27
  */
28
- export { useHdsForm } from './use-hds-form';
29
- export { HdsForm, HdsFormField } from './hds-form';
30
- export type { HdsFormProps, HdsFormFieldProps, HdsFieldRenderProps } from './hds-form';
28
+ export { useHdsForm } from './use-hds-form.js';
29
+ export { HdsForm, HdsFormField } from './hds-form.js';
30
+ export type { HdsFormProps, HdsFormFieldProps, HdsFieldRenderProps } from './hds-form.js';
@@ -1,114 +1,114 @@
1
- export * from './app/components/alert';
2
- export * from './app/components/asset-img';
3
- export * from './app/components/avatar';
4
- export * from './app/components/badge';
5
- export * from './app/components/box';
6
- export * from './app/components/button';
7
- export * from './app/components/callout';
8
- export * from './app/components/field';
9
- export * from './app/components/stat';
10
- export * from './app/components/status-list-item';
11
- export * from './app/components/card';
12
- export * from './app/components/cinematic-link';
13
- export * from './app/components/code-block';
14
- export * from './app/components/component-instance-matrix';
15
- export * from './app/components/container';
16
- export * from './app/components/dialog';
17
- export * from './app/components/divider';
18
- export * from './app/components/menu';
19
- export * from './app/components/popover';
20
- export * from './app/components/hds-tooltip';
21
- export * from './app/components/doc-link-card';
22
- export * from './app/components/grid';
23
- export * from './app/components/heading-stack';
24
- export * from './app/components/history-card';
25
- export * from './app/components/icon';
26
- export * from './app/components/inline-code';
27
- export * from './app/components/inline-link';
28
- export * from './app/components/input';
29
- export * from './app/components/textarea';
30
- export * from './app/components/checkbox';
31
- export * from './app/components/radio';
32
- export * from './app/components/slider';
33
- export * from './app/components/toggle';
34
- export * from './app/components/nav-item';
35
- export * from './app/components/progress';
36
- export * from './app/components/skeleton';
37
- export * from './app/components/spinner';
38
- export * from './app/components/segmented-control';
39
- export * from './app/components/stack';
40
- export * from './app/components/surface';
41
- export * from './app/components/table';
42
- export * from './app/components/tag';
43
- export * from './app/components/text';
44
- export * from './app/components/token';
45
- export * from './app/components/kbd';
46
- export * from './app/components/status-dot';
47
- export * from './app/components/timestamp';
48
- export * from './app/components/blockquote';
49
- export * from './app/components/visually-hidden';
50
- export * from './app/components/avatar-group';
51
- export * from './app/components/button-group';
52
- export * from './app/components/input-group';
53
- export * from './app/components/circular-progress';
54
- export * from './app/components/toggle-button';
55
- export * from './app/components/aspect-ratio';
56
- export * from './app/components/alert-dialog';
57
- export * from './app/components/hover-card';
58
- export * from './app/components/context-menu';
59
- export * from './app/components/side-nav';
60
- export * from './app/components/command-palette';
61
- export * from './app/components/image-lightbox';
62
- export * from './app/components/metadata-list';
63
- export * from './app/components/overflow-list';
64
- export * from './app/components/top-nav';
65
- export * from './app/components/app-shell';
66
- export * from './app/components/selectable-card';
67
- export * from './app/components/tokenizer';
68
- export * from './app/components/file-input';
69
- export * from './app/components/multi-selector';
70
- export * from './app/components/toolbar';
71
- export * from './app/components/tree-list';
72
- export * from './app/components/stepper';
73
- export * from './app/components/carousel';
74
- export * from './app/components/calendar';
75
- export * from './app/components/time-input';
76
- export * from './app/components/date-input';
77
- export * from './app/components/date-range-input';
78
- export * from './app/components/date-time-input';
79
- export * from './app/components/cluster';
80
- export * from './app/components/center';
81
- export * from './app/components/sidebar';
82
- export * from './app/components/switcher';
83
- export * from './app/components/cover';
84
- export * from './app/components/frame';
85
- export * from './app/components/bleed';
86
- export * from './app/components/reveal';
87
- export * from './app/components/pin';
88
- export * from './app/components/page';
89
- export * from './app/components/empty-state';
90
- export * from './app/components/error-boundary';
91
- export * from './app/components/not-found-pattern';
92
- export * from './app/components/tabs';
93
- export * from './app/components/tile-grid';
94
- export * from './app/components/status-tile';
95
- export * from './app/components/activity-feed';
96
- export * from './app/components/breadcrumb';
97
- export * from './app/components/combobox';
98
- export * from './app/components/disclosure';
99
- export * from './app/components/form';
100
- export * from './app/components/foundation-swatch';
101
- export * from './app/components/icon-button';
102
- export * from './app/components/nav-group';
103
- export * from './app/components/pagination';
104
- export * from './app/components/sketch';
105
- export * from './app/components/stepper-field';
106
- export * from './app/components/text-lockup';
107
- export * from './app/components/toast';
108
- export * from './app/layouts/CaseStudyLayout';
109
- export * from './app/components/error-pattern';
110
- export * from './app/layouts/HdsSystemDocLayout';
111
- export { default as hds } from './app/design-system/tokens';
1
+ export * from './app/components/alert.js';
2
+ export * from './app/components/asset-img.js';
3
+ export * from './app/components/avatar.js';
4
+ export * from './app/components/badge.js';
5
+ export * from './app/components/box.js';
6
+ export * from './app/components/button.js';
7
+ export * from './app/components/callout.js';
8
+ export * from './app/components/field.js';
9
+ export * from './app/components/stat.js';
10
+ export * from './app/components/status-list-item.js';
11
+ export * from './app/components/card.js';
12
+ export * from './app/components/cinematic-link.js';
13
+ export * from './app/components/code-block.js';
14
+ export * from './app/components/component-instance-matrix.js';
15
+ export * from './app/components/container.js';
16
+ export * from './app/components/dialog.js';
17
+ export * from './app/components/divider.js';
18
+ export * from './app/components/menu.js';
19
+ export * from './app/components/popover.js';
20
+ export * from './app/components/hds-tooltip.js';
21
+ export * from './app/components/doc-link-card.js';
22
+ export * from './app/components/grid.js';
23
+ export * from './app/components/heading-stack.js';
24
+ export * from './app/components/history-card.js';
25
+ export * from './app/components/icon.js';
26
+ export * from './app/components/inline-code.js';
27
+ export * from './app/components/inline-link.js';
28
+ export * from './app/components/input.js';
29
+ export * from './app/components/textarea.js';
30
+ export * from './app/components/checkbox.js';
31
+ export * from './app/components/radio.js';
32
+ export * from './app/components/slider.js';
33
+ export * from './app/components/toggle.js';
34
+ export * from './app/components/nav-item.js';
35
+ export * from './app/components/progress.js';
36
+ export * from './app/components/skeleton.js';
37
+ export * from './app/components/spinner.js';
38
+ export * from './app/components/segmented-control.js';
39
+ export * from './app/components/stack.js';
40
+ export * from './app/components/surface.js';
41
+ export * from './app/components/table.js';
42
+ export * from './app/components/tag.js';
43
+ export * from './app/components/text.js';
44
+ export * from './app/components/token.js';
45
+ export * from './app/components/kbd.js';
46
+ export * from './app/components/status-dot.js';
47
+ export * from './app/components/timestamp.js';
48
+ export * from './app/components/blockquote.js';
49
+ export * from './app/components/visually-hidden.js';
50
+ export * from './app/components/avatar-group.js';
51
+ export * from './app/components/button-group.js';
52
+ export * from './app/components/input-group.js';
53
+ export * from './app/components/circular-progress.js';
54
+ export * from './app/components/toggle-button.js';
55
+ export * from './app/components/aspect-ratio.js';
56
+ export * from './app/components/alert-dialog.js';
57
+ export * from './app/components/hover-card.js';
58
+ export * from './app/components/context-menu.js';
59
+ export * from './app/components/side-nav.js';
60
+ export * from './app/components/command-palette.js';
61
+ export * from './app/components/image-lightbox.js';
62
+ export * from './app/components/metadata-list.js';
63
+ export * from './app/components/overflow-list.js';
64
+ export * from './app/components/top-nav.js';
65
+ export * from './app/components/app-shell.js';
66
+ export * from './app/components/selectable-card.js';
67
+ export * from './app/components/tokenizer.js';
68
+ export * from './app/components/file-input.js';
69
+ export * from './app/components/multi-selector.js';
70
+ export * from './app/components/toolbar.js';
71
+ export * from './app/components/tree-list.js';
72
+ export * from './app/components/stepper.js';
73
+ export * from './app/components/carousel.js';
74
+ export * from './app/components/calendar.js';
75
+ export * from './app/components/time-input.js';
76
+ export * from './app/components/date-input.js';
77
+ export * from './app/components/date-range-input.js';
78
+ export * from './app/components/date-time-input.js';
79
+ export * from './app/components/cluster.js';
80
+ export * from './app/components/center.js';
81
+ export * from './app/components/sidebar.js';
82
+ export * from './app/components/switcher.js';
83
+ export * from './app/components/cover.js';
84
+ export * from './app/components/frame.js';
85
+ export * from './app/components/bleed.js';
86
+ export * from './app/components/reveal.js';
87
+ export * from './app/components/pin.js';
88
+ export * from './app/components/page.js';
89
+ export * from './app/components/empty-state.js';
90
+ export * from './app/components/error-boundary.js';
91
+ export * from './app/components/not-found-pattern.js';
92
+ export * from './app/components/tabs.js';
93
+ export * from './app/components/tile-grid.js';
94
+ export * from './app/components/status-tile.js';
95
+ export * from './app/components/activity-feed.js';
96
+ export * from './app/components/breadcrumb.js';
97
+ export * from './app/components/combobox.js';
98
+ export * from './app/components/disclosure.js';
99
+ export * from './app/components/form.js';
100
+ export * from './app/components/foundation-swatch.js';
101
+ export * from './app/components/icon-button.js';
102
+ export * from './app/components/nav-group.js';
103
+ export * from './app/components/pagination.js';
104
+ export * from './app/components/sketch.js';
105
+ export * from './app/components/stepper-field.js';
106
+ export * from './app/components/text-lockup.js';
107
+ export * from './app/components/toast.js';
108
+ export * from './app/layouts/CaseStudyLayout.js';
109
+ export * from './app/components/error-pattern.js';
110
+ export * from './app/layouts/HdsSystemDocLayout.js';
111
+ export { default as hds } from './app/design-system/tokens.js';
112
112
  /** Raw DTCG design tokens (the contents of `hirobius.tokens.json`). */
113
113
  export declare const tokens: {
114
114
  $schema: string;
@@ -652,13 +652,13 @@ export declare const tokens: {
652
652
  value: number;
653
653
  unit: string;
654
654
  };
655
+ $description: string;
655
656
  };
656
- "7xl": {
657
+ "6xl": {
657
658
  $value: {
658
659
  value: number;
659
660
  unit: string;
660
661
  };
661
- $description: string;
662
662
  };
663
663
  };
664
664
  weight: {
@@ -1158,6 +1158,66 @@ export declare const tokens: {
1158
1158
  };
1159
1159
  };
1160
1160
  };
1161
+ hover: {
1162
+ $value: string;
1163
+ $description: string;
1164
+ $extensions: {
1165
+ "com.figma.variables": {
1166
+ modes: {
1167
+ Light: string;
1168
+ Dark: string;
1169
+ };
1170
+ };
1171
+ };
1172
+ };
1173
+ pressed: {
1174
+ $value: string;
1175
+ $description: string;
1176
+ $extensions: {
1177
+ "com.figma.variables": {
1178
+ modes: {
1179
+ Light: string;
1180
+ Dark: string;
1181
+ };
1182
+ };
1183
+ };
1184
+ };
1185
+ selected: {
1186
+ $value: string;
1187
+ $description: string;
1188
+ $extensions: {
1189
+ "com.figma.variables": {
1190
+ modes: {
1191
+ Light: string;
1192
+ Dark: string;
1193
+ };
1194
+ };
1195
+ };
1196
+ };
1197
+ muted: {
1198
+ $value: string;
1199
+ $description: string;
1200
+ $extensions: {
1201
+ "com.figma.variables": {
1202
+ modes: {
1203
+ Light: string;
1204
+ Dark: string;
1205
+ };
1206
+ };
1207
+ };
1208
+ };
1209
+ sunken: {
1210
+ $value: string;
1211
+ $description: string;
1212
+ $extensions: {
1213
+ "com.figma.variables": {
1214
+ modes: {
1215
+ Light: string;
1216
+ Dark: string;
1217
+ };
1218
+ };
1219
+ };
1220
+ };
1161
1221
  };
1162
1222
  content: {
1163
1223
  primary: {
@@ -1206,6 +1266,7 @@ export declare const tokens: {
1206
1266
  };
1207
1267
  accent: {
1208
1268
  $value: string;
1269
+ $description: string;
1209
1270
  $extensions: {
1210
1271
  "com.figma.variables": {
1211
1272
  modes: {
@@ -1217,6 +1278,43 @@ export declare const tokens: {
1217
1278
  };
1218
1279
  onAccent: {
1219
1280
  $value: string;
1281
+ $description: string;
1282
+ $extensions: {
1283
+ "com.figma.variables": {
1284
+ modes: {
1285
+ Light: string;
1286
+ Dark: string;
1287
+ };
1288
+ };
1289
+ };
1290
+ };
1291
+ success: {
1292
+ $value: string;
1293
+ $description: string;
1294
+ $extensions: {
1295
+ "com.figma.variables": {
1296
+ modes: {
1297
+ Light: string;
1298
+ Dark: string;
1299
+ };
1300
+ };
1301
+ };
1302
+ };
1303
+ warning: {
1304
+ $value: string;
1305
+ $description: string;
1306
+ $extensions: {
1307
+ "com.figma.variables": {
1308
+ modes: {
1309
+ Light: string;
1310
+ Dark: string;
1311
+ };
1312
+ };
1313
+ };
1314
+ };
1315
+ danger: {
1316
+ $value: string;
1317
+ $description: string;
1220
1318
  $extensions: {
1221
1319
  "com.figma.variables": {
1222
1320
  modes: {
@@ -1239,6 +1337,18 @@ export declare const tokens: {
1239
1337
  };
1240
1338
  };
1241
1339
  };
1340
+ interactive: {
1341
+ $value: string;
1342
+ $description: string;
1343
+ $extensions: {
1344
+ "com.figma.variables": {
1345
+ modes: {
1346
+ Light: string;
1347
+ Dark: string;
1348
+ };
1349
+ };
1350
+ };
1351
+ };
1242
1352
  subdued: {
1243
1353
  $value: string;
1244
1354
  $extensions: {
@@ -1275,6 +1385,31 @@ export declare const tokens: {
1275
1385
  };
1276
1386
  accent: {
1277
1387
  $value: string;
1388
+ $description: string;
1389
+ $extensions: {
1390
+ "com.figma.variables": {
1391
+ modes: {
1392
+ Light: string;
1393
+ Dark: string;
1394
+ };
1395
+ };
1396
+ };
1397
+ };
1398
+ success: {
1399
+ $value: string;
1400
+ $description: string;
1401
+ $extensions: {
1402
+ "com.figma.variables": {
1403
+ modes: {
1404
+ Light: string;
1405
+ Dark: string;
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ warning: {
1411
+ $value: string;
1412
+ $description: string;
1278
1413
  $extensions: {
1279
1414
  "com.figma.variables": {
1280
1415
  modes: {
@@ -2419,8 +2554,8 @@ export declare const tokens: {
2419
2554
  };
2420
2555
  };
2421
2556
  };
2422
- export { cn } from './lib/utils';
2423
- export { HdsThemeProvider, useHdsTheme } from './app/context/hds-theme';
2424
- export type { HdsTheme, HdsDensity, HdsThemeValue, HdsThemeProviderProps, } from './app/context/hds-theme';
2425
- export { HdsRouterProvider, useHdsRouter } from './app/context/RouterContext';
2426
- export type { HdsRouterAdapter, HdsRouterProviderProps, HdsLinkComponent, HdsLinkProps, HdsNavigateOptions, } from './app/context/RouterContext';
2557
+ export { cn } from './lib/utils.js';
2558
+ export { HdsThemeProvider, useHdsTheme } from './app/context/hds-theme.js';
2559
+ export type { HdsTheme, HdsDensity, HdsThemeValue, HdsThemeProviderProps, } from './app/context/hds-theme.js';
2560
+ export { HdsRouterProvider, useHdsRouter } from './app/context/RouterContext.js';
2561
+ export type { HdsRouterAdapter, HdsRouterProviderProps, HdsLinkComponent, HdsLinkProps, HdsNavigateOptions, } from './app/context/RouterContext.js';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Build-environment checks that survive being published.
3
+ *
4
+ * Shipped library code must never read `import.meta.env`. Vite's library build
5
+ * evaluates it at HDS's build time, not the consumer's, so `import.meta.env.DEV`
6
+ * bakes to `false` and `.PROD` to `true` inside `dist/` — turning every guard
7
+ * written against them into a constant for everyone who installs the package.
8
+ *
9
+ * `process.env.NODE_ENV` is the replacement because consumer bundlers
10
+ * substitute that exact member expression at THEIR build time, which is the
11
+ * moment that actually knows the answer. Vite, webpack, Next and esbuild all do
12
+ * it by default; plain Rollup needs `@rollup/plugin-replace` configured, so this
13
+ * is a convention rather than a guarantee, and the fallback below is what makes
14
+ * it safe when nobody substituted anything.
15
+ *
16
+ * READ THE SHAPE BEFORE CHANGING IT. The substitution replaces the member
17
+ * expression and nothing around it, so wrapping the read in `typeof process !==
18
+ * 'undefined' && ...` leaves a runtime check that a browser bundle always fails,
19
+ * inverting the answer in a production build. The bare read inside a `try` is
20
+ * substituted cleanly and the `catch` covers the one runtime that has no
21
+ * `process` at all: native ESM in a browser with no bundler. That runtime is
22
+ * always a real page, never a dev build, so it resolves to production and gets
23
+ * no warnings. Measured output and the reasoning live in `env.test.ts`, which
24
+ * fails if this shape is undone.
25
+ *
26
+ * Guarded by `src/lib/env.test.ts` and `tests/no-shipped-import-meta-env.test.ts`.
27
+ */
28
+ /** True when the CONSUMER built for production, or when there is no build at all. */
29
+ export declare function isProduction(): boolean;
30
+ /** True outside a consumer production build — the gate for dev-only warnings. */
31
+ export declare function isDevelopment(): boolean;
@@ -1,3 +1,3 @@
1
- import type { SystemManifest } from '../app/data/manifest-types';
1
+ import type { SystemManifest } from '../app/data/manifest-types.js';
2
2
  declare const manifest: SystemManifest;
3
3
  export default manifest;
@@ -11,6 +11,6 @@
11
11
  * - `useScrollProgress` — Motion-based 0→1 scroll progress for a target element
12
12
  * (no new dependency; works with or without `SmoothScroll`).
13
13
  */
14
- export { SmoothScroll, type SmoothScrollProps, type SmoothScrollOptions } from './smooth-scroll';
15
- export { useScrollProgress, type UseScrollProgressOptions, type ScrollOffset, } from './use-scroll-progress';
14
+ export { SmoothScroll, type SmoothScrollProps, type SmoothScrollOptions } from './smooth-scroll.js';
15
+ export { useScrollProgress, type UseScrollProgressOptions, type ScrollOffset, } from './use-scroll-progress.js';
16
16
  export { useLenis } from 'lenis/react';