@vielzeug/refine 2.0.3 → 2.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 (57) hide show
  1. package/dist/content/text/text.css.cjs +1 -1
  2. package/dist/content/text/text.css.cjs.map +1 -1
  3. package/dist/content/text/text.css.js +1 -1
  4. package/dist/content/text/text.css.js.map +1 -1
  5. package/dist/content/text/text.d.ts +1 -1
  6. package/dist/content/text/text.d.ts.map +1 -1
  7. package/dist/core/overlay.cjs.map +1 -1
  8. package/dist/core/overlay.d.ts +2 -2
  9. package/dist/core/overlay.d.ts.map +1 -1
  10. package/dist/core/overlay.js.map +1 -1
  11. package/dist/core/positioner.cjs +1 -1
  12. package/dist/core/positioner.cjs.map +1 -1
  13. package/dist/core/positioner.d.ts +6 -1
  14. package/dist/core/positioner.d.ts.map +1 -1
  15. package/dist/core/positioner.js +11 -11
  16. package/dist/core/positioner.js.map +1 -1
  17. package/dist/custom-elements.json +5635 -5387
  18. package/dist/frameworks/elements.d.ts +86 -0
  19. package/dist/frameworks/react.d.ts +18 -0
  20. package/dist/frameworks/vue.d.ts +16 -0
  21. package/dist/inputs/button/button.css.cjs +1 -1
  22. package/dist/inputs/button/button.css.cjs.map +1 -1
  23. package/dist/inputs/button/button.css.js +1 -1
  24. package/dist/inputs/button/button.css.js.map +1 -1
  25. package/dist/menu.cjs +1 -1
  26. package/dist/menu.cjs.map +1 -1
  27. package/dist/menu.js +2 -2
  28. package/dist/menu.js.map +1 -1
  29. package/dist/navigation-menu.cjs +11 -0
  30. package/dist/navigation-menu.cjs.map +1 -0
  31. package/dist/navigation-menu.js +139 -0
  32. package/dist/navigation-menu.js.map +1 -0
  33. package/dist/overlay/index.d.ts +2 -0
  34. package/dist/overlay/index.d.ts.map +1 -1
  35. package/dist/overlay/navigation-menu/navigation-menu-item.css.cjs +2 -0
  36. package/dist/overlay/navigation-menu/navigation-menu-item.css.cjs.map +1 -0
  37. package/dist/overlay/navigation-menu/navigation-menu-item.css.js +6 -0
  38. package/dist/overlay/navigation-menu/navigation-menu-item.css.js.map +1 -0
  39. package/dist/overlay/navigation-menu/navigation-menu-panel.css.cjs +2 -0
  40. package/dist/overlay/navigation-menu/navigation-menu-panel.css.cjs.map +1 -0
  41. package/dist/overlay/navigation-menu/navigation-menu-panel.css.js +6 -0
  42. package/dist/overlay/navigation-menu/navigation-menu-panel.css.js.map +1 -0
  43. package/dist/overlay/navigation-menu/navigation-menu.css.cjs +2 -0
  44. package/dist/overlay/navigation-menu/navigation-menu.css.cjs.map +1 -0
  45. package/dist/overlay/navigation-menu/navigation-menu.css.js +6 -0
  46. package/dist/overlay/navigation-menu/navigation-menu.css.js.map +1 -0
  47. package/dist/overlay/navigation-menu/navigation-menu.d.ts +75 -0
  48. package/dist/overlay/navigation-menu/navigation-menu.d.ts.map +1 -0
  49. package/dist/refine.cjs +15 -6
  50. package/dist/refine.cjs.map +1 -1
  51. package/dist/refine.iife.js +15 -6
  52. package/dist/refine.iife.js.map +1 -1
  53. package/dist/refine.js +15 -6
  54. package/dist/refine.js.map +1 -1
  55. package/dist/text.cjs.map +1 -1
  56. package/dist/text.js.map +1 -1
  57. package/package.json +29 -2
