@kerfjs/ui 5.0.0-beta.74 → 5.0.0-beta.75

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 (93) hide show
  1. package/ai/component-catalog.json +31 -5
  2. package/ai/component-composition.json +9 -3
  3. package/ai/components/list.md +3 -2
  4. package/ai/components/lucide-icon.md +9 -1
  5. package/ai/components/select.md +5 -4
  6. package/ai/public-api-signatures-v1.md +12 -3
  7. package/ai/skill.md +2 -0
  8. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  9. package/dist/app-tab.js +1 -1
  10. package/dist/catalog.js +8 -8
  11. package/dist/{chunk-W2AC6Q2A.js → chunk-4FEVHE7C.js} +2 -2
  12. package/dist/{chunk-W2AC6Q2A.js.map → chunk-4FEVHE7C.js.map} +1 -1
  13. package/dist/{chunk-2IGHGE3M.js → chunk-5TTZPGUY.js} +4 -4
  14. package/dist/{chunk-2IGHGE3M.js.map → chunk-5TTZPGUY.js.map} +1 -1
  15. package/dist/{chunk-RT5WKYX3.js → chunk-5UGLKFBF.js} +3 -3
  16. package/dist/{chunk-RT5WKYX3.js.map → chunk-5UGLKFBF.js.map} +1 -1
  17. package/dist/{chunk-KFJSNWO4.js → chunk-DA3HS64I.js} +3 -3
  18. package/dist/{chunk-KFJSNWO4.js.map → chunk-DA3HS64I.js.map} +1 -1
  19. package/dist/{chunk-WTSNV5RG.js → chunk-DUBUXJA3.js} +7 -3
  20. package/dist/chunk-DUBUXJA3.js.map +1 -0
  21. package/dist/{chunk-B2ZMR7NY.js → chunk-EHIMH4J7.js} +2 -2
  22. package/dist/{chunk-B2ZMR7NY.js.map → chunk-EHIMH4J7.js.map} +1 -1
  23. package/dist/{chunk-RVERAFFY.js → chunk-FKPKGP2H.js} +2 -2
  24. package/dist/{chunk-RVERAFFY.js.map → chunk-FKPKGP2H.js.map} +1 -1
  25. package/dist/{chunk-2RMDP7HQ.js → chunk-GRHJQWV2.js} +4 -4
  26. package/dist/{chunk-2RMDP7HQ.js.map → chunk-GRHJQWV2.js.map} +1 -1
  27. package/dist/{chunk-IJNYCPAU.js → chunk-HKVJ5MW3.js} +3 -3
  28. package/dist/{chunk-IJNYCPAU.js.map → chunk-HKVJ5MW3.js.map} +1 -1
  29. package/dist/{chunk-6LAQWWEX.js → chunk-HXTAPIHQ.js} +4 -4
  30. package/dist/{chunk-6LAQWWEX.js.map → chunk-HXTAPIHQ.js.map} +1 -1
  31. package/dist/{chunk-KZRR7NNV.js → chunk-JA4J7Y4C.js} +2 -2
  32. package/dist/{chunk-KZRR7NNV.js.map → chunk-JA4J7Y4C.js.map} +1 -1
  33. package/dist/{chunk-TT5ROTQK.js → chunk-JGIV6ZDA.js} +2 -2
  34. package/dist/{chunk-TT5ROTQK.js.map → chunk-JGIV6ZDA.js.map} +1 -1
  35. package/dist/{chunk-3DOHW3K4.js → chunk-LHSUPNSE.js} +2 -2
  36. package/dist/{chunk-3DOHW3K4.js.map → chunk-LHSUPNSE.js.map} +1 -1
  37. package/dist/{chunk-DB5ADJKF.js → chunk-NPNSKX3K.js} +2 -2
  38. package/dist/{chunk-DB5ADJKF.js.map → chunk-NPNSKX3K.js.map} +1 -1
  39. package/dist/{chunk-33EOFAUN.js → chunk-O5GM2JAM.js} +4 -4
  40. package/dist/{chunk-33EOFAUN.js.map → chunk-O5GM2JAM.js.map} +1 -1
  41. package/dist/{chunk-L67OYMGE.js → chunk-OYQIONQF.js} +4 -4
  42. package/dist/{chunk-L67OYMGE.js.map → chunk-OYQIONQF.js.map} +1 -1
  43. package/dist/{chunk-RU2EMR56.js → chunk-PL26TKNK.js} +4 -4
  44. package/dist/{chunk-RU2EMR56.js.map → chunk-PL26TKNK.js.map} +1 -1
  45. package/dist/{chunk-2G2ZJQYK.js → chunk-RFGW735Q.js} +8 -2
  46. package/dist/chunk-RFGW735Q.js.map +1 -0
  47. package/dist/{chunk-I6FTU27I.js → chunk-SVLDRGPJ.js} +2 -2
  48. package/dist/{chunk-I6FTU27I.js.map → chunk-SVLDRGPJ.js.map} +1 -1
  49. package/dist/{chunk-VZOFZPSO.js → chunk-SX7FJXPJ.js} +2 -2
  50. package/dist/{chunk-VZOFZPSO.js.map → chunk-SX7FJXPJ.js.map} +1 -1
  51. package/dist/{chunk-ZSJOLL3S.js → chunk-TCXDZNCX.js} +4 -4
  52. package/dist/{chunk-ZSJOLL3S.js.map → chunk-TCXDZNCX.js.map} +1 -1
  53. package/dist/{chunk-BGD7EHUE.js → chunk-TOICTHR2.js} +2 -2
  54. package/dist/{chunk-BGD7EHUE.js.map → chunk-TOICTHR2.js.map} +1 -1
  55. package/dist/{chunk-7KHKLG5C.js → chunk-V4GAQ74C.js} +3 -3
  56. package/dist/{chunk-7KHKLG5C.js.map → chunk-V4GAQ74C.js.map} +1 -1
  57. package/dist/{chunk-G4S2QU6V.js → chunk-VA5TN5PR.js} +2 -2
  58. package/dist/{chunk-G4S2QU6V.js.map → chunk-VA5TN5PR.js.map} +1 -1
  59. package/dist/collapsible-panel.js +3 -3
  60. package/dist/css-values.d.ts +6 -1
  61. package/dist/css-values.js +1 -1
  62. package/dist/disclosure-arrow.js +1 -1
  63. package/dist/empty-state.js +1 -1
  64. package/dist/grid.js +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +21 -21
  67. package/dist/list-action-row.js +1 -1
  68. package/dist/list-header.js +1 -1
  69. package/dist/list-item.js +1 -1
  70. package/dist/list.js +1 -1
  71. package/dist/loading-spinner.d.ts +1 -0
  72. package/dist/loading-spinner.js +1 -1
  73. package/dist/lucide-icon.d.ts +4 -1
  74. package/dist/lucide-icon.js +1 -1
  75. package/dist/nav-stack.js +1 -1
  76. package/dist/row.js +1 -1
  77. package/dist/select.js +1 -1
  78. package/dist/skeleton.js +1 -1
  79. package/dist/spacer.js +1 -1
  80. package/dist/split-view.js +1 -1
  81. package/dist/state-banner.js +1 -1
  82. package/dist/token-search-field.js +1 -1
  83. package/dist/toolbar-control-group.js +1 -1
  84. package/dist/toolbar-text.js +1 -1
  85. package/dist/value-table.js +1 -1
  86. package/dist/wire-token-search-fields.js +1 -1
  87. package/dist/workbench.js +1 -1
  88. package/docs/component-selection.md +1 -1
  89. package/docs/type-contracts.md +17 -17
  90. package/llms.txt +2 -2
  91. package/package.json +1 -1
  92. package/dist/chunk-2G2ZJQYK.js.map +0 -1
  93. package/dist/chunk-WTSNV5RG.js.map +0 -1
