@epilot/zenith-react 0.1.0-next.0 → 0.1.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 (142) hide show
  1. package/README.md +95 -15
  2. package/dist/components/appearance-boundary/appearance-boundary.js +32 -34
  3. package/dist/components/appearance-boundary/appearance-boundary.js.map +1 -1
  4. package/dist/components/badge/badge.js +1 -1
  5. package/dist/components/badge/badge.js.map +1 -1
  6. package/dist/components/breadcrumb/breadcrumb.js +10 -10
  7. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  8. package/dist/components/button/button.js +28 -28
  9. package/dist/components/button/button.js.map +1 -1
  10. package/dist/components/button-group/button-group.js.map +1 -1
  11. package/dist/components/callout/callout.js +13 -13
  12. package/dist/components/callout/callout.js.map +1 -1
  13. package/dist/components/card/card.js.map +1 -1
  14. package/dist/components/checkbox/checkbox.js +13 -13
  15. package/dist/components/checkbox/checkbox.js.map +1 -1
  16. package/dist/components/code-block/code-block.js +6 -6
  17. package/dist/components/code-block/code-block.js.map +1 -1
  18. package/dist/components/code-editor/code-editor.js +1 -1
  19. package/dist/components/code-editor/code-editor.js.map +1 -1
  20. package/dist/components/code-editor/indent.js.map +1 -1
  21. package/dist/components/command/command.js +7 -13
  22. package/dist/components/command/command.js.map +1 -1
  23. package/dist/components/data-table/data-table-body.js +120 -66
  24. package/dist/components/data-table/data-table-body.js.map +1 -1
  25. package/dist/components/data-table/data-table-column-header.js +7 -7
  26. package/dist/components/data-table/data-table-column-header.js.map +1 -1
  27. package/dist/components/data-table/data-table-column-order.js +277 -0
  28. package/dist/components/data-table/data-table-column-order.js.map +1 -0
  29. package/dist/components/data-table/data-table-content.js +72 -58
  30. package/dist/components/data-table/data-table-content.js.map +1 -1
  31. package/dist/components/data-table/data-table-context.js +8 -4
  32. package/dist/components/data-table/data-table-context.js.map +1 -1
  33. package/dist/components/data-table/data-table-footer.js +31 -0
  34. package/dist/components/data-table/data-table-footer.js.map +1 -0
  35. package/dist/components/data-table/data-table-header-draggable.js +151 -0
  36. package/dist/components/data-table/data-table-header-draggable.js.map +1 -0
  37. package/dist/components/data-table/data-table-header.js +130 -57
  38. package/dist/components/data-table/data-table-header.js.map +1 -1
  39. package/dist/components/data-table/data-table-resize-handle.js +137 -0
  40. package/dist/components/data-table/data-table-resize-handle.js.map +1 -0
  41. package/dist/components/data-table/data-table.js +184 -156
  42. package/dist/components/data-table/data-table.js.map +1 -1
  43. package/dist/components/data-table/hooks/use-data-table-virtualizer.js +9 -0
  44. package/dist/components/data-table/hooks/use-data-table-virtualizer.js.map +1 -0
  45. package/dist/components/date-range-picker/date-range-picker.js +197 -195
  46. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  47. package/dist/components/date-time-picker/calendar.js +29 -29
  48. package/dist/components/date-time-picker/calendar.js.map +1 -1
  49. package/dist/components/date-time-picker/time-picker.js +55 -55
  50. package/dist/components/date-time-picker/time-picker.js.map +1 -1
  51. package/dist/components/density-provider/density-provider.js.map +1 -1
  52. package/dist/components/dialog/dialog.js +1 -1
  53. package/dist/components/dialog/dialog.js.map +1 -1
  54. package/dist/components/drawer/drawer.js +5 -5
  55. package/dist/components/drawer/drawer.js.map +1 -1
  56. package/dist/components/dropdown-menu/dropdown-menu.js +36 -36
  57. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  58. package/dist/components/field/field-combobox.js +4 -4
  59. package/dist/components/field/field-combobox.js.map +1 -1
  60. package/dist/components/field/field.js +40 -40
  61. package/dist/components/field/field.js.map +1 -1
  62. package/dist/components/label/label.js +0 -28
  63. package/dist/components/label/label.js.map +1 -1
  64. package/dist/components/list/list.js +42 -52
  65. package/dist/components/list/list.js.map +1 -1
  66. package/dist/components/option-card/option-card.js +27 -25
  67. package/dist/components/option-card/option-card.js.map +1 -1
  68. package/dist/components/pill/pill.js +9 -9
  69. package/dist/components/pill/pill.js.map +1 -1
  70. package/dist/components/radio/radio.js +14 -14
  71. package/dist/components/radio/radio.js.map +1 -1
  72. package/dist/components/scroll-area/scroll-area.js +9 -9
  73. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  74. package/dist/components/segmented-control/segmented-control.js +1 -1
  75. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  76. package/dist/components/select/select.js +11 -11
  77. package/dist/components/select/select.js.map +1 -1
  78. package/dist/components/separator/separator.js.map +1 -1
  79. package/dist/components/skeleton/skeleton.js.map +1 -1
  80. package/dist/components/slot/compose-as-child.js.map +1 -1
  81. package/dist/components/spinner/spinner.js.map +1 -1
  82. package/dist/components/switch/switch.js +11 -11
  83. package/dist/components/switch/switch.js.map +1 -1
  84. package/dist/components/table/table-pagination.js +1 -1
  85. package/dist/components/table/table-pagination.js.map +1 -1
  86. package/dist/components/table/table.js +15 -15
  87. package/dist/components/table/table.js.map +1 -1
  88. package/dist/components/text/text.js +10 -1
  89. package/dist/components/text/text.js.map +1 -1
  90. package/dist/components/toast/toast.js +30 -32
  91. package/dist/components/toast/toast.js.map +1 -1
  92. package/dist/components/toggle/toggle.js +20 -20
  93. package/dist/components/toggle/toggle.js.map +1 -1
  94. package/dist/delivery/index.d.ts +10 -44
  95. package/dist/delivery/index.js +5 -9
  96. package/dist/index.d.ts +1994 -2272
  97. package/dist/index.js +133 -121
  98. package/dist/index.js.map +1 -1
  99. package/dist/lib/clear-button.js.map +1 -1
  100. package/dist/lib/code-highlight.js.map +1 -1
  101. package/dist/lib/code-tokens.js.map +1 -1
  102. package/dist/lib/pagination.js.map +1 -1
  103. package/dist/packages/tokens/dist/delivery/index.js +18 -48
  104. package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
  105. package/dist/packages/tokens/dist/generated/core.generated.js +18 -0
  106. package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -0
  107. package/dist/packages/tokens/dist/generated/palette.generated.js +5 -5
  108. package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
  109. package/dist/packages/tokens/dist/install.js +9 -9
  110. package/dist/packages/tokens/dist/install.js.map +1 -1
  111. package/dist/styles/document-context.js.map +1 -1
  112. package/dist/styles/make-styles.js.map +1 -1
  113. package/dist/tokens/core.meta.generated.js +2 -2
  114. package/dist/tokens/core.meta.generated.js.map +1 -1
  115. package/dist/tokens/index.d.ts +1029 -1104
  116. package/dist/tokens/index.js +1031 -1106
  117. package/dist/tokens/index.js.map +1 -1
  118. package/dist/tokens/palette.generated.js +2 -2
  119. package/dist/tokens/palette.generated.js.map +1 -1
  120. package/dist/tokens/use-palette-tokens.js.map +1 -1
  121. package/dist/tokens.json +605 -755
  122. package/dist/vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js +385 -340
  123. package/dist/vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js.map +1 -1
  124. package/dist/vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js +344 -229
  125. package/dist/vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -1
  126. package/dist/vendor/.bun/@dnd-kit_utilities@3.2.2_62547eec5a2188e3/vendor/@dnd-kit/utilities/dist/utilities.esm.js +1 -1
  127. package/dist/vendor/.bun/@tanstack_react-virtual@3.11.2_6f4b9a1cfb20c0ae/vendor/@tanstack/react-virtual/dist/esm/index.js +36 -0
  128. package/dist/vendor/.bun/@tanstack_react-virtual@3.11.2_6f4b9a1cfb20c0ae/vendor/@tanstack/react-virtual/dist/esm/index.js.map +1 -0
  129. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js +450 -0
  130. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js.map +1 -0
  131. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/utils.js +50 -0
  132. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/utils.js.map +1 -0
  133. package/package.json +5 -4
  134. package/scripts/migration-diagnostics-core.mjs +19 -90
  135. package/scripts/migration-diagnostics.mjs +1 -16
  136. package/scripts/migration-sweep.mjs +2 -12
  137. package/ADOPTING.md +0 -73
  138. package/dist/packages/tokens/dist/delivery/internal.js +0 -181
  139. package/dist/packages/tokens/dist/delivery/internal.js.map +0 -1
  140. package/dist/packages/tokens/dist/generated/core.meta.generated.js +0 -10
  141. package/dist/packages/tokens/dist/generated/core.meta.generated.js.map +0 -1
  142. package/dist/token-assets/core/5cd4072decf5df2a664f0b1d5f2ec250a3309101ded3056c1f87c8bbe3738d50.css +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"make-styles.js","sources":["../../src/styles/make-styles.ts"],"sourcesContent":["import * as React from \"react\"\nimport {\n createZenithStylesRecipe as runtimeCreateZenithStylesRecipe,\n createZenithResetStylesRecipe as runtimeCreateZenithResetStylesRecipe,\n type GriffelResetStyle,\n type GriffelStyle,\n} from \"@epilot/zenith-runtime/v1\"\n\nimport { ensureCoreTokens } from \"../tokens/install\"\nimport { useZenithTargetDocument } from \"./document-context\"\n\n/**\n * The runtime's style hooks, with this package's token sheet attached.\n *\n * WHY THIS WRAPPER EXISTS, AND WHY IT IS NOT IN THE RUNTIME. Token installation used to sit inside\n * the renderer. It cannot any more, and not for a packaging reason: the runtime is SHARED, and\n * token values are exactly the thing that must diverge per component-package version — their\n * value-derived property namespace is what lets two versions declare on `:root` without colliding.\n * A shared module cannot own a per-version sheet. So the runtime owns placement (the recipe's\n * `install`, anchored) and this package owns content, and the two meet here.\n *\n * WHY COMMIT-PHASE, NOT RENDER-PHASE (WP2B2). Both calls used to run inline in this hook's body — a\n * side effect during React's render phase, which an abandoned render (Suspense, a superseded\n * transition) still executes even though nothing ever commits. `React.useInsertionEffect` is the\n * hook React documents for exactly this class of problem: it runs before any `useLayoutEffect` in\n * the tree (so token/atom sheets are present before any layout read), but its own timing relative to\n * a specific DOM mutation is NOT guaranteed either way, and it never runs during server rendering —\n * <https://react.dev/reference/react/useInsertionEffect>. `recipe.getClasses()` stays in the render\n * body: it is DOM-free preparation, not mathematically pure (no DOM access, no renderer acquisition\n * — see the recipe contract in `@epilot/zenith-runtime` — but Griffel's own definition/debug\n * bookkeeping still runs and still mutates shared, non-DOM state) and its output IS this render's\n * return value, so it cannot be deferred.\n *\n * NO DEPENDENCY ARRAY ON THE EFFECT. It runs after every commit, not only when the target Document\n * changes: a sheet removed between commits by anything external must be restored on the very next\n * committed render even with unchanged props, and both `ensureCoreTokens` and `recipe.install` are\n * cheap, idempotent checks when nothing is actually missing — narrowing this to `[doc]` would\n * silently defeat the WP2A restoration guarantee for the (far more common) case where `doc` never\n * changes at all. That restoration guarantee is specifically about the CORE and PALETTE token\n * sheets `ensureCoreTokens`/`ensurePaletteTokensFor` own — it does not extend to an arbitrary\n * Griffel atom bucket rule removed externally; the recipe's install memo only ever re-attempts\n * `insertCSSRules`, it does not detect or recover a bucket sheet element deleted out from under it.\n *\n * ONE RECIPE PER STYLE FACTORY, CREATED OUTSIDE RENDER. `createZenithStylesRecipe(styles)` runs once,\n * at `makeZenithStyles`'s own call time (module scope) — never inside the returned hook. A fresh\n * recipe per render would recompute Griffel's definition/debug bookkeeping for no reason and would\n * defeat the recipe's own per-renderer install memo (`@epilot/zenith-runtime`'s `WeakSet`-keyed\n * dedup), which only helps when the SAME recipe object is reused across renders.\n *\n * Cost per commit is not merely a `WeakSet.has`: `useZenithTargetDocument()` resolves the target\n * Document (a Context read, falling back to the ambient global), `ensureCoreTokens` does its own\n * per-Document `WeakMap` reconciliation check (WP2A), and only then does the recipe's `WeakSet.has`\n * (keyed on renderer object identity) decide whether `insertCSSRules` runs again. All three are\n * cheap, but none of them is skipped merely because the recipe was already installed once.\n */\n\nexport type ZenithStyles<Slots extends string> = Record<Slots, GriffelStyle>\n\n/**\n * One class per slot, atoms deduped against whatever is already on the page.\n *\n * **The generic is over the object, not over the key union, and that is load-bearing.** Inferring a\n * type parameter from `Record<Slots, …>` against an object literal widens `Slots` to `string`, so\n * every slot name typechecks including ones that do not exist. OptionCard read `styles.card` in two\n * places with no `card` slot declared and rendered with no card styling at all; tsc was clean and\n * 322 tests passed. Only a pixel diff caught it.\n */\nexport function makeZenithStyles<S extends Record<string, GriffelStyle>>(\n styles: S\n): () => Record<keyof S & string, string> {\n const recipe = runtimeCreateZenithStylesRecipe(styles)\n return function useZenithStyles(): Record<keyof S & string, string> {\n const doc = useZenithTargetDocument()\n const classes = recipe.getClasses()\n React.useInsertionEffect(() => {\n if (!doc) return\n ensureCoreTokens(doc)\n recipe.install(doc)\n })\n return classes\n }\n}\n\n/**\n * One monolithic class for an element's invariant base, rather than atoms.\n *\n * Lands in Griffel's `r` bucket, which sorts before every atom bucket, so variant atoms override it\n * by source order without any specificity escalation. Exactly one reset class per element.\n */\nexport function makeZenithResetStyles(styles: GriffelResetStyle): () => string {\n const recipe = runtimeCreateZenithResetStylesRecipe(styles)\n return function useZenithResetStyles(): string {\n const doc = useZenithTargetDocument()\n const className = recipe.getClasses()\n React.useInsertionEffect(() => {\n if (!doc) return\n ensureCoreTokens(doc)\n recipe.install(doc)\n })\n return className\n }\n}\n"],"names":["makeZenithStyles","styles","recipe","runtimeCreateZenithStylesRecipe","doc","useZenithTargetDocument","classes","React","ensureCoreTokens","makeZenithResetStyles","runtimeCreateZenithResetStylesRecipe","className"],"mappings":";;;;AAmEO,SAASA,EACdC,GACwC;AACxC,QAAMC,IAASC,EAAgCF,CAAM;AACrD,SAAO,WAA6D;AAClE,UAAMG,IAAMC,EAAA,GACNC,IAAUJ,EAAO,WAAA;AACvB,WAAAK,EAAM,mBAAmB,MAAM;AAC7B,MAAKH,MACLI,EAAiBJ,CAAG,GACpBF,EAAO,QAAQE,CAAG;AAAA,IACpB,CAAC,GACME;AAAA,EACT;AACF;AAQO,SAASG,EAAsBR,GAAyC;AAC7E,QAAMC,IAASQ,EAAqCT,CAAM;AAC1D,SAAO,WAAwC;AAC7C,UAAMG,IAAMC,EAAA,GACNM,IAAYT,EAAO,WAAA;AACzB,WAAAK,EAAM,mBAAmB,MAAM;AAC7B,MAAKH,MACLI,EAAiBJ,CAAG,GACpBF,EAAO,QAAQE,CAAG;AAAA,IACpB,CAAC,GACMO;AAAA,EACT;AACF;"}