package/dist/text.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"text.cjs","names":[],"sources":["../src/content/text/text.ts"],"sourcesContent":["import { bind, define, html, prop } from '@vielzeug/ore';\n\nimport styles from './text.css?inline';\n\n/** Text component properties */\nexport type OreTextProps = {\n /** Text alignment */\n align?: 'left' | 'center' | 'right' | 'justify';\n /** Semantic HTML element to render as — sets the correct ARIA role/level on the host */\n as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code';\n /** Text color (semantic + theme colors) */\n color?:\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast';\n /** Italic text style */\n italic?: boolean;\n /** Clamp text to N lines with an ellipsis (multi-line truncation) */\n lines?: number;\n /** Text size — maps to --text-* tokens for body variants and --heading-* tokens for the heading variant */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Enable single-line text truncation with ellipsis */\n truncate?: boolean;\n /** Text semantic variant */\n variant?: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code';\n /** Font weight */\n weight?: 'normal' | 'medium' | 'semibold' | 'bold';\n};\n\n/**\n * A typography component with semantic variants and responsive sizing.\n *\n * @element ore-text\n *\n * @attr {string} variant - Text variant: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'\n * @attr {string} size - Font size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'. Maps to --text-* tokens for body variants and --heading-* tokens for the heading variant.\n * @attr {string} weight - Font weight: 'normal' | 'medium' | 'semibold' | 'bold'\n * @attr {string} color - Text color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'heading' | 'body' | 'muted' | 'tertiary' | 'disabled' | 'contrast'\n * @attr {string} align - Text alignment: 'left' | 'center' | 'right' | 'justify'\n * @attr {boolean} truncate - Truncate text with ellipsis when it overflows (single-line)\n * @attr {number} lines - Clamp to N lines with ellipsis (multi-line truncation)\n * @attr {boolean} italic - Italic text style\n * @attr {string} as - Semantic HTML element: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'\n *\n * @slot - Text content\n *\n * @cssprop --text-size - Font size\n * @cssprop --text-weight - Font weight\n * @cssprop --text-color - Text color\n * @cssprop --text-line-height - Line height\n * @cssprop --text-letter-spacing - Letter spacing\n *\n * @example\n * ```html\n * <ore-text variant=\"heading\" size=\"2xl\" weight=\"bold\">Welcome</ore-text>\n * <ore-text as=\"h2\" variant=\"heading\" size=\"xl\">Section title</ore-text>\n * <ore-text color=\"primary\" weight=\"semibold\">Important notice</ore-text>\n * <ore-text variant=\"code\">npm install</ore-text>\n * <ore-text lines=\"2\">Long paragraph that clamps at two lines…</ore-text>\n * ```\n */\n\nexport const TEXT_TAG = 'ore-text' as const;\ndefine<OreTextProps>(TEXT_TAG, {\n props: {\n align: prop.string<'left' | 'center' | 'right' | 'justify'>(),\n as: prop.string<'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'>(),\n color: prop.string<\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast'\n >(),\n italic: prop.bool(),\n lines: prop.number(),\n size: prop.string<'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'>(),\n truncate: prop.bool(),\n variant: prop.string<'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'>(),\n weight: prop.string<'normal' | 'medium' | 'semibold' | 'bold'>(),\n },\n setup(props) {\n bind({\n attr: {\n 'aria-level': () => {\n const match = /^h([1-6])$/.exec((props.as.value as string) ?? '');\n\n return match ? match[1] : null;\n },\n role: () => (/^h([1-6])$/.test((props.as.value as string) ?? '') ? 'heading' : null),\n },\n style: {\n '--_lines': () => (props.lines.value != null ? String(props.lines.value) : null),\n },\n });\n\n return html`\n <slot></slot>\n `;\n },\n styles: [styles],\n});\n"],"mappings":"iJAuEA,IAAa,EAAW,YACxB,EAAA,EAAA,OAAA,CAAqB,EAAU,CAC7B,MAAO,CACL,MAAO,EAAA,KAAK,OAAgD,EAC5D,GAAI,EAAA,KAAK,OAA0F,EACnG,MAAO,EAAA,KAAK,OAaV,EACF,OAAQ,EAAA,KAAK,KAAK,EAClB,MAAO,EAAA,KAAK,OAAO,EACnB,KAAM,EAAA,KAAK,OAAiD,EAC5D,SAAU,EAAA,KAAK,KAAK,EACpB,QAAS,EAAA,KAAK,OAAuE,EACrF,OAAQ,EAAA,KAAK,OAAkD,CACjE,EACA,MAAM,EAAO,CAeX,OAdA,EAAA,EAAA,KAAA,CAAK,CACH,KAAM,CACJ,iBAAoB,CAClB,IAAM,EAAQ,aAAa,KAAM,EAAM,GAAG,OAAoB,EAAE,EAEhE,OAAO,EAAQ,EAAM,GAAK,IAC5B,EACA,SAAa,aAAa,KAAM,EAAM,GAAG,OAAoB,EAAE,EAAI,UAAY,IACjF,EACA,MAAO,CACL,eAAmB,EAAM,MAAM,OAAS,KAAmC,KAA5B,OAAO,EAAM,MAAM,KAAK,CACzE,CACF,CAAC,EAEM,EAAA,IAAI;;KAGb,EACA,OAAQ,CAAC,EAAA,OAAM,CACjB,CAAC"}
1
+ {"version":3,"file":"text.cjs","names":[],"sources":["../src/content/text/text.ts"],"sourcesContent":["import { bind, define, html, prop } from '@vielzeug/ore';\n\nimport styles from './text.css?inline';\n\n/** Text component properties */\nexport type OreTextProps = {\n /** Text alignment */\n align?: 'left' | 'center' | 'right' | 'justify';\n /** Semantic HTML element to render as — sets the correct ARIA role/level on the host */\n as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code';\n /** Text color (semantic + theme colors) */\n color?:\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast';\n /** Italic text style */\n italic?: boolean;\n /** Clamp text to N lines with an ellipsis (multi-line truncation) */\n lines?: number;\n /** Text size — maps to --text-* tokens for body variants and --heading-* tokens for the heading variant */\n size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Enable single-line text truncation with ellipsis */\n truncate?: boolean;\n /** Text semantic variant */\n variant?: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code';\n /** Font weight */\n weight?: 'normal' | 'medium' | 'semibold' | 'bold';\n};\n\n/**\n * A typography component with semantic variants and responsive sizing.\n *\n * @element ore-text\n *\n * @attr {string} variant - Text variant: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'\n * @attr {string} size - Font size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'. Maps to --text-* tokens for body variants and --heading-* tokens for the heading variant.\n * @attr {string} weight - Font weight: 'normal' | 'medium' | 'semibold' | 'bold'\n * @attr {string} color - Text color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'heading' | 'body' | 'muted' | 'tertiary' | 'disabled' | 'contrast'\n * @attr {string} align - Text alignment: 'left' | 'center' | 'right' | 'justify'\n * @attr {boolean} truncate - Truncate text with ellipsis when it overflows (single-line)\n * @attr {number} lines - Clamp to N lines with ellipsis (multi-line truncation)\n * @attr {boolean} italic - Italic text style\n * @attr {string} as - Semantic HTML element: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'\n *\n * @slot - Text content\n *\n * @cssprop --text-size - Font size\n * @cssprop --text-weight - Font weight\n * @cssprop --text-color - Text color\n * @cssprop --text-line-height - Line height\n * @cssprop --text-letter-spacing - Letter spacing\n *\n * @example\n * ```html\n * <ore-text variant=\"heading\" size=\"2xl\" weight=\"bold\">Welcome</ore-text>\n * <ore-text as=\"h2\" variant=\"heading\" size=\"xl\">Section title</ore-text>\n * <ore-text color=\"primary\" weight=\"semibold\">Important notice</ore-text>\n * <ore-text variant=\"code\">npm install</ore-text>\n * <ore-text lines=\"2\">Long paragraph that clamps at two lines…</ore-text>\n * ```\n */\n\nexport const TEXT_TAG = 'ore-text' as const;\ndefine<OreTextProps>(TEXT_TAG, {\n props: {\n align: prop.string<'left' | 'center' | 'right' | 'justify'>(),\n as: prop.string<'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'>(),\n color: prop.string<\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast'\n >(),\n italic: prop.bool(),\n lines: prop.number(),\n size: prop.string<'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'>(),\n truncate: prop.bool(),\n variant: prop.string<'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'>(),\n weight: prop.string<'normal' | 'medium' | 'semibold' | 'bold'>(),\n },\n setup(props) {\n bind({\n attr: {\n 'aria-level': () => {\n const match = /^h([1-6])$/.exec((props.as.value as string) ?? '');\n\n return match ? match[1] : null;\n },\n role: () => (/^h([1-6])$/.test((props.as.value as string) ?? '') ? 'heading' : null),\n },\n style: {\n '--_lines': () => (props.lines.value != null ? String(props.lines.value) : null),\n },\n });\n\n return html`\n <slot></slot>\n `;\n },\n styles: [styles],\n});\n"],"mappings":"iJAuEA,IAAa,EAAW,YACxB,EAAA,EAAA,OAAA,CAAqB,EAAU,CAC7B,MAAO,CACL,MAAO,EAAA,KAAK,OAAgD,EAC5D,GAAI,EAAA,KAAK,OAA0F,EACnG,MAAO,EAAA,KAAK,OAaV,EACF,OAAQ,EAAA,KAAK,KAAK,EAClB,MAAO,EAAA,KAAK,OAAO,EACnB,KAAM,EAAA,KAAK,OAAiD,EAC5D,SAAU,EAAA,KAAK,KAAK,EACpB,QAAS,EAAA,KAAK,OAAuE,EACrF,OAAQ,EAAA,KAAK,OAAkD,CACjE,EACA,MAAM,EAAO,CAeX,OAdA,EAAA,EAAA,KAAA,CAAK,CACH,KAAM,CACJ,iBAAoB,CAClB,IAAM,EAAQ,aAAa,KAAM,EAAM,GAAG,OAAoB,EAAE,EAEhE,OAAO,EAAQ,EAAM,GAAK,IAC5B,EACA,SAAa,aAAa,KAAM,EAAM,GAAG,OAAoB,EAAE,EAAI,UAAY,IACjF,EACA,MAAO,CACL,eAAmB,EAAM,MAAM,OAAS,KAAmC,KAA5B,OAAO,EAAM,MAAM,KAAK,CACzE,CACF,CAAC,EAEM,EAAA,IAAI;;KAGb,EACA,OAAQ,CAAC,EAAA,OAAM,CACjB,CAAC"}
package/dist/text.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","names":[],"sources":["../src/content/text/text.ts"],"sourcesContent":["import { bind, define, html, prop } from '@vielzeug/ore';\n\nimport styles from './text.css?inline';\n\n/** Text component properties */\nexport type OreTextProps = {\n /** Text alignment */\n align?: 'left' | 'center' | 'right' | 'justify';\n /** Semantic HTML element to render as — sets the correct ARIA role/level on the host */\n as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code';\n /** Text color (semantic + theme colors) */\n color?:\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast';\n /** Italic text style */\n italic?: boolean;\n /** Clamp text to N lines with an ellipsis (multi-line truncation) */\n lines?: number;\n /** Text size — maps to --text-* tokens for body variants and --heading-* tokens for the heading variant */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Enable single-line text truncation with ellipsis */\n truncate?: boolean;\n /** Text semantic variant */\n variant?: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code';\n /** Font weight */\n weight?: 'normal' | 'medium' | 'semibold' | 'bold';\n};\n\n/**\n * A typography component with semantic variants and responsive sizing.\n *\n * @element ore-text\n *\n * @attr {string} variant - Text variant: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'\n * @attr {string} size - Font size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'. Maps to --text-* tokens for body variants and --heading-* tokens for the heading variant.\n * @attr {string} weight - Font weight: 'normal' | 'medium' | 'semibold' | 'bold'\n * @attr {string} color - Text color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'heading' | 'body' | 'muted' | 'tertiary' | 'disabled' | 'contrast'\n * @attr {string} align - Text alignment: 'left' | 'center' | 'right' | 'justify'\n * @attr {boolean} truncate - Truncate text with ellipsis when it overflows (single-line)\n * @attr {number} lines - Clamp to N lines with ellipsis (multi-line truncation)\n * @attr {boolean} italic - Italic text style\n * @attr {string} as - Semantic HTML element: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'\n *\n * @slot - Text content\n *\n * @cssprop --text-size - Font size\n * @cssprop --text-weight - Font weight\n * @cssprop --text-color - Text color\n * @cssprop --text-line-height - Line height\n * @cssprop --text-letter-spacing - Letter spacing\n *\n * @example\n * ```html\n * <ore-text variant=\"heading\" size=\"2xl\" weight=\"bold\">Welcome</ore-text>\n * <ore-text as=\"h2\" variant=\"heading\" size=\"xl\">Section title</ore-text>\n * <ore-text color=\"primary\" weight=\"semibold\">Important notice</ore-text>\n * <ore-text variant=\"code\">npm install</ore-text>\n * <ore-text lines=\"2\">Long paragraph that clamps at two lines…</ore-text>\n * ```\n */\n\nexport const TEXT_TAG = 'ore-text' as const;\ndefine<OreTextProps>(TEXT_TAG, {\n props: {\n align: prop.string<'left' | 'center' | 'right' | 'justify'>(),\n as: prop.string<'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'>(),\n color: prop.string<\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast'\n >(),\n italic: prop.bool(),\n lines: prop.number(),\n size: prop.string<'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'>(),\n truncate: prop.bool(),\n variant: prop.string<'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'>(),\n weight: prop.string<'normal' | 'medium' | 'semibold' | 'bold'>(),\n },\n setup(props) {\n bind({\n attr: {\n 'aria-level': () => {\n const match = /^h([1-6])$/.exec((props.as.value as string) ?? '');\n\n return match ? match[1] : null;\n },\n role: () => (/^h([1-6])$/.test((props.as.value as string) ?? '') ? 'heading' : null),\n },\n style: {\n '--_lines': () => (props.lines.value != null ? String(props.lines.value) : null),\n },\n });\n\n return html`\n <slot></slot>\n `;\n },\n styles: [styles],\n});\n"],"mappings":";;;AAuEA,IAAa,IAAW;AACxB,EAAqB,GAAU;CAC7B,OAAO;EACL,OAAO,EAAK,OAAgD;EAC5D,IAAI,EAAK,OAA0F;EACnG,OAAO,EAAK,OAaV;EACF,QAAQ,EAAK,KAAK;EAClB,OAAO,EAAK,OAAO;EACnB,MAAM,EAAK,OAAiD;EAC5D,UAAU,EAAK,KAAK;EACpB,SAAS,EAAK,OAAuE;EACrF,QAAQ,EAAK,OAAkD;CACjE;CACA,MAAM,GAAO;EAeX,OAdA,EAAK;GACH,MAAM;IACJ,oBAAoB;KAClB,IAAM,IAAQ,aAAa,KAAM,EAAM,GAAG,SAAoB,EAAE;KAEhE,OAAO,IAAQ,EAAM,KAAK;IAC5B;IACA,YAAa,aAAa,KAAM,EAAM,GAAG,SAAoB,EAAE,IAAI,YAAY;GACjF;GACA,OAAO,EACL,kBAAmB,EAAM,MAAM,SAAS,OAAmC,OAA5B,OAAO,EAAM,MAAM,KAAK,EACzE;EACF,CAAC,GAEM,CAAI;;;CAGb;CACA,QAAQ,CAAC,CAAM;AACjB,CAAC"}
1
+ {"version":3,"file":"text.js","names":[],"sources":["../src/content/text/text.ts"],"sourcesContent":["import { bind, define, html, prop } from '@vielzeug/ore';\n\nimport styles from './text.css?inline';\n\n/** Text component properties */\nexport type OreTextProps = {\n /** Text alignment */\n align?: 'left' | 'center' | 'right' | 'justify';\n /** Semantic HTML element to render as — sets the correct ARIA role/level on the host */\n as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code';\n /** Text color (semantic + theme colors) */\n color?:\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast';\n /** Italic text style */\n italic?: boolean;\n /** Clamp text to N lines with an ellipsis (multi-line truncation) */\n lines?: number;\n /** Text size — maps to --text-* tokens for body variants and --heading-* tokens for the heading variant */\n size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Enable single-line text truncation with ellipsis */\n truncate?: boolean;\n /** Text semantic variant */\n variant?: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code';\n /** Font weight */\n weight?: 'normal' | 'medium' | 'semibold' | 'bold';\n};\n\n/**\n * A typography component with semantic variants and responsive sizing.\n *\n * @element ore-text\n *\n * @attr {string} variant - Text variant: 'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'\n * @attr {string} size - Font size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'. Maps to --text-* tokens for body variants and --heading-* tokens for the heading variant.\n * @attr {string} weight - Font weight: 'normal' | 'medium' | 'semibold' | 'bold'\n * @attr {string} color - Text color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'heading' | 'body' | 'muted' | 'tertiary' | 'disabled' | 'contrast'\n * @attr {string} align - Text alignment: 'left' | 'center' | 'right' | 'justify'\n * @attr {boolean} truncate - Truncate text with ellipsis when it overflows (single-line)\n * @attr {number} lines - Clamp to N lines with ellipsis (multi-line truncation)\n * @attr {boolean} italic - Italic text style\n * @attr {string} as - Semantic HTML element: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'\n *\n * @slot - Text content\n *\n * @cssprop --text-size - Font size\n * @cssprop --text-weight - Font weight\n * @cssprop --text-color - Text color\n * @cssprop --text-line-height - Line height\n * @cssprop --text-letter-spacing - Letter spacing\n *\n * @example\n * ```html\n * <ore-text variant=\"heading\" size=\"2xl\" weight=\"bold\">Welcome</ore-text>\n * <ore-text as=\"h2\" variant=\"heading\" size=\"xl\">Section title</ore-text>\n * <ore-text color=\"primary\" weight=\"semibold\">Important notice</ore-text>\n * <ore-text variant=\"code\">npm install</ore-text>\n * <ore-text lines=\"2\">Long paragraph that clamps at two lines…</ore-text>\n * ```\n */\n\nexport const TEXT_TAG = 'ore-text' as const;\ndefine<OreTextProps>(TEXT_TAG, {\n props: {\n align: prop.string<'left' | 'center' | 'right' | 'justify'>(),\n as: prop.string<'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'code'>(),\n color: prop.string<\n | 'primary'\n | 'secondary'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'heading'\n | 'body'\n | 'muted'\n | 'tertiary'\n | 'disabled'\n | 'contrast'\n >(),\n italic: prop.bool(),\n lines: prop.number(),\n size: prop.string<'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'>(),\n truncate: prop.bool(),\n variant: prop.string<'body' | 'heading' | 'label' | 'caption' | 'overline' | 'code'>(),\n weight: prop.string<'normal' | 'medium' | 'semibold' | 'bold'>(),\n },\n setup(props) {\n bind({\n attr: {\n 'aria-level': () => {\n const match = /^h([1-6])$/.exec((props.as.value as string) ?? '');\n\n return match ? match[1] : null;\n },\n role: () => (/^h([1-6])$/.test((props.as.value as string) ?? '') ? 'heading' : null),\n },\n style: {\n '--_lines': () => (props.lines.value != null ? String(props.lines.value) : null),\n },\n });\n\n return html`\n <slot></slot>\n `;\n },\n styles: [styles],\n});\n"],"mappings":";;;AAuEA,IAAa,IAAW;AACxB,EAAqB,GAAU;CAC7B,OAAO;EACL,OAAO,EAAK,OAAgD;EAC5D,IAAI,EAAK,OAA0F;EACnG,OAAO,EAAK,OAaV;EACF,QAAQ,EAAK,KAAK;EAClB,OAAO,EAAK,OAAO;EACnB,MAAM,EAAK,OAAiD;EAC5D,UAAU,EAAK,KAAK;EACpB,SAAS,EAAK,OAAuE;EACrF,QAAQ,EAAK,OAAkD;CACjE;CACA,MAAM,GAAO;EAeX,OAdA,EAAK;GACH,MAAM;IACJ,oBAAoB;KAClB,IAAM,IAAQ,aAAa,KAAM,EAAM,GAAG,SAAoB,EAAE;KAEhE,OAAO,IAAQ,EAAM,KAAK;IAC5B;IACA,YAAa,aAAa,KAAM,EAAM,GAAG,SAAoB,EAAE,IAAI,YAAY;GACjF;GACA,OAAO,EACL,kBAAmB,EAAM,MAAM,SAAS,OAAmC,OAA5B,OAAO,EAAM,MAAM,KAAK,EACzE;EACF,CAAC,GAEM,CAAI;;;CAGb;CACA,QAAQ,CAAC,CAAM;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vielzeug/refine",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "description": "Accessible, themeable web components built on Ore custom element primitives",
5
5
  "keywords": [
6
6
  "web-components",
@@ -57,6 +57,15 @@
57
57
  "import": "./dist/styles/tokens.css",
58
58
  "default": "./dist/styles/tokens.css"
59
59
  },
60
+ "./frameworks/elements": {
61
+ "types": "./dist/frameworks/elements.d.ts"
62
+ },
63
+ "./frameworks/react": {
64
+ "types": "./dist/frameworks/react.d.ts"
65
+ },
66
+ "./frameworks/vue": {
67
+ "types": "./dist/frameworks/vue.d.ts"
68
+ },
60
69
  "./accordion": {
61
70
  "import": "./dist/accordion.js",
62
71
  "require": "./dist/accordion.cjs",
@@ -242,6 +251,11 @@
242
251
  "require": "./dist/navbar.cjs",
243
252
  "types": "./dist/layout/navbar/navbar.d.ts"
244
253
  },
254
+ "./navigation-menu": {
255
+ "import": "./dist/navigation-menu.js",
256
+ "require": "./dist/navigation-menu.cjs",
257
+ "types": "./dist/overlay/navigation-menu/navigation-menu.d.ts"
258
+ },
245
259
  "./number-input": {
246
260
  "import": "./dist/number-input.js",
247
261
  "require": "./dist/number-input.cjs",
@@ -380,13 +394,14 @@
380
394
  },
381
395
  "scripts": {
382
396
  "analyze": "custom-elements-manifest analyze --config scripts/refine-manifest.mjs",
383
- "build": "pnpm run check:theme && pnpm run check:manifest && pnpm run check:css-contract && vite build && pnpm run build:bundle && cp -r src/styles/*.css dist/styles && pnpm run build:types && pnpm run analyze",
397
+ "build": "pnpm run check:theme && pnpm run check:manifest && pnpm run check:css-contract && vite build && pnpm run build:bundle && cp -r src/styles/*.css dist/styles && pnpm run build:types && pnpm run analyze && pnpm run gen:framework-types",
384
398
  "build:types": "tsc -p tsconfig.declarations.json",
385
399
  "check:css-contract": "node ./scripts/check-css-contract.mjs",
386
400
  "check:manifest": "node ./scripts/refine-manifest.mjs check-exports",
387
401
  "check:theme": "node ./scripts/theme-tokens.mjs check",
388
402
  "dev": "vite",
389
403
  "fix": "eslint --fix src",
404
+ "gen:framework-types": "node ./scripts/generate-framework-types.mjs",
390
405
  "lint": "eslint src",
391
406
  "preview": "vite preview",
392
407
  "sync:exports": "node ./scripts/refine-manifest.mjs sync-exports",
@@ -430,6 +445,15 @@
430
445
  ],
431
446
  "typesVersions": {
432
447
  "*": {
448
+ "frameworks/elements": [
449
+ "dist/frameworks/elements.d.ts"
450
+ ],
451
+ "frameworks/react": [
452
+ "dist/frameworks/react.d.ts"
453
+ ],
454
+ "frameworks/vue": [
455
+ "dist/frameworks/vue.d.ts"
456
+ ],
433
457
  "accordion": [
434
458
  "dist/disclosure/accordion/accordion.d.ts"
435
459
  ],
@@ -541,6 +565,9 @@
541
565
  "navbar": [
542
566
  "dist/layout/navbar/navbar.d.ts"
543
567
  ],
568
+ "navigation-menu": [
569
+ "dist/overlay/navigation-menu/navigation-menu.d.ts"
570
+ ],
544
571
  "number-input": [
545
572
  "dist/inputs/number-input/number-input.d.ts"
546
573
  ],