@@ -11,22 +11,22 @@ public-signature artifact.
11
11
 
12
12
  ## Strengthened contracts
13
13
 
14
- | ID | Compile-time guarantee |
15
- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
- | `KUI-T001` | `ListHeader` is a passive heading, a fully named/icon-bearing trailing action, or a controlled disclosure with `action` + `expanded`. Props ignored by the selected mode are rejected. |
17
- | `KUI-T002` | `Select` has a visible `label` or an `ariaLabel`. |
18
- | `KUI-T003` | A literal `Select.value` belongs to its literal `choices`. |
19
- | `KUI-T004` | A literal `SegmentedControl.value` belongs to its literal `choices`. |
20
- | `KUI-T005` | `expanded`, `expandAction`, and `expandLabel` exist only on `TokenSearchField({ collapsible: true })`. |
21
- | `KUI-T006` | `TokenSearchEditorAttributes` accepts application `data-*` metadata but rejects component-owned identity, morph, count, and placeholder attributes. |
22
- | `KUI-T007` | `ToolbarText.maxLines` requires `wrap: true`; it is never silently ignored in typed code. |
23
- | `KUI-T008` | A literal `TabScaffold.active` id belongs to its literal `tabs`. |
24
- | `KUI-T009` | Adjacent-token keyboard removal requires `onRemoveToken`; disabling removal rejects the now-meaningless callback. |
25
- | `KUI-T010` | Finite public variants have named exported union types, including divider sides, tab activation, banner urgency, and all AppTab, TabBar, ToolbarControlGroup, and Select presentation axes; the convenience root barrel re-exports them. |
26
- | `KUI-T011` | Semantic component zones use the recursive `KerfUiContent` type: `SafeHtml`, runtime-empty booleans/nullish values, and readonly nested arrays are valid; arbitrary strings, numbers, and signals are rejected. Explicit text positions such as `ListInsetText` retain their text exception. |
27
- | `KUI-T012` | `List.gap` accepts finite `UiSpaceName` shorthands or a complete branded `CssLength`; raw strings and non-standalone `CssLengthExpression` arithmetic are rejected. `calc(plus(...))` promotes a typed expression to a complete value. |
28
- | `KUI-T013` | CSS-valued props preserve property grammar: `List.flex` uses `CssFlex`, `Skeleton` dimensions use `CssSize`/`CssLength`, and choice icons use `CssForegroundColor` (foreground tokens via `uiColor()` or `foregroundColorVar()`; fill tokens such as `uiColor('success-fill-quiet')` are rejected); row declaration strings are absent. |
29
- | `KUI-T014` | Stable single-root visual components accept the explicit native `slot` attribute. Multi-root `ResizableRegion` and `CollapsiblePanel` remain excluded because no single returned element can own the assignment, and other arbitrary native attributes remain rejected. |
14
+ | ID | Compile-time guarantee |
15
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
16
+ | `KUI-T001` | `ListHeader` is a passive heading, a fully named/icon-bearing trailing action, or a controlled disclosure with `action` + `expanded`. Props ignored by the selected mode are rejected. |
17
+ | `KUI-T002` | `Select` has a visible `label` or an `ariaLabel`. |
18
+ | `KUI-T003` | A literal `Select.value` belongs to its literal `choices`. |
19
+ | `KUI-T004` | A literal `SegmentedControl.value` belongs to its literal `choices`. |
20
+ | `KUI-T005` | `expanded`, `expandAction`, and `expandLabel` exist only on `TokenSearchField({ collapsible: true })`. |
21
+ | `KUI-T006` | `TokenSearchEditorAttributes` accepts application `data-*` metadata but rejects component-owned identity, morph, count, and placeholder attributes. |
22
+ | `KUI-T007` | `ToolbarText.maxLines` requires `wrap: true`; it is never silently ignored in typed code. |
23
+ | `KUI-T008` | A literal `TabScaffold.active` id belongs to its literal `tabs`. |
24
+ | `KUI-T009` | Adjacent-token keyboard removal requires `onRemoveToken`; disabling removal rejects the now-meaningless callback. |
25
+ | `KUI-T010` | Finite public variants have named exported union types, including divider sides, tab activation, banner urgency, and all AppTab, TabBar, ToolbarControlGroup, and Select presentation axes; the convenience root barrel re-exports them. |
26
+ | `KUI-T011` | Semantic component zones use the recursive `KerfUiContent` type: `SafeHtml`, runtime-empty booleans/nullish values, and readonly nested arrays are valid; arbitrary strings, numbers, and signals are rejected. Explicit text positions such as `ListInsetText` retain their text exception. |
27
+ | `KUI-T012` | `List.gap` accepts finite `UiSpaceName` shorthands or a complete branded `CssLength`; raw strings and non-standalone `CssLengthExpression` arithmetic are rejected. `calc(plus(...))` promotes a typed expression to a complete value. |
28
+ | `KUI-T013` | CSS-valued props preserve property grammar: `List.flex` uses `CssFlex`, `Skeleton` dimensions use `CssSize`/`CssLength`, and choice icons and `LucideIcon.color` use `CssForegroundColor` (foreground tokens via `uiColor()`, `foregroundColorVar()`, or custom values via `foregroundColor()`; fill tokens such as `uiColor('success-fill-quiet')` are rejected); row declaration strings are absent. |
29
+ | `KUI-T014` | Stable single-root visual components accept the explicit native `slot` attribute. Multi-root `ResizableRegion` and `CollapsiblePanel` remain excluded because no single returned element can own the assignment, and other arbitrary native attributes remain rejected. |
30
30
 