1
+ {"version":3,"file":"make-styles.js","sources":["../../src/styles/make-styles.ts"],"sourcesContent":["import * as React from \"react\"\nimport {\n createZenithStylesRecipe as runtimeCreateZenithStylesRecipe,\n createZenithResetStylesRecipe as runtimeCreateZenithResetStylesRecipe,\n type GriffelResetStyle,\n type GriffelStyle,\n} from \"@epilot/zenith-runtime/v1\"\n\nimport { ensureCoreTokens } from \"../tokens/install\"\nimport { useZenithTargetDocument } from \"./document-context\"\n\n/**\n * The runtime's style hooks, with this package's token sheet attached. WHY THIS WRAPPER EXISTS,\n * AND WHY IT IS NOT IN THE RUNTIME.\n */\n\nexport type ZenithStyles<Slots extends string> = Record<Slots, GriffelStyle>\n\n/**\n * One class per slot, atoms deduped against whatever is already on the page. **The generic is over\n * the object, not over the key union, and that is load-bearing.** Inferring a type parameter from\n * `Record<Slots, …>` against an object literal widens `Slots` to `string`, so every slot name\n * typechecks including ones that do not exist.\n */\nexport function makeZenithStyles<S extends Record<string, GriffelStyle>>(\n styles: S\n): () => Record<keyof S & string, string> {\n const recipe = runtimeCreateZenithStylesRecipe(styles)\n return function useZenithStyles(): Record<keyof S & string, string> {\n const doc = useZenithTargetDocument()\n const classes = recipe.getClasses()\n React.useInsertionEffect(() => {\n if (!doc) return\n ensureCoreTokens(doc)\n recipe.install(doc)\n })\n return classes\n }\n}\n\n/**\n * One monolithic class for an element's invariant base, rather than atoms.\n *\n * Lands in Griffel's `r` bucket, which sorts before every atom bucket, so variant atoms override it\n * by source order without any specificity escalation. Exactly one reset class per element.\n */\nexport function makeZenithResetStyles(styles: GriffelResetStyle): () => string {\n const recipe = runtimeCreateZenithResetStylesRecipe(styles)\n return function useZenithResetStyles(): string {\n const doc = useZenithTargetDocument()\n const className = recipe.getClasses()\n React.useInsertionEffect(() => {\n if (!doc) return\n ensureCoreTokens(doc)\n recipe.install(doc)\n })\n return className\n }\n}\n"],"names":["makeZenithStyles","styles","recipe","runtimeCreateZenithStylesRecipe","doc","useZenithTargetDocument","classes","React","ensureCoreTokens","makeZenithResetStyles","runtimeCreateZenithResetStylesRecipe","className"],"mappings":";;;;AAwBO,SAASA,EACdC,GACwC;AACxC,QAAMC,IAASC,EAAgCF,CAAM;AACrD,SAAO,WAA6D;AAClE,UAAMG,IAAMC,EAAA,GACNC,IAAUJ,EAAO,WAAA;AACvB,WAAAK,EAAM,mBAAmB,MAAM;AAC7B,MAAKH,MACLI,EAAiBJ,CAAG,GACpBF,EAAO,QAAQE,CAAG;AAAA,IACpB,CAAC,GACME;AAAA,EACT;AACF;AAQO,SAASG,EAAsBR,GAAyC;AAC7E,QAAMC,IAASQ,EAAqCT,CAAM;AAC1D,SAAO,WAAwC;AAC7C,UAAMG,IAAMC,EAAA,GACNM,IAAYT,EAAO,WAAA;AACzB,WAAAK,EAAM,mBAAmB,MAAM;AAC7B,MAAKH,MACLI,EAAiBJ,CAAG,GACpBF,EAAO,QAAQE,CAAG;AAAA,IACpB,CAAC,GACMO;AAAA,EACT;AACF;"}
@@ -1,5 +1,5 @@
1
- const c = "ccfa55f882e79499";
1
+ const b = "1149b991f836ab9e";
2
2
  export {
3
- c as NS
3
+ b as NS
4
4
  };