31
31
  `KerfUiContent` lets conditionals and mapped component collections be direct
32
32
  siblings without an otherwise-unnecessary `Fragment`:
@@ -123,7 +123,7 @@ move errors into casts without making the integration safer.
123
123
  - Replace raw `List.flex` shorthands with `flex(grow, shrink, basis)` or a finite
124
124
  keyword; replace raw Skeleton dimensions with `px`/`rem`/`em`/`pct` builders;
125
125
  and replace raw choice colors with a foreground token such as
126
- `uiColor('success-on-quiet')` or an app-owned `foregroundColorVar()`.
126
+ `uiColor('success-on-quiet')`, an app-owned `foregroundColorVar()`, or `foregroundColor('rebeccapurple')` for an application-chosen CSS color.
127
127
  `SelectChoice.color` rejects fill tokens (`uiColor('success-fill-quiet')`) and
128
128
  unqualified `colorVar()` values because a fill paints a nearly invisible
129
129
  icon.
package/llms.txt CHANGED
@@ -204,8 +204,8 @@ headingLevel`, `TokenSearchField clearIcon`, `ContentItem frame="framed"` for a
204
204
  shorthand (`gap="xs"`, `gap="m"`) or a complete `CssLength` from the CSS-free
205
205
  `@kerfjs/ui/css-values` builders; raw CSS strings are rejected. Use `flex()`
206
206
  for List flex, typed lengths for Skeleton geometry, and
207
- foreground colors for choice icons: `uiColor()` with an `*-on-*`/text token
208
- or `foregroundColorVar()`; fill tokens such as `uiColor('success-fill-quiet')` do not
207
+ foreground colors for choice icons and `LucideIcon.color`: `uiColor()` with an `*-on-*`/text token,
208
+ `foregroundColorVar()`, or `foregroundColor()` for a custom CSS color; fill tokens such as `uiColor('success-fill-quiet')` do not
209
209
  type-check. These brands are intentionally
210
210
  not interchangeable; rows use classes/tokens/props rather than raw `style`.
211
211
  - **Use `Grid` for equal-width columns.** Set a fixed positive `columns` count
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerfjs/ui",
3
- "version": "5.0.0-beta.74",
3
+ "version": "5.0.0-beta.75",
4
4
  "description": "Accessible, composable UI primitives for kerf applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/css-values.ts"],"names":[],"mappings":";AAqEA,IAAM,YAAA,GAAe;AAAA,EACnB,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA,oBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,oBAAA;AAAA,EACA,sBAAA;AAAA,EACA,qBAAA;AAAA,EACA,kBAAA;AAAA,EACA,oBAAA;AAAA,EACA,mBAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,qBAAA;AAAA,EACA,uBAAA;AAAA,EACA,sBAAA;AAAA,EACA,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA,oBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA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I,CAAA,EAAG,QAAA,KAAa,SAAY,EAAA,GAAK,CAAA,EAAA,EAAK,QAAQ,CAAA,CAAE,CAAA,CAAA,CAAA;AACpE;AAOO,SAAS,kBAAA,CACd,MACA,QAAA,EACoB;AACpB,EAAA,0BAAA,CAA2B,IAAA,EAAM,sBAAsB,kBAAkB,CAAA;AACzE,EAAA,OAAO,CAAA,IAAA,EAAO,IAAI,CAAA,EAAG,QAAA,KAAa,SAAY,EAAA,GAAK,CAAA,EAAA,EAAK,QAAQ,CAAA,CAAE,CAAA,CAAA,CAAA;AACpE","file":"chunk-2G2ZJQYK.js","sourcesContent":["declare const cssValueBrand: unique symbol;\ndeclare const cssLengthBrand: unique symbol;\ndeclare const cssLengthExpressionBrand: unique symbol;\ndeclare const cssFlexBrand: unique symbol;\ndeclare const cssColorBrand: unique symbol;\ndeclare const cssForegroundColorBrand: unique symbol;\n\n/**\n * A complete typed CSS value minted by a property-specific Kerf UI builder.\n *\n * This brand is an authoring correctness aid, not a sanitizer or security\n * boundary. Prefer the narrower property grammar, such as {@link CssLength},\n * whenever one is available.\n */\nexport type CssValue = string & {\n readonly [cssValueBrand]: 'CssValue';\n};\n\n/**\n * A complete CSS length-percentage value suitable for dimension-valued UI\n * props. Despite the concise name, percentages are intentionally included.\n */\nexport type CssLength = CssValue & {\n readonly [cssLengthBrand]: 'CssLength';\n};\n\n/**\n * An incomplete arithmetic expression. Wrap it with {@link calc} before\n * passing it to a prop that accepts {@link CssLength}.\n */\nexport type CssLengthExpression = string & {\n readonly [cssLengthExpressionBrand]: 'CssLengthExpression';\n};\n\n/** A complete CSS `flex` shorthand. It is not interchangeable with a length. */\nexport type CssFlex = CssValue & {\n readonly [cssFlexBrand]: 'CssFlex';\n};\n\n/** A complete CSS color value. It is not interchangeable with a length. */\nexport type CssColor = CssValue & {\n readonly [cssColorBrand]: 'CssColor';\n};\n\n/**\n * A complete CSS color meant to paint a foreground: text or an icon drawn over\n * a surface. Mint it with {@link uiColor} and a foreground token name\n * ({@link UiForegroundColorName}) or with {@link foregroundColorVar}. It is a\n * {@link CssColor}, but a plain `CssColor` is not a foreground color: fill,\n * border, and surface tokens are pale backgrounds that leave a foreground\n * nearly invisible.\n */\nexport type CssForegroundColor = CssColor & {\n readonly [cssForegroundColorBrand]: 'CssForegroundColor';\n};\n\nexport type CssFlexKeyword = 'none' | 'auto' | 'initial';\nexport type CssFlexBasis =\n | CssLength\n | 'auto'\n | 'content'\n | 'min-content'\n | 'max-content'\n | 'fit-content';\nexport type CssSizeKeyword =\n 'auto' | 'min-content' | 'max-content' | 'fit-content';\n/** A complete width/height value accepted by dimension-valued UI props. */\nexport type CssSize = CssLength | CssSizeKeyword;\n\nconst uiColorNames = [\n 'brand-border-loud',\n 'brand-border-normal',\n 'brand-border-quiet',\n 'brand-fill-loud',\n 'brand-fill-normal',\n 'brand-fill-quiet',\n 'brand-on-fill',\n 'brand-on-loud',\n 'brand-on-normal',\n 'brand-on-quiet',\n 'danger-border-loud',\n 'danger-border-normal',\n 'danger-border-quiet',\n 'danger-fill-loud',\n 'danger-fill-normal',\n 'danger-fill-quiet',\n 'danger-on-fill',\n 'danger-on-loud',\n 'danger-on-normal',\n 'danger-on-quiet',\n 'neutral-border-loud',\n 'neutral-border-normal',\n 'neutral-border-quiet',\n 'neutral-fill-loud',\n 'neutral-fill-normal',\n 'neutral-fill-quiet',\n 'neutral-on-loud',\n 'neutral-on-normal',\n 'neutral-on-quiet',\n 'pop-border-loud',\n 'pop-border-normal',\n 'pop-border-quiet',\n 'pop-fill-loud',\n 'pop-fill-normal',\n 'pop-fill-quiet',\n 'pop-on-fill',\n 'pop-on-loud',\n 'pop-on-normal',\n 'pop-on-quiet',\n 'success-border-loud',\n 'success-border-normal',\n 'success-border-quiet',\n 'success-fill-loud',\n 'success-fill-normal',\n 'success-fill-quiet',\n 'success-on-fill',\n 'success-on-loud',\n 'success-on-normal',\n 'success-on-quiet',\n 'surface',\n 'surface-lowered',\n 'surface-raised',\n 'text',\n 'text-link',\n 'text-quiet',\n 'warning-border-loud',\n 'warning-border-normal',\n 'warning-border-quiet',\n 'warning-fill-loud',\n 'warning-fill-normal',\n 'warning-fill-quiet',\n 'warning-on-fill',\n 'warning-on-loud',\n 'warning-on-normal',\n 'warning-on-quiet',\n] as const;\n\n/** Names of the public `--kui-color-*` semantic tokens. */\nexport type UiColorName = (typeof uiColorNames)[number];\n\n/** The semantic tokens that paint a foreground: the `*-on-*` and text roles. */\nexport type UiForegroundColorName = Extract<\n UiColorName,\n `${string}-on-${string}` | 'text' | 'text-quiet' | 'text-link'\n>;\n\n/** Kerf UI's complete spacing-token vocabulary. `s` and `xl` are exceptions. */\nexport type UiSpaceName = 'none' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl';\n\nconst spaceVariables = {\n none: '--kui-space-none',\n '2xs': '--kui-space-2xs',\n xs: '--kui-space-xs',\n s: '--kui-space-s',\n m: '--kui-space-m',\n l: '--kui-space-l',\n xl: '--kui-space-xl',\n} as const satisfies Record<UiSpaceName, string>;\n\nfunction serializeNumber(value: number, helper: string): string {\n if (!Number.isFinite(value))\n throw new RangeError(`${helper}() requires a finite number.`);\n return String(Object.is(value, -0) ? 0 : value);\n}\n\nfunction serializeNonnegativeNumber(value: number, helper: string): string {\n const serialized = serializeNumber(value, helper);\n if (value < 0)\n throw new RangeError(`${helper}() requires nonnegative flex factors.`);\n return serialized;\n}\n\nfunction validateCustomPropertyName(\n name: string,\n helper: string,\n example: string,\n): void {\n if (!/^--[A-Za-z_][A-Za-z0-9_-]*$/.test(name))\n throw new TypeError(\n `${helper}() requires an ASCII custom property name such as ${example}.`,\n );\n}\n\nfunction dimension(value: number, unit: string, helper: string): CssLength {\n return `${serializeNumber(value, helper)}${unit}` as CssLength;\n}\n\n/** Create a complete pixel length. */\nexport function px(value: number): CssLength {\n return dimension(value, 'px', 'px');\n}\n\n/** Create a complete root-font-relative length. */\nexport function rem(value: number): CssLength {\n return dimension(value, 'rem', 'rem');\n}\n\n/** Converts a pixel value into rem units by dividing by 16. */\nexport function remify(value: number): CssLength {\n return rem(value / 16);\n}\n\n/** Create a complete current-font-relative length. */\nexport function em(value: number): CssLength {\n return dimension(value, 'em', 'em');\n}\n\n/** Create a complete percentage length. */\nexport function pct(value: number): CssLength {\n return dimension(value, '%', 'pct');\n}\n\n/** Resolve a Kerf UI spacing step to its public custom property. */\nexport function space(name: UiSpaceName): CssLength {\n const variable = spaceVariables[name];\n if (variable === undefined)\n throw new RangeError(\n `space() received unknown spacing name ${String(name)}.`,\n );\n return `var(${variable})` as CssLength;\n}\n\n/**\n * Reference an application-owned custom property whose contract is a CSS\n * length-percentage. The deliberately narrow name grammar keeps this helper\n * from becoming an arbitrary CSS-string constructor.\n */\nexport function lengthVar(\n name: `--${string}`,\n fallback?: CssLength,\n): CssLength {\n validateCustomPropertyName(name, 'lengthVar', '--app-gap');\n return `var(${name}${fallback === undefined ? '' : `, ${fallback}`})` as CssLength;\n}\n\n/** Combine two or more complete lengths into a non-standalone sum. */\nexport function plus(\n first: CssLength,\n second: CssLength,\n ...rest: readonly CssLength[]\n): CssLengthExpression {\n return [first, second, ...rest].join(' + ') as CssLengthExpression;\n}\n\n/** Turn a typed length expression into a complete CSS `calc()` value. */\nexport function calc(expression: CssLengthExpression): CssLength {\n return `calc(${expression})` as CssLength;\n}\n\n/** Build a complete, structured CSS flex shorthand. */\nexport function flex(\n grow: number,\n shrink = 1,\n basis: CssFlexBasis = 'auto',\n): CssFlex {\n return `${serializeNonnegativeNumber(grow, 'flex')} ${serializeNonnegativeNumber(shrink, 'flex')} ${basis}` as CssFlex;\n}\n\n/**\n * The brand {@link uiColor} returns for a token name: a\n * {@link CssForegroundColor} for a foreground token, otherwise a plain\n * {@link CssColor}.\n */\nexport type UiColor<Name extends UiColorName> =\n Name extends UiForegroundColorName ? CssForegroundColor : CssColor;\n\n/**\n * Resolve a public Kerf UI semantic color token. A foreground token name\n * (`success-on-quiet`, `text-quiet`, …) returns a {@link CssForegroundColor};\n * any other token returns a plain {@link CssColor}.\n */\nexport function uiColor<Name extends UiColorName>(name: Name): UiColor<Name> {\n if (!(uiColorNames as readonly string[]).includes(name))\n throw new RangeError(\n `uiColor() received unknown color name ${String(name)}.`,\n );\n return `var(--kui-color-${name})` as UiColor<Name>;\n}\n\n/** Reference an application-owned custom property whose contract is a color. */\nexport function colorVar(name: `--${string}`, fallback?: CssColor): CssColor {\n validateCustomPropertyName(name, 'colorVar', '--app-color');\n return `var(${name}${fallback === undefined ? '' : `, ${fallback}`})` as CssColor;\n}\n\n/**\n * Reference an application-owned custom property whose contract is a\n * foreground color (text or an icon over a surface). Use it where a prop\n * accepts only {@link CssForegroundColor}, such as `SelectChoice.color`.\n */\nexport function foregroundColorVar(\n name: `--${string}`,\n fallback?: CssForegroundColor,\n): CssForegroundColor {\n validateCustomPropertyName(name, 'foregroundColorVar', '--app-icon-color');\n return `var(${name}${fallback === undefined ? '' : `, ${fallback}`})` as CssForegroundColor;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lucide-icon.tsx"],"names":["jsx"],"mappings":";;;AAQA,IAAM,oBAAA,GAAuB;AAAA,EAC3B,EAAA,EAAI,EAAA;AAAA,EACJ,CAAA,EAAG,EAAA;AAAA,EACH,CAAA,EAAG,EAAA;AAAA,EACH,CAAA,EAAG,EAAA;AAAA,EACH,EAAA,EAAI;AACN,CAAA;AAgBO,SAAS,UAAA,CAAW;AAAA,EACzB,IAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA,GAAa,SAAA;AAAA,EACb,SAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,EAAoB;AAClB,EAAA,IAAI,OAAO,SAAS,QAAA,KAAa,CAAC,OAAO,QAAA,CAAS,IAAI,KAAK,IAAA,IAAQ,CAAA,CAAA;AACjE,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,CAAC,MAAA,CAAO,MAAA,CAAO,sBAAsB,IAAI,CAAA;AACvE,IAAA,MAAM,IAAI,WAAW,4CAA4C,CAAA;AACnE,EAAA,MAAM,SACJ,OAAO,IAAA,KAAS,WAAW,IAAA,GAAO,IAAA,IAAQ,qBAAqB,IAAI,CAAA;AACrE,EAAA,MAAM,aAAA,GAAgB,EAAE,IAAA,EAAK;AAC7B,EAAA,uBACEA,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,aAAA;AAAA,MACJ,KAAA,EAAO,SAAA;AAAA,MACP,aAAA,EAAa,IAAA;AAAA,MACb,WAAA,EAAW,IAAA,KAAS,MAAA,GAAY,MAAA,GAAY,OAAO,IAAI,CAAA;AAAA,MACvD,IAAA,EAAM,QAAQ,KAAA,GAAQ,MAAA;AAAA,MACtB,YAAA,EAAY,KAAA;AAAA,MACZ,aAAA,EAAa,QAAQ,MAAA,GAAY,MAAA;AAAA,MACjC,OAAA,EAAQ,WAAA;AAAA,MACR,IAAA,EAAM,UAAA,KAAe,OAAA,GAAU,cAAA,GAAiB,MAAA;AAAA,MAChD,MAAA,EAAO,cAAA;AAAA,MACP,cAAA,EAAa,GAAA;AAAA,MACb,gBAAA,EAAe,OAAA;AAAA,MACf,iBAAA,EAAgB,OAAA;AAAA,MAChB,OACE,MAAA,KAAW,MAAA,GACP,SACA,CAAA,mBAAA,EAAsB,MAAA,CAAO,MAAM,CAAC,CAAA,CAAA;AAAA,MAGzC,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAC,CAAC,GAAA,EAAK,KAAK,CAAA,KAAM,GAAA,CAAI,GAAA,EAAK,KAAK,CAAC;AAAA;AAAA,GAC7C;AAEJ","file":"chunk-WTSNV5RG.js","sourcesContent":["import { jsx } from 'kerfjs/jsx-runtime';\nimport type { IconNode } from 'lucide';\n\nimport { remify } from './css-values.js';\n\nexport type LucideNode = IconNode;\nexport type LucideIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | number;\n\nconst lucideIconSizePixels = {\n xs: 12,\n s: 16,\n m: 20,\n l: 24,\n xl: 32,\n} as const satisfies Record<Exclude<LucideIconSize, number>, number>;\n\nexport interface LucideIconProps {\n icon: LucideNode;\n name: string;\n /** Outline by default; solid fills compatible glyphs with the current text color. */\n appearance?: 'outline' | 'solid';\n className?: string;\n label?: string;\n /** Named icon scale or positive pixel size, converted to rem. Omit for 1em. */\n size?: LucideIconSize;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Render a Lucide-compatible icon node without copying icon SVG strings. */\nexport function LucideIcon({\n icon,\n name,\n appearance = 'outline',\n className,\n label,\n size,\n slot,\n}: LucideIconProps) {\n if (typeof size === 'number' && (!Number.isFinite(size) || size <= 0))\n throw new RangeError(\n 'LucideIcon size must be a positive finite pixel value',\n );\n if (typeof size === 'string' && !Object.hasOwn(lucideIconSizePixels, size))\n throw new RangeError('LucideIcon size must use a named icon step');\n const pixels =\n typeof size === 'number' ? size : size && lucideIconSizePixels[size];\n const slotAttribute = { slot };\n return (\n <svg\n {...slotAttribute}\n class={className}\n data-lucide={name}\n data-size={size === undefined ? undefined : String(size)}\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : 'true'}\n viewBox=\"0 0 24 24\"\n fill={appearance === 'solid' ? 'currentColor' : 'none'}\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n style={\n pixels === undefined\n ? undefined\n : `--_kui-lucide-size:${remify(pixels)}`\n }\n >\n {icon.map(([tag, attrs]) => jsx(tag, attrs))}\n </svg>\n );\n}\n"]}