5
5
  //# sourceMappingURL=core.meta.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.meta.generated.js","sources":["../../src/tokens/core.meta.generated.ts"],"sourcesContent":["/* GENERATED by packages/tokens (bun run build:tokens) — do not edit. */\nexport const NS = \"ccfa55f882e79499\"\nexport const SHEET_HASH = \"a779e71d2fb6b1f3\"\nexport const CORE_TOKEN_ASSET = {\n url: \"/zenith/token-assets/core/5cd4072decf5df2a664f0b1d5f2ec250a3309101ded3056c1f87c8bbe3738d50.css\",\n integrity: \"sha256-XNQHLez13ypmTwsdXy7CUKMwkQHe0wVsH4fIu+NzjVA=\",\n namespace: \"ccfa55f882e79499\",\n sheetHash: \"a779e71d2fb6b1f3\",\n} as const\n"],"names":["NS"],"mappings":"AACO,MAAMA,IAAK;"}
1
+ {"version":3,"file":"core.meta.generated.js","sources":["../../src/tokens/core.meta.generated.ts"],"sourcesContent":["/* GENERATED by packages/tokens (bun run build:tokens) — do not edit. */\nexport const NS = \"1149b991f836ab9e\"\nexport const SHEET_HASH = \"d57ca09079a04c67\"\n"],"names":["NS"],"mappings":"AACO,MAAMA,IAAK;"}