@dxos/ui-theme 0.10.0 → 0.11.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/lib/browser/index.mjs +0 -62
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +0 -62
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/plugin/node-cjs/main.css +311 -189
  8. package/dist/plugin/node-cjs/main.css.map +3 -3
  9. package/dist/plugin/node-cjs/meta.json +1 -1
  10. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +2 -1
  11. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +3 -3
  12. package/dist/plugin/node-esm/main.css +311 -189
  13. package/dist/plugin/node-esm/main.css.map +3 -3
  14. package/dist/plugin/node-esm/meta.json +1 -1
  15. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +2 -1
  16. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +3 -3
  17. package/dist/types/src/Theme.stories.d.ts.map +1 -1
  18. package/dist/types/src/defs.d.ts +0 -5
  19. package/dist/types/src/defs.d.ts.map +1 -1
  20. package/dist/types/src/fragments/hover.d.ts +0 -2
  21. package/dist/types/src/fragments/hover.d.ts.map +1 -1
  22. package/dist/types/src/fragments/index.d.ts +0 -1
  23. package/dist/types/src/fragments/index.d.ts.map +1 -1
  24. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -1
  25. package/dist/types/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +11 -6
  27. package/src/Theme.stories.tsx +3 -1
  28. package/src/css/DESIGN_SYSTEM.md +89 -51
  29. package/src/css/base/base.css +39 -0
  30. package/src/css/components/button.css +21 -16
  31. package/src/css/components/callout.css +140 -0
  32. package/src/css/components/input.css +36 -0
  33. package/src/css/components/state.css +1 -11
  34. package/src/css/components/state.md +1 -1
  35. package/src/css/components/surface.css +165 -58
  36. package/src/css/components/tag.css +13 -1
  37. package/src/css/integrations/codemirror.css +15 -0
  38. package/src/css/layout/main.css +26 -2
  39. package/src/css/layout/native.css +1 -0
  40. package/src/css/theme/roles.css +92 -0
  41. package/src/css/theme/spacing.css +63 -54
  42. package/src/css/theme/surfaces.css +215 -0
  43. package/src/css/theme/text.css +6 -2
  44. package/src/css/utilities.css +13 -9
  45. package/src/defs.ts +0 -25
  46. package/src/fragments/hover.ts +0 -3
  47. package/src/fragments/index.ts +0 -1
  48. package/src/main.css +8 -10
  49. package/src/plugins/ThemePlugin.ts +50 -40
  50. package/src/plugins/main.css +1 -1
  51. package/src/tokens.css +22 -0
  52. package/dist/types/src/fragments/density.d.ts +0 -4
  53. package/dist/types/src/fragments/density.d.ts.map +0 -1
  54. package/src/css/components/panel.css +0 -117
  55. package/src/css/theme/semantic.css +0 -244
  56. package/src/fragments/AUDIT.md +0 -55
  57. package/src/fragments/density.ts +0 -43
@@ -1,24 +1,5 @@
1
1
  // src/defs.ts
2
2
  var osTranslations = "org.dxos.i18n.os";
3
- var hues = [
4
- "red",
5
- "orange",
6
- "amber",
7
- "yellow",
8
- "lime",
9
- "green",
10
- "emerald",
11
- "teal",
12
- "cyan",
13
- "sky",
14
- "blue",
15
- "indigo",
16
- "violet",
17
- "purple",
18
- "fuchsia",
19
- "pink",
20
- "rose"
21
- ];
22
3
  var hueShades = [
23
4
  50,
24
5
  100,
@@ -45,49 +26,11 @@ var cardMaxInlineSize = 22;
45
26
  var cardMinBlockSize = 18;
46
27
  var cardMaxBlockSize = 30;
47
28
 
48
- // src/fragments/density.ts
49
- var lgBlockSize = "min-h-[2.5rem]";
50
- var mdBlockSize = "min-h-[2.5rem] pointer-fine:min-h-[2rem]";
51
- var smBlockSize = "min-h-[1.75rem]";
52
- var xsBlockSize = "min-h-[1.5rem]";
53
- var lgDimensions = `${lgBlockSize} px-3`;
54
- var mdDimensions = `${mdBlockSize} px-2`;
55
- var smDimensions = `${smBlockSize} px-1.5`;
56
- var xsDimensions = `${xsBlockSize} px-1`;
57
- var densityDimensions = (density = "md") => {
58
- switch (density) {
59
- case "lg":
60
- return lgDimensions;
61
- case "sm":
62
- return smDimensions;
63
- case "xs":
64
- return xsDimensions;
65
- case "md":
66
- default:
67
- return mdDimensions;
68
- }
69
- };
70
- var densityBlockSize = (density = "md") => {
71
- switch (density) {
72
- case "lg":
73
- return lgBlockSize;
74
- case "sm":
75
- return smBlockSize;
76
- case "xs":
77
- return xsBlockSize;
78
- case "md":
79
- default:
80
- return mdBlockSize;
81
- }
82
- };
83
-
84
29
  // src/fragments/disabled.ts
85
30
  var staticDisabled = "opacity-40 cursor-not-allowed shadow-none";
86
31
  var dataDisabled = "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed";
87
32
 
88
33
  // src/fragments/hover.ts
89
- var ghostHover = "hover:bg-hover-surface";
90
- var ghostFocusWithin = "focus-within:bg-hover-surface";
91
34
  var hoverableControls = "[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]";
92
35
  var groupHoverControlItemWithTransition = "transition-opacity duration-200 opacity-0 group-hover:opacity-100";
93
36
  var hoverableFocusedKeyboardControls = "focus-visible:[--controls-opacity:1]";
@@ -590,8 +533,6 @@ export {
590
533
  cardMinBlockSize,
591
534
  cardMinInlineSize,
592
535
  dataDisabled,
593
- densityBlockSize,
594
- densityDimensions,
595
536
  descriptionMessage,
596
537
  getHashHue,
597
538
  getHashStyles,
@@ -599,8 +540,6 @@ export {
599
540
  getSize,
600
541
  getStyles,
601
542
  getWidth,
602
- ghostFocusWithin,
603
- ghostHover,
604
543
  groupHoverControlItemWithTransition,
605
544
  hoverableControlItem,
606
545
  hoverableControls,
@@ -608,7 +547,6 @@ export {
608
547
  hoverableFocusedWithinControls,
609
548
  hoverableOpenControlItem,
610
549
  hueShades,
611
- hues,
612
550
  iconSize,
613
551
  messageValence,
614
552
  mx,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/defs.ts", "../../../src/fragments/density.ts", "../../../src/fragments/disabled.ts", "../../../src/fragments/hover.ts", "../../../src/fragments/text.ts", "../../../src/util/elevation.ts", "../../../src/util/hash-styles.ts", "../../../src/util/mx.ts", "../../../src/util/tw-merge-config.ts", "../../../src/util/size.ts", "../../../src/util/tv.ts", "../../../src/util/valence.ts"],
4
- "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { type ChromaticPalette } from '@dxos/ui-types';\n\n/**\n * Translation namespace for OS-level translations.\n */\nexport const osTranslations = 'org.dxos.i18n.os';\n\n/**\n * Available color hues for UI components.\n */\nexport const hues: ChromaticPalette[] = [\n 'red',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'green',\n 'emerald',\n 'teal',\n 'cyan',\n 'sky',\n 'blue',\n 'indigo',\n 'violet',\n 'purple',\n 'fuchsia',\n 'pink',\n 'rose',\n] as const;\n\nexport const hueShades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;\n\n// NOTE: These are the JS-side style-API role keys (see ColorStyles in util/hash-styles.ts), kept\n// distinct from the renamed CSS custom-property suffixes (`-bg`/`-fg`).\nexport const roles = ['fill', 'surface', 'foreground', 'text', 'border'] as const;\n\n/**\n * Card size constants (Tailwind spacing units).\n * Cards should be no larger than 320px per WCAG 2.1 SC 1.4.10.\n */\n// TODO(burdon): Replace usage of these with semantic tokens.\nexport const cardMinInlineSize = 18;\nexport const cardDefaultInlineSize = 20; // 320px\nexport const cardMaxInlineSize = 22;\nexport const cardMinBlockSize = 18;\nexport const cardMaxBlockSize = 30;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Density } from '@dxos/ui-types';\n\nconst lgBlockSize = 'min-h-[2.5rem]';\nconst mdBlockSize = 'min-h-[2.5rem] pointer-fine:min-h-[2rem]';\nconst smBlockSize = 'min-h-[1.75rem]';\nconst xsBlockSize = 'min-h-[1.5rem]';\n\nconst lgDimensions = `${lgBlockSize} px-3`;\nconst mdDimensions = `${mdBlockSize} px-2`;\nconst smDimensions = `${smBlockSize} px-1.5`;\nconst xsDimensions = `${xsBlockSize} px-1`;\n\nexport const densityDimensions = (density: Density = 'md') => {\n switch (density) {\n case 'lg':\n return lgDimensions;\n case 'sm':\n return smDimensions;\n case 'xs':\n return xsDimensions;\n case 'md':\n default:\n return mdDimensions;\n }\n};\n\nexport const densityBlockSize = (density: Density = 'md') => {\n switch (density) {\n case 'lg':\n return lgBlockSize;\n case 'sm':\n return smBlockSize;\n case 'xs':\n return xsBlockSize;\n case 'md':\n default:\n return mdBlockSize;\n }\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const staticDisabled = 'opacity-40 cursor-not-allowed shadow-none';\nexport const dataDisabled = 'data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const ghostHover = 'hover:bg-hover-surface';\nexport const ghostFocusWithin = 'focus-within:bg-hover-surface';\n\nexport const hoverableControls =\n '[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]';\n\nexport const groupHoverControlItemWithTransition = 'transition-opacity duration-200 opacity-0 group-hover:opacity-100';\n\nexport const hoverableFocusedKeyboardControls = 'focus-visible:[--controls-opacity:1]';\nexport const hoverableFocusedWithinControls = 'focus-within:[--controls-opacity:1]';\nexport const hoverableOpenControlItem = 'hover-hover:aria-[expanded=true]:[--controls-opacity:1]';\nexport const hoverableControlItem = 'opacity-(--controls-opacity)';\n", "//\n// Copyright 2022 DXOS.org\n//\n\n// TODO(burdon): Replace with Message component.\nexport const descriptionMessage = 'text-description border border-dashed border-separator rounded-sm p-4';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentFragment, type Elevation, type SurfaceLevel } from '@dxos/ui-types';\n\nexport const surfaceShadow: ComponentFragment<{ elevation?: Elevation }> = ({ elevation }) => [\n elevation === 'positioned'\n ? 'shadow-sm'\n : elevation === 'dialog' || elevation === 'toast'\n ? 'shadow-md'\n : 'shadow-none',\n];\n\nexport const surfaceZIndex: ComponentFragment<{ level?: SurfaceLevel; elevation?: Elevation }> = ({\n level,\n elevation,\n}) => {\n switch (level) {\n case 'tooltip':\n return elevation === 'dialog' ? ['z-[53]'] : elevation === 'toast' ? ['z-[43]'] : ['z-50'];\n case 'menu':\n return elevation === 'dialog' ? ['z-[52]'] : elevation === 'toast' ? ['z-[42]'] : ['z-20'];\n default:\n return elevation === 'dialog' ? ['z-[51]'] : elevation === 'toast' ? ['z-[41]'] : ['z-[1]'];\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ChromaticPalette } from '@dxos/ui-types';\n\nexport type Hue = ChromaticPalette | 'neutral';\n\n/**\n * See theme.css\n */\nexport type ColorStyles = {\n hue: Hue;\n bg: string;\n surface: string;\n fg: string;\n text: string;\n border: string;\n};\n\nconst neutral: ColorStyles = {\n hue: 'neutral',\n bg: 'bg-neutral-bg',\n surface: 'bg-neutral-surface',\n fg: 'text-neutral-fg',\n text: 'text-neutral-text',\n border: 'border-neutral-border',\n};\n\n// NOTE: Coordinated with `tag.css`.\n// https://github.com/dxos/dxos/blob/main/packages/ui/react-ui-theme/src/styles/layers/tag.css\nconst styles: ColorStyles[] = [\n {\n hue: 'red',\n bg: 'bg-red-bg',\n surface: 'bg-red-surface',\n fg: 'text-red-fg',\n text: 'text-red-text',\n border: 'border-red-border',\n },\n {\n hue: 'orange',\n bg: 'bg-orange-bg',\n surface: 'bg-orange-surface',\n fg: 'text-orange-fg',\n text: 'text-orange-text',\n border: 'border-orange-border',\n },\n {\n hue: 'amber',\n bg: 'bg-amber-bg',\n surface: 'bg-amber-surface',\n fg: 'text-amber-fg',\n text: 'text-amber-text',\n border: 'border-amber-border',\n },\n {\n hue: 'yellow',\n bg: 'bg-yellow-bg',\n surface: 'bg-yellow-surface',\n fg: 'text-yellow-fg',\n text: 'text-yellow-text',\n border: 'border-yellow-border',\n },\n {\n hue: 'lime',\n bg: 'bg-lime-bg',\n surface: 'bg-lime-surface',\n fg: 'text-lime-fg',\n text: 'text-lime-text',\n border: 'border-lime-border',\n },\n {\n hue: 'green',\n bg: 'bg-green-bg',\n surface: 'bg-green-surface',\n fg: 'text-green-fg',\n text: 'text-green-text',\n border: 'border-green-border',\n },\n {\n hue: 'emerald',\n bg: 'bg-emerald-bg',\n surface: 'bg-emerald-surface',\n fg: 'text-emerald-fg',\n text: 'text-emerald-text',\n border: 'border-emerald-border',\n },\n {\n hue: 'teal',\n bg: 'bg-teal-bg',\n surface: 'bg-teal-surface',\n fg: 'text-teal-fg',\n text: 'text-teal-text',\n border: 'border-teal-border',\n },\n {\n hue: 'cyan',\n bg: 'bg-cyan-bg',\n surface: 'bg-cyan-surface',\n fg: 'text-cyan-fg',\n text: 'text-cyan-text',\n border: 'border-cyan-border',\n },\n {\n hue: 'sky',\n bg: 'bg-sky-bg',\n surface: 'bg-sky-surface',\n fg: 'text-sky-fg',\n text: 'text-sky-text',\n border: 'border-sky-border',\n },\n {\n hue: 'blue',\n bg: 'bg-blue-bg',\n surface: 'bg-blue-surface',\n fg: 'text-blue-fg',\n text: 'text-blue-text',\n border: 'border-blue-border',\n },\n {\n hue: 'indigo',\n bg: 'bg-indigo-bg',\n surface: 'bg-indigo-surface',\n fg: 'text-indigo-fg',\n text: 'text-indigo-text',\n border: 'border-indigo-border',\n },\n {\n hue: 'violet',\n bg: 'bg-violet-bg',\n surface: 'bg-violet-surface',\n fg: 'text-violet-fg',\n text: 'text-violet-text',\n border: 'border-violet-border',\n },\n {\n hue: 'purple',\n bg: 'bg-purple-bg',\n surface: 'bg-purple-surface',\n fg: 'text-purple-fg',\n text: 'text-purple-text',\n border: 'border-purple-border',\n },\n {\n hue: 'fuchsia',\n bg: 'bg-fuchsia-bg',\n surface: 'bg-fuchsia-surface',\n fg: 'text-fuchsia-fg',\n text: 'text-fuchsia-text',\n border: 'border-fuchsia-border',\n },\n {\n hue: 'pink',\n bg: 'bg-pink-bg',\n surface: 'bg-pink-surface',\n fg: 'text-pink-fg',\n text: 'text-pink-text',\n border: 'border-pink-border',\n },\n {\n hue: 'rose',\n bg: 'bg-rose-bg',\n surface: 'bg-rose-surface',\n fg: 'text-rose-fg',\n text: 'text-rose-text',\n border: 'border-rose-border',\n },\n];\n\nexport const palette = {\n neutral,\n hues: styles,\n};\n\nconst validHues: ReadonlySet<Hue> = new Set<Hue>([neutral.hue, ...styles.map((s) => s.hue)]);\n\n/**\n * Normalise an arbitrary string into a known `Hue`, falling back to `'neutral'` when the\n * input doesn't match one of the catalogued palette entries. Useful when accepting hue\n * values from user-authored data (e.g. ECHO objects, plugin settings) that need to be\n * forwarded to a hue-keyed prop like `Tag`'s `palette`.\n */\nexport const toHue = (hue: string | undefined): Hue => (hue && validHues.has(hue as Hue) ? (hue as Hue) : 'neutral');\n\n// TODO(burdon): Rename getClassNames.\nexport const getStyles = (hue: string): ColorStyles => {\n return styles.find((color) => color.hue === hue) || neutral;\n};\n\n// TODO(thure): Reconcile with `to-fallback.ts` which exports `toHue` which overlaps a lot.\nexport const getHashStyles = (id: string | undefined): ColorStyles => {\n return getStyles(getHashHue(id));\n};\n\nexport const getHashHue = (id: string | undefined): Hue => {\n return id ? styles[getHash(id) % styles.length].hue : 'neutral';\n};\n\nconst getHash = (id: string): number => id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { extendTailwindMerge, validators } from 'tailwind-merge';\n\nimport { type AdditionalClassGroups, twMergeConfig } from './tw-merge-config';\n\nexport const mx = extendTailwindMerge<AdditionalClassGroups>({\n extend: {\n ...twMergeConfig.extend,\n classGroups: {\n ...twMergeConfig.extend.classGroups,\n // Arbitrary numeric font-weights require a validator (not expressible as a plain string token).\n 'font-weight': [...twMergeConfig.extend.classGroups['font-weight'], validators.isArbitraryNumber],\n },\n },\n});\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Shared tailwind-merge configuration. The single source for both {@link mx} (extendTailwindMerge)\n * and the {@link tv} instance (createTV `twMergeConfig`) so conflict resolution can't drift —\n * notably for dxos custom tokens (`text-base-fg`, density, focus-ring).\n */\nexport const twMergeConfig = {\n extend: {\n classGroups: {\n 'font-family': ['font-body', 'font-mono'],\n 'font-weight': [\n 'font-thin',\n 'font-extralight',\n 'font-light',\n 'font-normal',\n 'font-medium',\n 'font-semibold',\n 'font-bold',\n 'font-extrabold',\n 'font-black',\n ],\n 'density': ['dx-density-sm', 'dx-density-md', 'dx-density-lg'],\n 'dx-focus-ring': [\n 'dx-focus-ring',\n 'dx-focus-ring-inset',\n 'dx-focus-ring-always',\n 'dx-focus-ring-inset-always',\n 'dx-focus-ring-group',\n 'dx-focus-ring-group-x',\n 'dx-focus-ring-group-y',\n 'dx-focus-ring-group-always',\n 'dx-focus-ring-group-x-always',\n 'dx-focus-ring-group-y-always',\n 'dx-focus-ring-inset-over-all',\n 'dx-focus-ring-inset-over-all-always',\n 'dx-focus-ring-main',\n 'dx-focus-ring-main-always',\n ],\n },\n },\n} as const;\n\nexport type AdditionalClassGroups = 'density' | 'dx-focus-ring';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type CSSProperties } from 'react';\n\nimport { type Size } from '@dxos/ui-types';\n\nimport { mx } from '../util';\n\n// NOTE: Class names must be fully-specified string literals so Tailwind's static scanner can detect them.\nconst sizeMap: Record<string, { w: string; h: string }> = {\n 0: { w: 'w-0', h: 'h-0' },\n px: { w: 'w-px', h: 'h-px' },\n 0.5: { w: 'w-0.5', h: 'h-0.5' },\n 1: { w: 'w-1', h: 'h-1' },\n 1.5: { w: 'w-1.5', h: 'h-1.5' },\n 2: { w: 'w-2', h: 'h-2' },\n 2.5: { w: 'w-2.5', h: 'h-2.5' },\n 3: { w: 'w-3', h: 'h-3' },\n 3.5: { w: 'w-3.5', h: 'h-3.5' },\n 4: { w: 'w-4', h: 'h-4' },\n 5: { w: 'w-5', h: 'h-5' },\n 6: { w: 'w-6', h: 'h-6' },\n 7: { w: 'w-7', h: 'h-7' },\n 8: { w: 'w-8', h: 'h-8' },\n 9: { w: 'w-9', h: 'h-9' },\n 10: { w: 'w-10', h: 'h-10' },\n 11: { w: 'w-11', h: 'h-11' },\n 12: { w: 'w-12', h: 'h-12' },\n 14: { w: 'w-14', h: 'h-14' },\n 16: { w: 'w-16', h: 'h-16' },\n 20: { w: 'w-20', h: 'h-20' },\n 24: { w: 'w-24', h: 'h-24' },\n 28: { w: 'w-28', h: 'h-28' },\n 32: { w: 'w-32', h: 'h-32' },\n 36: { w: 'w-36', h: 'h-36' },\n 40: { w: 'w-40', h: 'h-40' },\n 44: { w: 'w-44', h: 'h-44' },\n 48: { w: 'w-48', h: 'h-48' },\n 52: { w: 'w-52', h: 'h-52' },\n 56: { w: 'w-56', h: 'h-56' },\n 60: { w: 'w-60', h: 'h-60' },\n 64: { w: 'w-64', h: 'h-64' },\n 72: { w: 'w-72', h: 'h-72' },\n 80: { w: 'w-80', h: 'h-80' },\n 96: { w: 'w-96', h: 'h-96' },\n};\n\nconst SIZE_VALUES: Size[] = Object.keys(sizeMap).map((key) => (key === 'px' ? 'px' : (Number(key) as Size)));\n\nexport const getHeight = (size: Size) => sizeMap[size]?.h;\nexport const getWidth = (size: Size) => sizeMap[size]?.w;\nexport const getSize = (size: Size) => mx(getHeight(size), getWidth(size));\n\nexport const sizeValue = (size: Size): number => (size === 'px' ? 1 : size);\nexport const sizeToRem = (size: Size): string => (size === 'px' ? '1px' : `${(size as number) * 0.25}rem`);\n\nexport const iconSize = (size: Size | null): CSSProperties =>\n ({ '--icon-size': size ? sizeToRem(size) : 'initial' }) as CSSProperties;\n\n/**\n * Snaps an arbitrary numeric value to the nearest valid Tailwind size token.\n *\n * The function tries progressively coarser series in order until a match is found:\n * 1. Exact match — returns the value as-is if it is already a valid `Size`.\n * 2. Zero or negative — clamps to `0`.\n * 3. Sub-half values (`< 0.5`) — maps to the `'px'` token (1 px).\n * 4. Half-step series (0.5 increments, e.g. 1.5, 2.5 …).\n * 5. Whole-number series (1, 2, 3 …).\n * 6. Double series (even numbers: 2, 4, 6 …).\n * 7. Quadruple series (multiples of 4: 4, 8, 12 …).\n * 8. Falls back to `defaultSize` if no series matches.\n *\n * @param value - Numeric size to snap (in Tailwind spacing units, where 1 unit = 0.25 rem).\n * @param defaultSize - Fallback `Size` token used when no series produces a valid match.\n * @returns The nearest valid `Size` token.\n */\nexport const snapSize = (value: number, defaultSize: Size): Size => {\n if (SIZE_VALUES.includes(value as Size)) {\n return value as Size;\n } else if (value <= 0) {\n return 0;\n } else if (value < 0.5) {\n return 'px';\n } else {\n const wholeSeries = Math.floor(value);\n const halfSeries = Math.floor(value * 2) / 2;\n const doubleSeries = Math.floor(value / 2) * 2;\n const quadrupleSeries = Math.floor(value / 4) * 4;\n if (SIZE_VALUES.includes(halfSeries as Size)) {\n return halfSeries as Size;\n } else if (SIZE_VALUES.includes(wholeSeries as Size)) {\n return wholeSeries as Size;\n } else if (SIZE_VALUES.includes(doubleSeries as Size)) {\n return doubleSeries as Size;\n } else if (SIZE_VALUES.includes(quadrupleSeries as Size)) {\n return quadrupleSeries as Size;\n } else {\n return defaultSize;\n }\n }\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { createTV } from 'tailwind-variants';\n\nimport { type ClassNameArray, type ClassNameValue, type Theme } from '@dxos/ui-types';\n\nimport { twMergeConfig } from './tw-merge-config';\n\nexport type { VariantProps } from 'tailwind-variants';\n\n/**\n * Shared tailwind-variants instance bound to the dxos tailwind-merge config (see {@link twMergeConfig}),\n * so recipes resolve class conflicts identically to {@link mx}. All component theme recipes import this,\n * never the bare `tailwind-variants` package.\n */\nexport const tv = createTV({ twMerge: true, twMergeConfig });\n\ntype SlotsRecipe<P extends Record<string, any>, S extends string> = (\n props?: P,\n) => Record<S, (opts?: { class?: ClassNameValue }) => string>;\n\n/**\n * The {@link Theme} sub-tree produced by {@link bridgeTv}, with each slot's resolver explicitly typed\n * so call sites (and tests) stay fully typed instead of falling back to `any`.\n */\nexport type BridgedTheme<P extends Record<string, any>, S extends string> = Theme<P> & {\n [K in S]: (styleProps: P, ...etc: ClassNameArray) => string;\n};\n\n/**\n * Adapt a tailwind-variants slots recipe into the existing {@link Theme} shape (a map of\n * {@link import('@dxos/ui-types').ComponentFunction}) so it can register in the `tx` theme tree and be\n * consumed via `tx('component.slot', styleProps, ...classNames)`. Slots are enumerated explicitly (not\n * via Proxy) so unknown paths resolve to `undefined` exactly as `getDeep` does today, and the result is\n * a plain, inspectable object. Derive `slots` from `Object.keys(recipe())` at the call site.\n */\nexport const bridgeTv = <P extends Record<string, any>, S extends string>(\n recipe: SlotsRecipe<P, S>,\n slots: readonly S[],\n): BridgedTheme<P, S> =>\n Object.fromEntries(\n slots.map((slot) => [slot, (styleProps: P, ...etc: ClassNameArray) => recipe(styleProps)[slot]({ class: etc })]),\n ) as BridgedTheme<P, S>;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type MessageValence } from '@dxos/ui-types';\n\nexport const textValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium text-success-text';\n case 'info':\n return 'font-medium text-info-text';\n case 'warning':\n return 'font-medium text-warning-text';\n case 'error':\n return 'font-medium text-error-text';\n default:\n return 'font-medium';\n }\n};\n\nexport const messageValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium border-success-text text-success-fg bg-success-surface';\n case 'info':\n return 'font-medium border-info-text text-info-fg bg-info-surface';\n case 'warning':\n return 'font-medium border-warning-text text-warning-fg bg-warning-surface';\n case 'error':\n return 'font-medium border-error-text text-error-fg bg-error-surface';\n default:\n return 'font-medium border-neutral-text text-neutral-fg bg-neutral-surface';\n }\n};\n\n/**\n * Classes for a Button rendered inside a Message.Root that should inherit the message's valence color.\n * Message.Root sets --dx-valence-bg / --dx-valence-bg-hover / --dx-valence-text on its DOM node.\n * Pass variant='valence' to the Button so button.css reads those variables.\n */\nexport const buttonValence = (_valence?: MessageValence): string =>\n 'text-(--dx-valence-text) bg-(--dx-valence-bg) hover:bg-(--dx-valence-bg-hover)';\n"],
5
- "mappings": ";AASO,IAAMA,iBAAiB;AAKvB,IAAMC,OAA2B;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGK,IAAMC,YAAY;EAAC;EAAI;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;;AAIpE,IAAMC,QAAQ;EAAC;EAAQ;EAAW;EAAc;EAAQ;;AAOxD,IAAMC,oBAAoB;AAC1B,IAAMC,wBAAwB;AAC9B,IAAMC,oBAAoB;AAC1B,IAAMC,mBAAmB;AACzB,IAAMC,mBAAmB;;;AC3ChC,IAAMC,cAAc;AACpB,IAAMC,cAAc;AACpB,IAAMC,cAAc;AACpB,IAAMC,cAAc;AAEpB,IAAMC,eAAe,GAAGJ,WAAAA;AACxB,IAAMK,eAAe,GAAGJ,WAAAA;AACxB,IAAMK,eAAe,GAAGJ,WAAAA;AACxB,IAAMK,eAAe,GAAGJ,WAAAA;AAEjB,IAAMK,oBAAoB,CAACC,UAAmB,SAAI;AACvD,UAAQA,SAAAA;IACN,KAAK;AACH,aAAOL;IACT,KAAK;AACH,aAAOE;IACT,KAAK;AACH,aAAOC;IACT,KAAK;IACL;AACE,aAAOF;EACX;AACF;AAEO,IAAMK,mBAAmB,CAACD,UAAmB,SAAI;AACtD,UAAQA,SAAAA;IACN,KAAK;AACH,aAAOT;IACT,KAAK;AACH,aAAOE;IACT,KAAK;AACH,aAAOC;IACT,KAAK;IACL;AACE,aAAOF;EACX;AACF;;;ACtCO,IAAMU,iBAAiB;AACvB,IAAMC,eAAe;;;ACDrB,IAAMC,aAAa;AACnB,IAAMC,mBAAmB;AAEzB,IAAMC,oBACX;AAEK,IAAMC,sCAAsC;AAE5C,IAAMC,mCAAmC;AACzC,IAAMC,iCAAiC;AACvC,IAAMC,2BAA2B;AAC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A;CAAG,CAAA;;;ACrC5G,IAAME,cAAc,CAACC,YAAAA;AAC1B,UAAQA,SAAAA;IACN,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT;AACE,aAAO;EACX;AACF;AAEO,IAAMC,iBAAiB,CAACD,YAAAA;AAC7B,UAAQA,SAAAA;IACN,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT;AACE,aAAO;EACX;AACF;AAOO,IAAME,gBAAgB,CAACC,aAC5B;",
6
- "names": ["osTranslations", "hues", "hueShades", "roles", "cardMinInlineSize", "cardDefaultInlineSize", "cardMaxInlineSize", "cardMinBlockSize", "cardMaxBlockSize", "lgBlockSize", "mdBlockSize", "smBlockSize", "xsBlockSize", "lgDimensions", "mdDimensions", "smDimensions", "xsDimensions", "densityDimensions", "density", "densityBlockSize", "staticDisabled", "dataDisabled", "ghostHover", "ghostFocusWithin", "hoverableControls", "groupHoverControlItemWithTransition", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "hoverableOpenControlItem", "hoverableControlItem", "descriptionMessage", "surfaceShadow", "elevation", "surfaceZIndex", "level", "neutral", "hue", "bg", "surface", "fg", "text", "border", "styles", "palette", "hues", "validHues", "Set", "map", "s", "toHue", "has", "getStyles", "find", "color", "getHashStyles", "id", "getHashHue", "getHash", "length", "split", "reduce", "acc", "char", "charCodeAt", "extendTailwindMerge", "validators", "twMergeConfig", "extend", "classGroups", "mx", "extendTailwindMerge", "extend", "twMergeConfig", "classGroups", "validators", "isArbitraryNumber", "sizeMap", "w", "h", "px", "SIZE_VALUES", "Object", "keys", "map", "key", "Number", "getHeight", "size", "getWidth", "getSize", "mx", "sizeValue", "sizeToRem", "iconSize", "snapSize", "value", "defaultSize", "includes", "wholeSeries", "Math", "floor", "halfSeries", "doubleSeries", "quadrupleSeries", "createTV", "tv", "createTV", "twMerge", "twMergeConfig", "bridgeTv", "recipe", "slots", "Object", "fromEntries", "map", "slot", "styleProps", "etc", "class", "textValence", "valence", "messageValence", "buttonValence", "_valence"]
3
+ "sources": ["../../../src/defs.ts", "../../../src/fragments/disabled.ts", "../../../src/fragments/hover.ts", "../../../src/fragments/text.ts", "../../../src/util/elevation.ts", "../../../src/util/hash-styles.ts", "../../../src/util/mx.ts", "../../../src/util/tw-merge-config.ts", "../../../src/util/size.ts", "../../../src/util/tv.ts", "../../../src/util/valence.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n/**\n * Translation namespace for OS-level translations.\n */\nexport const osTranslations = 'org.dxos.i18n.os';\n\nexport const hueShades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;\n\n// NOTE: These are the JS-side style-API role keys (see ColorStyles in util/hash-styles.ts), kept\n// distinct from the renamed CSS custom-property suffixes (`-bg`/`-fg`).\nexport const roles = ['fill', 'surface', 'foreground', 'text', 'border'] as const;\n\n/**\n * Card size constants (Tailwind spacing units).\n * Cards should be no larger than 320px per WCAG 2.1 SC 1.4.10.\n */\n// TODO(burdon): Replace usage of these with semantic tokens.\nexport const cardMinInlineSize = 18;\nexport const cardDefaultInlineSize = 20; // 320px\nexport const cardMaxInlineSize = 22;\nexport const cardMinBlockSize = 18;\nexport const cardMaxBlockSize = 30;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const staticDisabled = 'opacity-40 cursor-not-allowed shadow-none';\nexport const dataDisabled = 'data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const hoverableControls =\n '[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]';\n\nexport const groupHoverControlItemWithTransition = 'transition-opacity duration-200 opacity-0 group-hover:opacity-100';\n\nexport const hoverableFocusedKeyboardControls = 'focus-visible:[--controls-opacity:1]';\nexport const hoverableFocusedWithinControls = 'focus-within:[--controls-opacity:1]';\nexport const hoverableOpenControlItem = 'hover-hover:aria-[expanded=true]:[--controls-opacity:1]';\nexport const hoverableControlItem = 'opacity-(--controls-opacity)';\n", "//\n// Copyright 2022 DXOS.org\n//\n\n// TODO(burdon): Replace with Message component.\nexport const descriptionMessage = 'text-description border border-dashed border-separator rounded-sm p-4';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentFragment, type Elevation, type SurfaceLevel } from '@dxos/ui-types';\n\nexport const surfaceShadow: ComponentFragment<{ elevation?: Elevation }> = ({ elevation }) => [\n elevation === 'positioned'\n ? 'shadow-sm'\n : elevation === 'dialog' || elevation === 'toast'\n ? 'shadow-md'\n : 'shadow-none',\n];\n\nexport const surfaceZIndex: ComponentFragment<{ level?: SurfaceLevel; elevation?: Elevation }> = ({\n level,\n elevation,\n}) => {\n switch (level) {\n case 'tooltip':\n return elevation === 'dialog' ? ['z-[53]'] : elevation === 'toast' ? ['z-[43]'] : ['z-50'];\n case 'menu':\n return elevation === 'dialog' ? ['z-[52]'] : elevation === 'toast' ? ['z-[42]'] : ['z-20'];\n default:\n return elevation === 'dialog' ? ['z-[51]'] : elevation === 'toast' ? ['z-[41]'] : ['z-[1]'];\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ChromaticPalette } from '@dxos/ui-types';\n\nexport type Hue = ChromaticPalette | 'neutral';\n\n/**\n * See theme.css\n */\nexport type ColorStyles = {\n hue: Hue;\n bg: string;\n surface: string;\n fg: string;\n text: string;\n border: string;\n};\n\nconst neutral: ColorStyles = {\n hue: 'neutral',\n bg: 'bg-neutral-bg',\n surface: 'bg-neutral-surface',\n fg: 'text-neutral-fg',\n text: 'text-neutral-text',\n border: 'border-neutral-border',\n};\n\n// NOTE: Coordinated with `tag.css`.\n// https://github.com/dxos/dxos/blob/main/packages/ui/react-ui-theme/src/styles/layers/tag.css\nconst styles: ColorStyles[] = [\n {\n hue: 'red',\n bg: 'bg-red-bg',\n surface: 'bg-red-surface',\n fg: 'text-red-fg',\n text: 'text-red-text',\n border: 'border-red-border',\n },\n {\n hue: 'orange',\n bg: 'bg-orange-bg',\n surface: 'bg-orange-surface',\n fg: 'text-orange-fg',\n text: 'text-orange-text',\n border: 'border-orange-border',\n },\n {\n hue: 'amber',\n bg: 'bg-amber-bg',\n surface: 'bg-amber-surface',\n fg: 'text-amber-fg',\n text: 'text-amber-text',\n border: 'border-amber-border',\n },\n {\n hue: 'yellow',\n bg: 'bg-yellow-bg',\n surface: 'bg-yellow-surface',\n fg: 'text-yellow-fg',\n text: 'text-yellow-text',\n border: 'border-yellow-border',\n },\n {\n hue: 'lime',\n bg: 'bg-lime-bg',\n surface: 'bg-lime-surface',\n fg: 'text-lime-fg',\n text: 'text-lime-text',\n border: 'border-lime-border',\n },\n {\n hue: 'green',\n bg: 'bg-green-bg',\n surface: 'bg-green-surface',\n fg: 'text-green-fg',\n text: 'text-green-text',\n border: 'border-green-border',\n },\n {\n hue: 'emerald',\n bg: 'bg-emerald-bg',\n surface: 'bg-emerald-surface',\n fg: 'text-emerald-fg',\n text: 'text-emerald-text',\n border: 'border-emerald-border',\n },\n {\n hue: 'teal',\n bg: 'bg-teal-bg',\n surface: 'bg-teal-surface',\n fg: 'text-teal-fg',\n text: 'text-teal-text',\n border: 'border-teal-border',\n },\n {\n hue: 'cyan',\n bg: 'bg-cyan-bg',\n surface: 'bg-cyan-surface',\n fg: 'text-cyan-fg',\n text: 'text-cyan-text',\n border: 'border-cyan-border',\n },\n {\n hue: 'sky',\n bg: 'bg-sky-bg',\n surface: 'bg-sky-surface',\n fg: 'text-sky-fg',\n text: 'text-sky-text',\n border: 'border-sky-border',\n },\n {\n hue: 'blue',\n bg: 'bg-blue-bg',\n surface: 'bg-blue-surface',\n fg: 'text-blue-fg',\n text: 'text-blue-text',\n border: 'border-blue-border',\n },\n {\n hue: 'indigo',\n bg: 'bg-indigo-bg',\n surface: 'bg-indigo-surface',\n fg: 'text-indigo-fg',\n text: 'text-indigo-text',\n border: 'border-indigo-border',\n },\n {\n hue: 'violet',\n bg: 'bg-violet-bg',\n surface: 'bg-violet-surface',\n fg: 'text-violet-fg',\n text: 'text-violet-text',\n border: 'border-violet-border',\n },\n {\n hue: 'purple',\n bg: 'bg-purple-bg',\n surface: 'bg-purple-surface',\n fg: 'text-purple-fg',\n text: 'text-purple-text',\n border: 'border-purple-border',\n },\n {\n hue: 'fuchsia',\n bg: 'bg-fuchsia-bg',\n surface: 'bg-fuchsia-surface',\n fg: 'text-fuchsia-fg',\n text: 'text-fuchsia-text',\n border: 'border-fuchsia-border',\n },\n {\n hue: 'pink',\n bg: 'bg-pink-bg',\n surface: 'bg-pink-surface',\n fg: 'text-pink-fg',\n text: 'text-pink-text',\n border: 'border-pink-border',\n },\n {\n hue: 'rose',\n bg: 'bg-rose-bg',\n surface: 'bg-rose-surface',\n fg: 'text-rose-fg',\n text: 'text-rose-text',\n border: 'border-rose-border',\n },\n];\n\nexport const palette = {\n neutral,\n hues: styles,\n};\n\nconst validHues: ReadonlySet<Hue> = new Set<Hue>([neutral.hue, ...styles.map((s) => s.hue)]);\n\n/**\n * Normalise an arbitrary string into a known `Hue`, falling back to `'neutral'` when the\n * input doesn't match one of the catalogued palette entries. Useful when accepting hue\n * values from user-authored data (e.g. ECHO objects, plugin settings) that need to be\n * forwarded to a hue-keyed prop like `Tag`'s `palette`.\n */\nexport const toHue = (hue: string | undefined): Hue => (hue && validHues.has(hue as Hue) ? (hue as Hue) : 'neutral');\n\n// TODO(burdon): Rename getClassNames.\nexport const getStyles = (hue: string): ColorStyles => {\n return styles.find((color) => color.hue === hue) || neutral;\n};\n\n// TODO(thure): Reconcile with `to-fallback.ts` which exports `toHue` which overlaps a lot.\nexport const getHashStyles = (id: string | undefined): ColorStyles => {\n return getStyles(getHashHue(id));\n};\n\nexport const getHashHue = (id: string | undefined): Hue => {\n return id ? styles[getHash(id) % styles.length].hue : 'neutral';\n};\n\nconst getHash = (id: string): number => id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { extendTailwindMerge, validators } from 'tailwind-merge';\n\nimport { type AdditionalClassGroups, twMergeConfig } from './tw-merge-config';\n\nexport const mx = extendTailwindMerge<AdditionalClassGroups>({\n extend: {\n ...twMergeConfig.extend,\n classGroups: {\n ...twMergeConfig.extend.classGroups,\n // Arbitrary numeric font-weights require a validator (not expressible as a plain string token).\n 'font-weight': [...twMergeConfig.extend.classGroups['font-weight'], validators.isArbitraryNumber],\n },\n },\n});\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Shared tailwind-merge configuration. The single source for both {@link mx} (extendTailwindMerge)\n * and the {@link tv} instance (createTV `twMergeConfig`) so conflict resolution can't drift —\n * notably for dxos custom tokens (`text-base-fg`, density, focus-ring).\n */\nexport const twMergeConfig = {\n extend: {\n classGroups: {\n 'font-family': ['font-body', 'font-mono'],\n 'font-weight': [\n 'font-thin',\n 'font-extralight',\n 'font-light',\n 'font-normal',\n 'font-medium',\n 'font-semibold',\n 'font-bold',\n 'font-extrabold',\n 'font-black',\n ],\n 'density': ['dx-density-sm', 'dx-density-md', 'dx-density-lg'],\n 'dx-focus-ring': [\n 'dx-focus-ring',\n 'dx-focus-ring-inset',\n 'dx-focus-ring-always',\n 'dx-focus-ring-inset-always',\n 'dx-focus-ring-group',\n 'dx-focus-ring-group-x',\n 'dx-focus-ring-group-y',\n 'dx-focus-ring-group-always',\n 'dx-focus-ring-group-x-always',\n 'dx-focus-ring-group-y-always',\n 'dx-focus-ring-inset-over-all',\n 'dx-focus-ring-inset-over-all-always',\n 'dx-focus-ring-main',\n 'dx-focus-ring-main-always',\n ],\n },\n },\n} as const;\n\nexport type AdditionalClassGroups = 'density' | 'dx-focus-ring';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type CSSProperties } from 'react';\n\nimport { type Size } from '@dxos/ui-types';\n\nimport { mx } from '../util';\n\n// NOTE: Class names must be fully-specified string literals so Tailwind's static scanner can detect them.\nconst sizeMap: Record<string, { w: string; h: string }> = {\n 0: { w: 'w-0', h: 'h-0' },\n px: { w: 'w-px', h: 'h-px' },\n 0.5: { w: 'w-0.5', h: 'h-0.5' },\n 1: { w: 'w-1', h: 'h-1' },\n 1.5: { w: 'w-1.5', h: 'h-1.5' },\n 2: { w: 'w-2', h: 'h-2' },\n 2.5: { w: 'w-2.5', h: 'h-2.5' },\n 3: { w: 'w-3', h: 'h-3' },\n 3.5: { w: 'w-3.5', h: 'h-3.5' },\n 4: { w: 'w-4', h: 'h-4' },\n 5: { w: 'w-5', h: 'h-5' },\n 6: { w: 'w-6', h: 'h-6' },\n 7: { w: 'w-7', h: 'h-7' },\n 8: { w: 'w-8', h: 'h-8' },\n 9: { w: 'w-9', h: 'h-9' },\n 10: { w: 'w-10', h: 'h-10' },\n 11: { w: 'w-11', h: 'h-11' },\n 12: { w: 'w-12', h: 'h-12' },\n 14: { w: 'w-14', h: 'h-14' },\n 16: { w: 'w-16', h: 'h-16' },\n 20: { w: 'w-20', h: 'h-20' },\n 24: { w: 'w-24', h: 'h-24' },\n 28: { w: 'w-28', h: 'h-28' },\n 32: { w: 'w-32', h: 'h-32' },\n 36: { w: 'w-36', h: 'h-36' },\n 40: { w: 'w-40', h: 'h-40' },\n 44: { w: 'w-44', h: 'h-44' },\n 48: { w: 'w-48', h: 'h-48' },\n 52: { w: 'w-52', h: 'h-52' },\n 56: { w: 'w-56', h: 'h-56' },\n 60: { w: 'w-60', h: 'h-60' },\n 64: { w: 'w-64', h: 'h-64' },\n 72: { w: 'w-72', h: 'h-72' },\n 80: { w: 'w-80', h: 'h-80' },\n 96: { w: 'w-96', h: 'h-96' },\n};\n\nconst SIZE_VALUES: Size[] = Object.keys(sizeMap).map((key) => (key === 'px' ? 'px' : (Number(key) as Size)));\n\nexport const getHeight = (size: Size) => sizeMap[size]?.h;\nexport const getWidth = (size: Size) => sizeMap[size]?.w;\nexport const getSize = (size: Size) => mx(getHeight(size), getWidth(size));\n\nexport const sizeValue = (size: Size): number => (size === 'px' ? 1 : size);\nexport const sizeToRem = (size: Size): string => (size === 'px' ? '1px' : `${(size as number) * 0.25}rem`);\n\nexport const iconSize = (size: Size | null): CSSProperties =>\n ({ '--icon-size': size ? sizeToRem(size) : 'initial' }) as CSSProperties;\n\n/**\n * Snaps an arbitrary numeric value to the nearest valid Tailwind size token.\n *\n * The function tries progressively coarser series in order until a match is found:\n * 1. Exact match — returns the value as-is if it is already a valid `Size`.\n * 2. Zero or negative — clamps to `0`.\n * 3. Sub-half values (`< 0.5`) — maps to the `'px'` token (1 px).\n * 4. Half-step series (0.5 increments, e.g. 1.5, 2.5 …).\n * 5. Whole-number series (1, 2, 3 …).\n * 6. Double series (even numbers: 2, 4, 6 …).\n * 7. Quadruple series (multiples of 4: 4, 8, 12 …).\n * 8. Falls back to `defaultSize` if no series matches.\n *\n * @param value - Numeric size to snap (in Tailwind spacing units, where 1 unit = 0.25 rem).\n * @param defaultSize - Fallback `Size` token used when no series produces a valid match.\n * @returns The nearest valid `Size` token.\n */\nexport const snapSize = (value: number, defaultSize: Size): Size => {\n if (SIZE_VALUES.includes(value as Size)) {\n return value as Size;\n } else if (value <= 0) {\n return 0;\n } else if (value < 0.5) {\n return 'px';\n } else {\n const wholeSeries = Math.floor(value);\n const halfSeries = Math.floor(value * 2) / 2;\n const doubleSeries = Math.floor(value / 2) * 2;\n const quadrupleSeries = Math.floor(value / 4) * 4;\n if (SIZE_VALUES.includes(halfSeries as Size)) {\n return halfSeries as Size;\n } else if (SIZE_VALUES.includes(wholeSeries as Size)) {\n return wholeSeries as Size;\n } else if (SIZE_VALUES.includes(doubleSeries as Size)) {\n return doubleSeries as Size;\n } else if (SIZE_VALUES.includes(quadrupleSeries as Size)) {\n return quadrupleSeries as Size;\n } else {\n return defaultSize;\n }\n }\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { createTV } from 'tailwind-variants';\n\nimport { type ClassNameArray, type ClassNameValue, type Theme } from '@dxos/ui-types';\n\nimport { twMergeConfig } from './tw-merge-config';\n\nexport type { VariantProps } from 'tailwind-variants';\n\n/**\n * Shared tailwind-variants instance bound to the dxos tailwind-merge config (see {@link twMergeConfig}),\n * so recipes resolve class conflicts identically to {@link mx}. All component theme recipes import this,\n * never the bare `tailwind-variants` package.\n */\nexport const tv = createTV({ twMerge: true, twMergeConfig });\n\ntype SlotsRecipe<P extends Record<string, any>, S extends string> = (\n props?: P,\n) => Record<S, (opts?: { class?: ClassNameValue }) => string>;\n\n/**\n * The {@link Theme} sub-tree produced by {@link bridgeTv}, with each slot's resolver explicitly typed\n * so call sites (and tests) stay fully typed instead of falling back to `any`.\n */\nexport type BridgedTheme<P extends Record<string, any>, S extends string> = Theme<P> & {\n [K in S]: (styleProps: P, ...etc: ClassNameArray) => string;\n};\n\n/**\n * Adapt a tailwind-variants slots recipe into the existing {@link Theme} shape (a map of\n * {@link import('@dxos/ui-types').ComponentFunction}) so it can register in the `tx` theme tree and be\n * consumed via `tx('component.slot', styleProps, ...classNames)`. Slots are enumerated explicitly (not\n * via Proxy) so unknown paths resolve to `undefined` exactly as `getDeep` does today, and the result is\n * a plain, inspectable object. Derive `slots` from `Object.keys(recipe())` at the call site.\n */\nexport const bridgeTv = <P extends Record<string, any>, S extends string>(\n recipe: SlotsRecipe<P, S>,\n slots: readonly S[],\n): BridgedTheme<P, S> =>\n Object.fromEntries(\n slots.map((slot) => [slot, (styleProps: P, ...etc: ClassNameArray) => recipe(styleProps)[slot]({ class: etc })]),\n ) as BridgedTheme<P, S>;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type MessageValence } from '@dxos/ui-types';\n\nexport const textValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium text-success-text';\n case 'info':\n return 'font-medium text-info-text';\n case 'warning':\n return 'font-medium text-warning-text';\n case 'error':\n return 'font-medium text-error-text';\n default:\n return 'font-medium';\n }\n};\n\nexport const messageValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium border-success-text text-success-fg bg-success-surface';\n case 'info':\n return 'font-medium border-info-text text-info-fg bg-info-surface';\n case 'warning':\n return 'font-medium border-warning-text text-warning-fg bg-warning-surface';\n case 'error':\n return 'font-medium border-error-text text-error-fg bg-error-surface';\n default:\n return 'font-medium border-neutral-text text-neutral-fg bg-neutral-surface';\n }\n};\n\n/**\n * Classes for a Button rendered inside a Message.Root that should inherit the message's valence color.\n * Message.Root sets --dx-valence-bg / --dx-valence-bg-hover / --dx-valence-text on its DOM node.\n * Pass variant='valence' to the Button so button.css reads those variables.\n */\nexport const buttonValence = (_valence?: MessageValence): string =>\n 'text-(--dx-valence-text) bg-(--dx-valence-bg) hover:bg-(--dx-valence-bg-hover)';\n"],
5
+ "mappings": ";AAOO,IAAMA,iBAAiB;AAEvB,IAAMC,YAAY;EAAC;EAAI;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;;AAIpE,IAAMC,QAAQ;EAAC;EAAQ;EAAW;EAAc;EAAQ;;AAOxD,IAAMC,oBAAoB;AAC1B,IAAMC,wBAAwB;AAC9B,IAAMC,oBAAoB;AAC1B,IAAMC,mBAAmB;AACzB,IAAMC,mBAAmB;;;ACpBzB,IAAMC,iBAAiB;AACvB,IAAMC,eAAe;;;ACDrB,IAAMC,oBACX;AAEK,IAAMC,sCAAsC;AAE5C,IAAMC,mCAAmC;AACzC,IAAMC,iCAAiC;AACvC,IAAMC,2BAA2B;AACjC,IAAMC,uBAAuB;;;ACP7B,IAAMC,qBAAqB;;;ACC3B,IAAMC,gBAA8D,CAAC,EAAEC,UAAS,MAAO;EAC5FA,cAAc,eACV,cACAA,cAAc,YAAYA,cAAc,UACtC,cACA;;AAGD,IAAMC,gBAAoF,CAAC,EAChGC,OACAF,UAAS,MACV;AACC,UAAQE,OAAAA;IACN,KAAK;AACH,aAAOF,cAAc,WAAW;QAAC;UAAYA,cAAc,UAAU;QAAC;UAAY;QAAC;;IACrF,KAAK;AACH,aAAOA,cAAc,WAAW;QAAC;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ACX;AACF;AAOO,IAAME,gBAAgB,CAACC,aAC5B;",
6
+ "names": ["osTranslations", "hueShades", "roles", "cardMinInlineSize", "cardDefaultInlineSize", "cardMaxInlineSize", "cardMinBlockSize", "cardMaxBlockSize", "staticDisabled", "dataDisabled", "hoverableControls", "groupHoverControlItemWithTransition", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "hoverableOpenControlItem", "hoverableControlItem", "descriptionMessage", "surfaceShadow", "elevation", "surfaceZIndex", "level", "neutral", "hue", "bg", "surface", "fg", "text", "border", "styles", "palette", "hues", "validHues", "Set", "map", "s", "toHue", "has", "getStyles", "find", "color", "getHashStyles", "id", "getHashHue", "getHash", "length", "split", "reduce", "acc", "char", "charCodeAt", "extendTailwindMerge", "validators", "twMergeConfig", "extend", "classGroups", "mx", "extendTailwindMerge", "extend", "twMergeConfig", "classGroups", "validators", "isArbitraryNumber", "sizeMap", "w", "h", "px", "SIZE_VALUES", "Object", "keys", "map", "key", "Number", "getHeight", "size", "getWidth", "getSize", "mx", "sizeValue", "sizeToRem", "iconSize", "snapSize", "value", "defaultSize", "includes", "wholeSeries", "Math", "floor", "halfSeries", "doubleSeries", "quadrupleSeries", "createTV", "tv", "createTV", "twMerge", "twMergeConfig", "bridgeTv", "recipe", "slots", "Object", "fromEntries", "map", "slot", "styleProps", "etc", "class", "textValence", "valence", "messageValence", "buttonValence", "_valence"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/defs.ts":{"bytes":3994,"imports":[],"format":"esm"},"src/fragments/density.ts":{"bytes":3504,"imports":[],"format":"esm"},"src/fragments/disabled.ts":{"bytes":808,"imports":[],"format":"esm"},"src/fragments/hover.ts":{"bytes":2576,"imports":[],"format":"esm"},"src/fragments/text.ts":{"bytes":740,"imports":[],"format":"esm"},"src/fragments/index.ts":{"bytes":749,"imports":[{"path":"src/fragments/density.ts","kind":"import-statement","original":"./density"},{"path":"src/fragments/disabled.ts","kind":"import-statement","original":"./disabled"},{"path":"src/fragments/hover.ts","kind":"import-statement","original":"./hover"},{"path":"src/fragments/text.ts","kind":"import-statement","original":"./text"}],"format":"esm"},"src/util/elevation.ts":{"bytes":3016,"imports":[],"format":"esm"},"src/util/hash-styles.ts":{"bytes":14739,"imports":[],"format":"esm"},"src/util/tw-merge-config.ts":{"bytes":4168,"imports":[],"format":"esm"},"src/util/mx.ts":{"bytes":2097,"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/size.ts":{"bytes":13347,"imports":[{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/util/tv.ts":{"bytes":4621,"imports":[{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/valence.ts":{"bytes":4284,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":894,"imports":[{"path":"src/util/elevation.ts","kind":"import-statement","original":"./elevation"},{"path":"src/util/hash-styles.ts","kind":"import-statement","original":"./hash-styles"},{"path":"src/util/mx.ts","kind":"import-statement","original":"./mx"},{"path":"src/util/size.ts","kind":"import-statement","original":"./size"},{"path":"src/util/tv.ts","kind":"import-statement","original":"./tv"},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"},{"path":"src/util/valence.ts","kind":"import-statement","original":"./valence"}],"format":"esm"},"src/index.ts":{"bytes":537,"imports":[{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/fragments/index.ts","kind":"import-statement","original":"./fragments"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27637},"dist/lib/browser/index.mjs":{"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true}],"exports":["bridgeTv","buttonValence","cardDefaultInlineSize","cardMaxBlockSize","cardMaxInlineSize","cardMinBlockSize","cardMinInlineSize","dataDisabled","densityBlockSize","densityDimensions","descriptionMessage","getHashHue","getHashStyles","getHeight","getSize","getStyles","getWidth","ghostFocusWithin","ghostHover","groupHoverControlItemWithTransition","hoverableControlItem","hoverableControls","hoverableFocusedKeyboardControls","hoverableFocusedWithinControls","hoverableOpenControlItem","hueShades","hues","iconSize","messageValence","mx","osTranslations","palette","roles","sizeToRem","sizeValue","snapSize","staticDisabled","surfaceShadow","surfaceZIndex","textValence","toHue","tv","twMergeConfig"],"entryPoint":"src/index.ts","inputs":{"src/defs.ts":{"bytesInOutput":557},"src/index.ts":{"bytesInOutput":0},"src/fragments/density.ts":{"bytesInOutput":846},"src/fragments/disabled.ts":{"bytesInOutput":150},"src/fragments/hover.ts":{"bytesInOutput":640},"src/fragments/text.ts":{"bytesInOutput":98},"src/util/elevation.ts":{"bytesInOutput":730},"src/util/hash-styles.ts":{"bytesInOutput":3647},"src/util/mx.ts":{"bytesInOutput":445},"src/util/tw-merge-config.ts":{"bytesInOutput":1009},"src/util/size.ts":{"bytesInOutput":2671},"src/util/tv.ts":{"bytesInOutput":264},"src/util/valence.ts":{"bytesInOutput":1024}},"bytes":13185}}}
1
+ {"inputs":{"src/defs.ts":{"bytes":3019,"imports":[],"format":"esm"},"src/fragments/disabled.ts":{"bytes":808,"imports":[],"format":"esm"},"src/fragments/hover.ts":{"bytes":2175,"imports":[],"format":"esm"},"src/fragments/text.ts":{"bytes":740,"imports":[],"format":"esm"},"src/fragments/index.ts":{"bytes":662,"imports":[{"path":"src/fragments/disabled.ts","kind":"import-statement","original":"./disabled"},{"path":"src/fragments/hover.ts","kind":"import-statement","original":"./hover"},{"path":"src/fragments/text.ts","kind":"import-statement","original":"./text"}],"format":"esm"},"src/util/elevation.ts":{"bytes":3016,"imports":[],"format":"esm"},"src/util/hash-styles.ts":{"bytes":14739,"imports":[],"format":"esm"},"src/util/tw-merge-config.ts":{"bytes":4168,"imports":[],"format":"esm"},"src/util/mx.ts":{"bytes":2097,"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/size.ts":{"bytes":13347,"imports":[{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/util/tv.ts":{"bytes":4621,"imports":[{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/valence.ts":{"bytes":4284,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":894,"imports":[{"path":"src/util/elevation.ts","kind":"import-statement","original":"./elevation"},{"path":"src/util/hash-styles.ts","kind":"import-statement","original":"./hash-styles"},{"path":"src/util/mx.ts","kind":"import-statement","original":"./mx"},{"path":"src/util/size.ts","kind":"import-statement","original":"./size"},{"path":"src/util/tv.ts","kind":"import-statement","original":"./tv"},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"},{"path":"src/util/valence.ts","kind":"import-statement","original":"./valence"}],"format":"esm"},"src/index.ts":{"bytes":537,"imports":[{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/fragments/index.ts","kind":"import-statement","original":"./fragments"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25226},"dist/lib/browser/index.mjs":{"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true}],"exports":["bridgeTv","buttonValence","cardDefaultInlineSize","cardMaxBlockSize","cardMaxInlineSize","cardMinBlockSize","cardMinInlineSize","dataDisabled","descriptionMessage","getHashHue","getHashStyles","getHeight","getSize","getStyles","getWidth","groupHoverControlItemWithTransition","hoverableControlItem","hoverableControls","hoverableFocusedKeyboardControls","hoverableFocusedWithinControls","hoverableOpenControlItem","hueShades","iconSize","messageValence","mx","osTranslations","palette","roles","sizeToRem","sizeValue","snapSize","staticDisabled","surfaceShadow","surfaceZIndex","textValence","toHue","tv","twMergeConfig"],"entryPoint":"src/index.ts","inputs":{"src/defs.ts":{"bytesInOutput":356},"src/index.ts":{"bytesInOutput":0},"src/fragments/disabled.ts":{"bytesInOutput":150},"src/fragments/hover.ts":{"bytesInOutput":541},"src/fragments/text.ts":{"bytesInOutput":98},"src/util/elevation.ts":{"bytesInOutput":730},"src/util/hash-styles.ts":{"bytesInOutput":3647},"src/util/mx.ts":{"bytesInOutput":445},"src/util/tw-merge-config.ts":{"bytesInOutput":1009},"src/util/size.ts":{"bytesInOutput":2671},"src/util/tv.ts":{"bytesInOutput":264},"src/util/valence.ts":{"bytesInOutput":1024}},"bytes":11927}}}
@@ -2,25 +2,6 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
 
3
3
  // src/defs.ts
4
4
  var osTranslations = "org.dxos.i18n.os";
5
- var hues = [
6
- "red",
7
- "orange",
8
- "amber",
9
- "yellow",
10
- "lime",
11
- "green",
12
- "emerald",
13
- "teal",
14
- "cyan",
15
- "sky",
16
- "blue",
17
- "indigo",
18
- "violet",
19
- "purple",
20
- "fuchsia",
21
- "pink",
22
- "rose"
23
- ];
24
5
  var hueShades = [
25
6
  50,
26
7
  100,
@@ -47,49 +28,11 @@ var cardMaxInlineSize = 22;
47
28
  var cardMinBlockSize = 18;
48
29
  var cardMaxBlockSize = 30;
49
30
 
50
- // src/fragments/density.ts
51
- var lgBlockSize = "min-h-[2.5rem]";
52
- var mdBlockSize = "min-h-[2.5rem] pointer-fine:min-h-[2rem]";
53
- var smBlockSize = "min-h-[1.75rem]";
54
- var xsBlockSize = "min-h-[1.5rem]";
55
- var lgDimensions = `${lgBlockSize} px-3`;
56
- var mdDimensions = `${mdBlockSize} px-2`;
57
- var smDimensions = `${smBlockSize} px-1.5`;
58
- var xsDimensions = `${xsBlockSize} px-1`;
59
- var densityDimensions = (density = "md") => {
60
- switch (density) {
61
- case "lg":
62
- return lgDimensions;
63
- case "sm":
64
- return smDimensions;
65
- case "xs":
66
- return xsDimensions;
67
- case "md":
68
- default:
69
- return mdDimensions;
70
- }
71
- };
72
- var densityBlockSize = (density = "md") => {
73
- switch (density) {
74
- case "lg":
75
- return lgBlockSize;
76
- case "sm":
77
- return smBlockSize;
78
- case "xs":
79
- return xsBlockSize;
80
- case "md":
81
- default:
82
- return mdBlockSize;
83
- }
84
- };
85
-
86
31
  // src/fragments/disabled.ts
87
32
  var staticDisabled = "opacity-40 cursor-not-allowed shadow-none";
88
33
  var dataDisabled = "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed";
89
34
 
90
35
  // src/fragments/hover.ts
91
- var ghostHover = "hover:bg-hover-surface";
92
- var ghostFocusWithin = "focus-within:bg-hover-surface";
93
36
  var hoverableControls = "[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]";
94
37
  var groupHoverControlItemWithTransition = "transition-opacity duration-200 opacity-0 group-hover:opacity-100";
95
38
  var hoverableFocusedKeyboardControls = "focus-visible:[--controls-opacity:1]";
@@ -592,8 +535,6 @@ export {
592
535
  cardMinBlockSize,
593
536
  cardMinInlineSize,
594
537
  dataDisabled,
595
- densityBlockSize,
596
- densityDimensions,
597
538
  descriptionMessage,
598
539
  getHashHue,
599
540
  getHashStyles,
@@ -601,8 +542,6 @@ export {
601
542
  getSize,
602
543
  getStyles,
603
544
  getWidth,
604
- ghostFocusWithin,
605
- ghostHover,
606
545
  groupHoverControlItemWithTransition,
607
546
  hoverableControlItem,
608
547
  hoverableControls,
@@ -610,7 +549,6 @@ export {
610
549
  hoverableFocusedWithinControls,
611
550
  hoverableOpenControlItem,
612
551
  hueShades,
613
- hues,
614
552
  iconSize,
615
553
  messageValence,
616
554
  mx,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/defs.ts", "../../../src/fragments/density.ts", "../../../src/fragments/disabled.ts", "../../../src/fragments/hover.ts", "../../../src/fragments/text.ts", "../../../src/util/elevation.ts", "../../../src/util/hash-styles.ts", "../../../src/util/mx.ts", "../../../src/util/tw-merge-config.ts", "../../../src/util/size.ts", "../../../src/util/tv.ts", "../../../src/util/valence.ts"],
4
- "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { type ChromaticPalette } from '@dxos/ui-types';\n\n/**\n * Translation namespace for OS-level translations.\n */\nexport const osTranslations = 'org.dxos.i18n.os';\n\n/**\n * Available color hues for UI components.\n */\nexport const hues: ChromaticPalette[] = [\n 'red',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'green',\n 'emerald',\n 'teal',\n 'cyan',\n 'sky',\n 'blue',\n 'indigo',\n 'violet',\n 'purple',\n 'fuchsia',\n 'pink',\n 'rose',\n] as const;\n\nexport const hueShades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;\n\n// NOTE: These are the JS-side style-API role keys (see ColorStyles in util/hash-styles.ts), kept\n// distinct from the renamed CSS custom-property suffixes (`-bg`/`-fg`).\nexport const roles = ['fill', 'surface', 'foreground', 'text', 'border'] as const;\n\n/**\n * Card size constants (Tailwind spacing units).\n * Cards should be no larger than 320px per WCAG 2.1 SC 1.4.10.\n */\n// TODO(burdon): Replace usage of these with semantic tokens.\nexport const cardMinInlineSize = 18;\nexport const cardDefaultInlineSize = 20; // 320px\nexport const cardMaxInlineSize = 22;\nexport const cardMinBlockSize = 18;\nexport const cardMaxBlockSize = 30;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Density } from '@dxos/ui-types';\n\nconst lgBlockSize = 'min-h-[2.5rem]';\nconst mdBlockSize = 'min-h-[2.5rem] pointer-fine:min-h-[2rem]';\nconst smBlockSize = 'min-h-[1.75rem]';\nconst xsBlockSize = 'min-h-[1.5rem]';\n\nconst lgDimensions = `${lgBlockSize} px-3`;\nconst mdDimensions = `${mdBlockSize} px-2`;\nconst smDimensions = `${smBlockSize} px-1.5`;\nconst xsDimensions = `${xsBlockSize} px-1`;\n\nexport const densityDimensions = (density: Density = 'md') => {\n switch (density) {\n case 'lg':\n return lgDimensions;\n case 'sm':\n return smDimensions;\n case 'xs':\n return xsDimensions;\n case 'md':\n default:\n return mdDimensions;\n }\n};\n\nexport const densityBlockSize = (density: Density = 'md') => {\n switch (density) {\n case 'lg':\n return lgBlockSize;\n case 'sm':\n return smBlockSize;\n case 'xs':\n return xsBlockSize;\n case 'md':\n default:\n return mdBlockSize;\n }\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const staticDisabled = 'opacity-40 cursor-not-allowed shadow-none';\nexport const dataDisabled = 'data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const ghostHover = 'hover:bg-hover-surface';\nexport const ghostFocusWithin = 'focus-within:bg-hover-surface';\n\nexport const hoverableControls =\n '[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]';\n\nexport const groupHoverControlItemWithTransition = 'transition-opacity duration-200 opacity-0 group-hover:opacity-100';\n\nexport const hoverableFocusedKeyboardControls = 'focus-visible:[--controls-opacity:1]';\nexport const hoverableFocusedWithinControls = 'focus-within:[--controls-opacity:1]';\nexport const hoverableOpenControlItem = 'hover-hover:aria-[expanded=true]:[--controls-opacity:1]';\nexport const hoverableControlItem = 'opacity-(--controls-opacity)';\n", "//\n// Copyright 2022 DXOS.org\n//\n\n// TODO(burdon): Replace with Message component.\nexport const descriptionMessage = 'text-description border border-dashed border-separator rounded-sm p-4';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentFragment, type Elevation, type SurfaceLevel } from '@dxos/ui-types';\n\nexport const surfaceShadow: ComponentFragment<{ elevation?: Elevation }> = ({ elevation }) => [\n elevation === 'positioned'\n ? 'shadow-sm'\n : elevation === 'dialog' || elevation === 'toast'\n ? 'shadow-md'\n : 'shadow-none',\n];\n\nexport const surfaceZIndex: ComponentFragment<{ level?: SurfaceLevel; elevation?: Elevation }> = ({\n level,\n elevation,\n}) => {\n switch (level) {\n case 'tooltip':\n return elevation === 'dialog' ? ['z-[53]'] : elevation === 'toast' ? ['z-[43]'] : ['z-50'];\n case 'menu':\n return elevation === 'dialog' ? ['z-[52]'] : elevation === 'toast' ? ['z-[42]'] : ['z-20'];\n default:\n return elevation === 'dialog' ? ['z-[51]'] : elevation === 'toast' ? ['z-[41]'] : ['z-[1]'];\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ChromaticPalette } from '@dxos/ui-types';\n\nexport type Hue = ChromaticPalette | 'neutral';\n\n/**\n * See theme.css\n */\nexport type ColorStyles = {\n hue: Hue;\n bg: string;\n surface: string;\n fg: string;\n text: string;\n border: string;\n};\n\nconst neutral: ColorStyles = {\n hue: 'neutral',\n bg: 'bg-neutral-bg',\n surface: 'bg-neutral-surface',\n fg: 'text-neutral-fg',\n text: 'text-neutral-text',\n border: 'border-neutral-border',\n};\n\n// NOTE: Coordinated with `tag.css`.\n// https://github.com/dxos/dxos/blob/main/packages/ui/react-ui-theme/src/styles/layers/tag.css\nconst styles: ColorStyles[] = [\n {\n hue: 'red',\n bg: 'bg-red-bg',\n surface: 'bg-red-surface',\n fg: 'text-red-fg',\n text: 'text-red-text',\n border: 'border-red-border',\n },\n {\n hue: 'orange',\n bg: 'bg-orange-bg',\n surface: 'bg-orange-surface',\n fg: 'text-orange-fg',\n text: 'text-orange-text',\n border: 'border-orange-border',\n },\n {\n hue: 'amber',\n bg: 'bg-amber-bg',\n surface: 'bg-amber-surface',\n fg: 'text-amber-fg',\n text: 'text-amber-text',\n border: 'border-amber-border',\n },\n {\n hue: 'yellow',\n bg: 'bg-yellow-bg',\n surface: 'bg-yellow-surface',\n fg: 'text-yellow-fg',\n text: 'text-yellow-text',\n border: 'border-yellow-border',\n },\n {\n hue: 'lime',\n bg: 'bg-lime-bg',\n surface: 'bg-lime-surface',\n fg: 'text-lime-fg',\n text: 'text-lime-text',\n border: 'border-lime-border',\n },\n {\n hue: 'green',\n bg: 'bg-green-bg',\n surface: 'bg-green-surface',\n fg: 'text-green-fg',\n text: 'text-green-text',\n border: 'border-green-border',\n },\n {\n hue: 'emerald',\n bg: 'bg-emerald-bg',\n surface: 'bg-emerald-surface',\n fg: 'text-emerald-fg',\n text: 'text-emerald-text',\n border: 'border-emerald-border',\n },\n {\n hue: 'teal',\n bg: 'bg-teal-bg',\n surface: 'bg-teal-surface',\n fg: 'text-teal-fg',\n text: 'text-teal-text',\n border: 'border-teal-border',\n },\n {\n hue: 'cyan',\n bg: 'bg-cyan-bg',\n surface: 'bg-cyan-surface',\n fg: 'text-cyan-fg',\n text: 'text-cyan-text',\n border: 'border-cyan-border',\n },\n {\n hue: 'sky',\n bg: 'bg-sky-bg',\n surface: 'bg-sky-surface',\n fg: 'text-sky-fg',\n text: 'text-sky-text',\n border: 'border-sky-border',\n },\n {\n hue: 'blue',\n bg: 'bg-blue-bg',\n surface: 'bg-blue-surface',\n fg: 'text-blue-fg',\n text: 'text-blue-text',\n border: 'border-blue-border',\n },\n {\n hue: 'indigo',\n bg: 'bg-indigo-bg',\n surface: 'bg-indigo-surface',\n fg: 'text-indigo-fg',\n text: 'text-indigo-text',\n border: 'border-indigo-border',\n },\n {\n hue: 'violet',\n bg: 'bg-violet-bg',\n surface: 'bg-violet-surface',\n fg: 'text-violet-fg',\n text: 'text-violet-text',\n border: 'border-violet-border',\n },\n {\n hue: 'purple',\n bg: 'bg-purple-bg',\n surface: 'bg-purple-surface',\n fg: 'text-purple-fg',\n text: 'text-purple-text',\n border: 'border-purple-border',\n },\n {\n hue: 'fuchsia',\n bg: 'bg-fuchsia-bg',\n surface: 'bg-fuchsia-surface',\n fg: 'text-fuchsia-fg',\n text: 'text-fuchsia-text',\n border: 'border-fuchsia-border',\n },\n {\n hue: 'pink',\n bg: 'bg-pink-bg',\n surface: 'bg-pink-surface',\n fg: 'text-pink-fg',\n text: 'text-pink-text',\n border: 'border-pink-border',\n },\n {\n hue: 'rose',\n bg: 'bg-rose-bg',\n surface: 'bg-rose-surface',\n fg: 'text-rose-fg',\n text: 'text-rose-text',\n border: 'border-rose-border',\n },\n];\n\nexport const palette = {\n neutral,\n hues: styles,\n};\n\nconst validHues: ReadonlySet<Hue> = new Set<Hue>([neutral.hue, ...styles.map((s) => s.hue)]);\n\n/**\n * Normalise an arbitrary string into a known `Hue`, falling back to `'neutral'` when the\n * input doesn't match one of the catalogued palette entries. Useful when accepting hue\n * values from user-authored data (e.g. ECHO objects, plugin settings) that need to be\n * forwarded to a hue-keyed prop like `Tag`'s `palette`.\n */\nexport const toHue = (hue: string | undefined): Hue => (hue && validHues.has(hue as Hue) ? (hue as Hue) : 'neutral');\n\n// TODO(burdon): Rename getClassNames.\nexport const getStyles = (hue: string): ColorStyles => {\n return styles.find((color) => color.hue === hue) || neutral;\n};\n\n// TODO(thure): Reconcile with `to-fallback.ts` which exports `toHue` which overlaps a lot.\nexport const getHashStyles = (id: string | undefined): ColorStyles => {\n return getStyles(getHashHue(id));\n};\n\nexport const getHashHue = (id: string | undefined): Hue => {\n return id ? styles[getHash(id) % styles.length].hue : 'neutral';\n};\n\nconst getHash = (id: string): number => id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { extendTailwindMerge, validators } from 'tailwind-merge';\n\nimport { type AdditionalClassGroups, twMergeConfig } from './tw-merge-config';\n\nexport const mx = extendTailwindMerge<AdditionalClassGroups>({\n extend: {\n ...twMergeConfig.extend,\n classGroups: {\n ...twMergeConfig.extend.classGroups,\n // Arbitrary numeric font-weights require a validator (not expressible as a plain string token).\n 'font-weight': [...twMergeConfig.extend.classGroups['font-weight'], validators.isArbitraryNumber],\n },\n },\n});\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Shared tailwind-merge configuration. The single source for both {@link mx} (extendTailwindMerge)\n * and the {@link tv} instance (createTV `twMergeConfig`) so conflict resolution can't drift —\n * notably for dxos custom tokens (`text-base-fg`, density, focus-ring).\n */\nexport const twMergeConfig = {\n extend: {\n classGroups: {\n 'font-family': ['font-body', 'font-mono'],\n 'font-weight': [\n 'font-thin',\n 'font-extralight',\n 'font-light',\n 'font-normal',\n 'font-medium',\n 'font-semibold',\n 'font-bold',\n 'font-extrabold',\n 'font-black',\n ],\n 'density': ['dx-density-sm', 'dx-density-md', 'dx-density-lg'],\n 'dx-focus-ring': [\n 'dx-focus-ring',\n 'dx-focus-ring-inset',\n 'dx-focus-ring-always',\n 'dx-focus-ring-inset-always',\n 'dx-focus-ring-group',\n 'dx-focus-ring-group-x',\n 'dx-focus-ring-group-y',\n 'dx-focus-ring-group-always',\n 'dx-focus-ring-group-x-always',\n 'dx-focus-ring-group-y-always',\n 'dx-focus-ring-inset-over-all',\n 'dx-focus-ring-inset-over-all-always',\n 'dx-focus-ring-main',\n 'dx-focus-ring-main-always',\n ],\n },\n },\n} as const;\n\nexport type AdditionalClassGroups = 'density' | 'dx-focus-ring';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type CSSProperties } from 'react';\n\nimport { type Size } from '@dxos/ui-types';\n\nimport { mx } from '../util';\n\n// NOTE: Class names must be fully-specified string literals so Tailwind's static scanner can detect them.\nconst sizeMap: Record<string, { w: string; h: string }> = {\n 0: { w: 'w-0', h: 'h-0' },\n px: { w: 'w-px', h: 'h-px' },\n 0.5: { w: 'w-0.5', h: 'h-0.5' },\n 1: { w: 'w-1', h: 'h-1' },\n 1.5: { w: 'w-1.5', h: 'h-1.5' },\n 2: { w: 'w-2', h: 'h-2' },\n 2.5: { w: 'w-2.5', h: 'h-2.5' },\n 3: { w: 'w-3', h: 'h-3' },\n 3.5: { w: 'w-3.5', h: 'h-3.5' },\n 4: { w: 'w-4', h: 'h-4' },\n 5: { w: 'w-5', h: 'h-5' },\n 6: { w: 'w-6', h: 'h-6' },\n 7: { w: 'w-7', h: 'h-7' },\n 8: { w: 'w-8', h: 'h-8' },\n 9: { w: 'w-9', h: 'h-9' },\n 10: { w: 'w-10', h: 'h-10' },\n 11: { w: 'w-11', h: 'h-11' },\n 12: { w: 'w-12', h: 'h-12' },\n 14: { w: 'w-14', h: 'h-14' },\n 16: { w: 'w-16', h: 'h-16' },\n 20: { w: 'w-20', h: 'h-20' },\n 24: { w: 'w-24', h: 'h-24' },\n 28: { w: 'w-28', h: 'h-28' },\n 32: { w: 'w-32', h: 'h-32' },\n 36: { w: 'w-36', h: 'h-36' },\n 40: { w: 'w-40', h: 'h-40' },\n 44: { w: 'w-44', h: 'h-44' },\n 48: { w: 'w-48', h: 'h-48' },\n 52: { w: 'w-52', h: 'h-52' },\n 56: { w: 'w-56', h: 'h-56' },\n 60: { w: 'w-60', h: 'h-60' },\n 64: { w: 'w-64', h: 'h-64' },\n 72: { w: 'w-72', h: 'h-72' },\n 80: { w: 'w-80', h: 'h-80' },\n 96: { w: 'w-96', h: 'h-96' },\n};\n\nconst SIZE_VALUES: Size[] = Object.keys(sizeMap).map((key) => (key === 'px' ? 'px' : (Number(key) as Size)));\n\nexport const getHeight = (size: Size) => sizeMap[size]?.h;\nexport const getWidth = (size: Size) => sizeMap[size]?.w;\nexport const getSize = (size: Size) => mx(getHeight(size), getWidth(size));\n\nexport const sizeValue = (size: Size): number => (size === 'px' ? 1 : size);\nexport const sizeToRem = (size: Size): string => (size === 'px' ? '1px' : `${(size as number) * 0.25}rem`);\n\nexport const iconSize = (size: Size | null): CSSProperties =>\n ({ '--icon-size': size ? sizeToRem(size) : 'initial' }) as CSSProperties;\n\n/**\n * Snaps an arbitrary numeric value to the nearest valid Tailwind size token.\n *\n * The function tries progressively coarser series in order until a match is found:\n * 1. Exact match — returns the value as-is if it is already a valid `Size`.\n * 2. Zero or negative — clamps to `0`.\n * 3. Sub-half values (`< 0.5`) — maps to the `'px'` token (1 px).\n * 4. Half-step series (0.5 increments, e.g. 1.5, 2.5 …).\n * 5. Whole-number series (1, 2, 3 …).\n * 6. Double series (even numbers: 2, 4, 6 …).\n * 7. Quadruple series (multiples of 4: 4, 8, 12 …).\n * 8. Falls back to `defaultSize` if no series matches.\n *\n * @param value - Numeric size to snap (in Tailwind spacing units, where 1 unit = 0.25 rem).\n * @param defaultSize - Fallback `Size` token used when no series produces a valid match.\n * @returns The nearest valid `Size` token.\n */\nexport const snapSize = (value: number, defaultSize: Size): Size => {\n if (SIZE_VALUES.includes(value as Size)) {\n return value as Size;\n } else if (value <= 0) {\n return 0;\n } else if (value < 0.5) {\n return 'px';\n } else {\n const wholeSeries = Math.floor(value);\n const halfSeries = Math.floor(value * 2) / 2;\n const doubleSeries = Math.floor(value / 2) * 2;\n const quadrupleSeries = Math.floor(value / 4) * 4;\n if (SIZE_VALUES.includes(halfSeries as Size)) {\n return halfSeries as Size;\n } else if (SIZE_VALUES.includes(wholeSeries as Size)) {\n return wholeSeries as Size;\n } else if (SIZE_VALUES.includes(doubleSeries as Size)) {\n return doubleSeries as Size;\n } else if (SIZE_VALUES.includes(quadrupleSeries as Size)) {\n return quadrupleSeries as Size;\n } else {\n return defaultSize;\n }\n }\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { createTV } from 'tailwind-variants';\n\nimport { type ClassNameArray, type ClassNameValue, type Theme } from '@dxos/ui-types';\n\nimport { twMergeConfig } from './tw-merge-config';\n\nexport type { VariantProps } from 'tailwind-variants';\n\n/**\n * Shared tailwind-variants instance bound to the dxos tailwind-merge config (see {@link twMergeConfig}),\n * so recipes resolve class conflicts identically to {@link mx}. All component theme recipes import this,\n * never the bare `tailwind-variants` package.\n */\nexport const tv = createTV({ twMerge: true, twMergeConfig });\n\ntype SlotsRecipe<P extends Record<string, any>, S extends string> = (\n props?: P,\n) => Record<S, (opts?: { class?: ClassNameValue }) => string>;\n\n/**\n * The {@link Theme} sub-tree produced by {@link bridgeTv}, with each slot's resolver explicitly typed\n * so call sites (and tests) stay fully typed instead of falling back to `any`.\n */\nexport type BridgedTheme<P extends Record<string, any>, S extends string> = Theme<P> & {\n [K in S]: (styleProps: P, ...etc: ClassNameArray) => string;\n};\n\n/**\n * Adapt a tailwind-variants slots recipe into the existing {@link Theme} shape (a map of\n * {@link import('@dxos/ui-types').ComponentFunction}) so it can register in the `tx` theme tree and be\n * consumed via `tx('component.slot', styleProps, ...classNames)`. Slots are enumerated explicitly (not\n * via Proxy) so unknown paths resolve to `undefined` exactly as `getDeep` does today, and the result is\n * a plain, inspectable object. Derive `slots` from `Object.keys(recipe())` at the call site.\n */\nexport const bridgeTv = <P extends Record<string, any>, S extends string>(\n recipe: SlotsRecipe<P, S>,\n slots: readonly S[],\n): BridgedTheme<P, S> =>\n Object.fromEntries(\n slots.map((slot) => [slot, (styleProps: P, ...etc: ClassNameArray) => recipe(styleProps)[slot]({ class: etc })]),\n ) as BridgedTheme<P, S>;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type MessageValence } from '@dxos/ui-types';\n\nexport const textValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium text-success-text';\n case 'info':\n return 'font-medium text-info-text';\n case 'warning':\n return 'font-medium text-warning-text';\n case 'error':\n return 'font-medium text-error-text';\n default:\n return 'font-medium';\n }\n};\n\nexport const messageValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium border-success-text text-success-fg bg-success-surface';\n case 'info':\n return 'font-medium border-info-text text-info-fg bg-info-surface';\n case 'warning':\n return 'font-medium border-warning-text text-warning-fg bg-warning-surface';\n case 'error':\n return 'font-medium border-error-text text-error-fg bg-error-surface';\n default:\n return 'font-medium border-neutral-text text-neutral-fg bg-neutral-surface';\n }\n};\n\n/**\n * Classes for a Button rendered inside a Message.Root that should inherit the message's valence color.\n * Message.Root sets --dx-valence-bg / --dx-valence-bg-hover / --dx-valence-text on its DOM node.\n * Pass variant='valence' to the Button so button.css reads those variables.\n */\nexport const buttonValence = (_valence?: MessageValence): string =>\n 'text-(--dx-valence-text) bg-(--dx-valence-bg) hover:bg-(--dx-valence-bg-hover)';\n"],
5
- "mappings": ";;;A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IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT;AACE,aAAO;EACX;AACF;AAEO,IAAMC,iBAAiB,CAACD,YAAAA;AAC7B,UAAQA,SAAAA;IACN,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT;AACE,aAAO;EACX;AACF;AAOO,IAAME,gBAAgB,CAACC,aAC5B;",
6
- "names": ["osTranslations", "hues", "hueShades", "roles", "cardMinInlineSize", "cardDefaultInlineSize", "cardMaxInlineSize", "cardMinBlockSize", "cardMaxBlockSize", "lgBlockSize", "mdBlockSize", "smBlockSize", "xsBlockSize", "lgDimensions", "mdDimensions", "smDimensions", "xsDimensions", "densityDimensions", "density", "densityBlockSize", "staticDisabled", "dataDisabled", "ghostHover", "ghostFocusWithin", "hoverableControls", "groupHoverControlItemWithTransition", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "hoverableOpenControlItem", "hoverableControlItem", "descriptionMessage", "surfaceShadow", "elevation", "surfaceZIndex", "level", "neutral", "hue", "bg", "surface", "fg", "text", "border", "styles", "palette", "hues", "validHues", "Set", "map", "s", "toHue", "has", "getStyles", "find", "color", "getHashStyles", "id", "getHashHue", "getHash", "length", "split", "reduce", "acc", "char", "charCodeAt", "extendTailwindMerge", "validators", "twMergeConfig", "extend", "classGroups", "mx", "extendTailwindMerge", "extend", "twMergeConfig", "classGroups", "validators", "isArbitraryNumber", "sizeMap", "w", "h", "px", "SIZE_VALUES", "Object", "keys", "map", "key", "Number", "getHeight", "size", "getWidth", "getSize", "mx", "sizeValue", "sizeToRem", "iconSize", "snapSize", "value", "defaultSize", "includes", "wholeSeries", "Math", "floor", "halfSeries", "doubleSeries", "quadrupleSeries", "createTV", "tv", "createTV", "twMerge", "twMergeConfig", "bridgeTv", "recipe", "slots", "Object", "fromEntries", "map", "slot", "styleProps", "etc", "class", "textValence", "valence", "messageValence", "buttonValence", "_valence"]
3
+ "sources": ["../../../src/defs.ts", "../../../src/fragments/disabled.ts", "../../../src/fragments/hover.ts", "../../../src/fragments/text.ts", "../../../src/util/elevation.ts", "../../../src/util/hash-styles.ts", "../../../src/util/mx.ts", "../../../src/util/tw-merge-config.ts", "../../../src/util/size.ts", "../../../src/util/tv.ts", "../../../src/util/valence.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n/**\n * Translation namespace for OS-level translations.\n */\nexport const osTranslations = 'org.dxos.i18n.os';\n\nexport const hueShades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;\n\n// NOTE: These are the JS-side style-API role keys (see ColorStyles in util/hash-styles.ts), kept\n// distinct from the renamed CSS custom-property suffixes (`-bg`/`-fg`).\nexport const roles = ['fill', 'surface', 'foreground', 'text', 'border'] as const;\n\n/**\n * Card size constants (Tailwind spacing units).\n * Cards should be no larger than 320px per WCAG 2.1 SC 1.4.10.\n */\n// TODO(burdon): Replace usage of these with semantic tokens.\nexport const cardMinInlineSize = 18;\nexport const cardDefaultInlineSize = 20; // 320px\nexport const cardMaxInlineSize = 22;\nexport const cardMinBlockSize = 18;\nexport const cardMaxBlockSize = 30;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const staticDisabled = 'opacity-40 cursor-not-allowed shadow-none';\nexport const dataDisabled = 'data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport const hoverableControls =\n '[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]';\n\nexport const groupHoverControlItemWithTransition = 'transition-opacity duration-200 opacity-0 group-hover:opacity-100';\n\nexport const hoverableFocusedKeyboardControls = 'focus-visible:[--controls-opacity:1]';\nexport const hoverableFocusedWithinControls = 'focus-within:[--controls-opacity:1]';\nexport const hoverableOpenControlItem = 'hover-hover:aria-[expanded=true]:[--controls-opacity:1]';\nexport const hoverableControlItem = 'opacity-(--controls-opacity)';\n", "//\n// Copyright 2022 DXOS.org\n//\n\n// TODO(burdon): Replace with Message component.\nexport const descriptionMessage = 'text-description border border-dashed border-separator rounded-sm p-4';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentFragment, type Elevation, type SurfaceLevel } from '@dxos/ui-types';\n\nexport const surfaceShadow: ComponentFragment<{ elevation?: Elevation }> = ({ elevation }) => [\n elevation === 'positioned'\n ? 'shadow-sm'\n : elevation === 'dialog' || elevation === 'toast'\n ? 'shadow-md'\n : 'shadow-none',\n];\n\nexport const surfaceZIndex: ComponentFragment<{ level?: SurfaceLevel; elevation?: Elevation }> = ({\n level,\n elevation,\n}) => {\n switch (level) {\n case 'tooltip':\n return elevation === 'dialog' ? ['z-[53]'] : elevation === 'toast' ? ['z-[43]'] : ['z-50'];\n case 'menu':\n return elevation === 'dialog' ? ['z-[52]'] : elevation === 'toast' ? ['z-[42]'] : ['z-20'];\n default:\n return elevation === 'dialog' ? ['z-[51]'] : elevation === 'toast' ? ['z-[41]'] : ['z-[1]'];\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ChromaticPalette } from '@dxos/ui-types';\n\nexport type Hue = ChromaticPalette | 'neutral';\n\n/**\n * See theme.css\n */\nexport type ColorStyles = {\n hue: Hue;\n bg: string;\n surface: string;\n fg: string;\n text: string;\n border: string;\n};\n\nconst neutral: ColorStyles = {\n hue: 'neutral',\n bg: 'bg-neutral-bg',\n surface: 'bg-neutral-surface',\n fg: 'text-neutral-fg',\n text: 'text-neutral-text',\n border: 'border-neutral-border',\n};\n\n// NOTE: Coordinated with `tag.css`.\n// https://github.com/dxos/dxos/blob/main/packages/ui/react-ui-theme/src/styles/layers/tag.css\nconst styles: ColorStyles[] = [\n {\n hue: 'red',\n bg: 'bg-red-bg',\n surface: 'bg-red-surface',\n fg: 'text-red-fg',\n text: 'text-red-text',\n border: 'border-red-border',\n },\n {\n hue: 'orange',\n bg: 'bg-orange-bg',\n surface: 'bg-orange-surface',\n fg: 'text-orange-fg',\n text: 'text-orange-text',\n border: 'border-orange-border',\n },\n {\n hue: 'amber',\n bg: 'bg-amber-bg',\n surface: 'bg-amber-surface',\n fg: 'text-amber-fg',\n text: 'text-amber-text',\n border: 'border-amber-border',\n },\n {\n hue: 'yellow',\n bg: 'bg-yellow-bg',\n surface: 'bg-yellow-surface',\n fg: 'text-yellow-fg',\n text: 'text-yellow-text',\n border: 'border-yellow-border',\n },\n {\n hue: 'lime',\n bg: 'bg-lime-bg',\n surface: 'bg-lime-surface',\n fg: 'text-lime-fg',\n text: 'text-lime-text',\n border: 'border-lime-border',\n },\n {\n hue: 'green',\n bg: 'bg-green-bg',\n surface: 'bg-green-surface',\n fg: 'text-green-fg',\n text: 'text-green-text',\n border: 'border-green-border',\n },\n {\n hue: 'emerald',\n bg: 'bg-emerald-bg',\n surface: 'bg-emerald-surface',\n fg: 'text-emerald-fg',\n text: 'text-emerald-text',\n border: 'border-emerald-border',\n },\n {\n hue: 'teal',\n bg: 'bg-teal-bg',\n surface: 'bg-teal-surface',\n fg: 'text-teal-fg',\n text: 'text-teal-text',\n border: 'border-teal-border',\n },\n {\n hue: 'cyan',\n bg: 'bg-cyan-bg',\n surface: 'bg-cyan-surface',\n fg: 'text-cyan-fg',\n text: 'text-cyan-text',\n border: 'border-cyan-border',\n },\n {\n hue: 'sky',\n bg: 'bg-sky-bg',\n surface: 'bg-sky-surface',\n fg: 'text-sky-fg',\n text: 'text-sky-text',\n border: 'border-sky-border',\n },\n {\n hue: 'blue',\n bg: 'bg-blue-bg',\n surface: 'bg-blue-surface',\n fg: 'text-blue-fg',\n text: 'text-blue-text',\n border: 'border-blue-border',\n },\n {\n hue: 'indigo',\n bg: 'bg-indigo-bg',\n surface: 'bg-indigo-surface',\n fg: 'text-indigo-fg',\n text: 'text-indigo-text',\n border: 'border-indigo-border',\n },\n {\n hue: 'violet',\n bg: 'bg-violet-bg',\n surface: 'bg-violet-surface',\n fg: 'text-violet-fg',\n text: 'text-violet-text',\n border: 'border-violet-border',\n },\n {\n hue: 'purple',\n bg: 'bg-purple-bg',\n surface: 'bg-purple-surface',\n fg: 'text-purple-fg',\n text: 'text-purple-text',\n border: 'border-purple-border',\n },\n {\n hue: 'fuchsia',\n bg: 'bg-fuchsia-bg',\n surface: 'bg-fuchsia-surface',\n fg: 'text-fuchsia-fg',\n text: 'text-fuchsia-text',\n border: 'border-fuchsia-border',\n },\n {\n hue: 'pink',\n bg: 'bg-pink-bg',\n surface: 'bg-pink-surface',\n fg: 'text-pink-fg',\n text: 'text-pink-text',\n border: 'border-pink-border',\n },\n {\n hue: 'rose',\n bg: 'bg-rose-bg',\n surface: 'bg-rose-surface',\n fg: 'text-rose-fg',\n text: 'text-rose-text',\n border: 'border-rose-border',\n },\n];\n\nexport const palette = {\n neutral,\n hues: styles,\n};\n\nconst validHues: ReadonlySet<Hue> = new Set<Hue>([neutral.hue, ...styles.map((s) => s.hue)]);\n\n/**\n * Normalise an arbitrary string into a known `Hue`, falling back to `'neutral'` when the\n * input doesn't match one of the catalogued palette entries. Useful when accepting hue\n * values from user-authored data (e.g. ECHO objects, plugin settings) that need to be\n * forwarded to a hue-keyed prop like `Tag`'s `palette`.\n */\nexport const toHue = (hue: string | undefined): Hue => (hue && validHues.has(hue as Hue) ? (hue as Hue) : 'neutral');\n\n// TODO(burdon): Rename getClassNames.\nexport const getStyles = (hue: string): ColorStyles => {\n return styles.find((color) => color.hue === hue) || neutral;\n};\n\n// TODO(thure): Reconcile with `to-fallback.ts` which exports `toHue` which overlaps a lot.\nexport const getHashStyles = (id: string | undefined): ColorStyles => {\n return getStyles(getHashHue(id));\n};\n\nexport const getHashHue = (id: string | undefined): Hue => {\n return id ? styles[getHash(id) % styles.length].hue : 'neutral';\n};\n\nconst getHash = (id: string): number => id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { extendTailwindMerge, validators } from 'tailwind-merge';\n\nimport { type AdditionalClassGroups, twMergeConfig } from './tw-merge-config';\n\nexport const mx = extendTailwindMerge<AdditionalClassGroups>({\n extend: {\n ...twMergeConfig.extend,\n classGroups: {\n ...twMergeConfig.extend.classGroups,\n // Arbitrary numeric font-weights require a validator (not expressible as a plain string token).\n 'font-weight': [...twMergeConfig.extend.classGroups['font-weight'], validators.isArbitraryNumber],\n },\n },\n});\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Shared tailwind-merge configuration. The single source for both {@link mx} (extendTailwindMerge)\n * and the {@link tv} instance (createTV `twMergeConfig`) so conflict resolution can't drift —\n * notably for dxos custom tokens (`text-base-fg`, density, focus-ring).\n */\nexport const twMergeConfig = {\n extend: {\n classGroups: {\n 'font-family': ['font-body', 'font-mono'],\n 'font-weight': [\n 'font-thin',\n 'font-extralight',\n 'font-light',\n 'font-normal',\n 'font-medium',\n 'font-semibold',\n 'font-bold',\n 'font-extrabold',\n 'font-black',\n ],\n 'density': ['dx-density-sm', 'dx-density-md', 'dx-density-lg'],\n 'dx-focus-ring': [\n 'dx-focus-ring',\n 'dx-focus-ring-inset',\n 'dx-focus-ring-always',\n 'dx-focus-ring-inset-always',\n 'dx-focus-ring-group',\n 'dx-focus-ring-group-x',\n 'dx-focus-ring-group-y',\n 'dx-focus-ring-group-always',\n 'dx-focus-ring-group-x-always',\n 'dx-focus-ring-group-y-always',\n 'dx-focus-ring-inset-over-all',\n 'dx-focus-ring-inset-over-all-always',\n 'dx-focus-ring-main',\n 'dx-focus-ring-main-always',\n ],\n },\n },\n} as const;\n\nexport type AdditionalClassGroups = 'density' | 'dx-focus-ring';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type CSSProperties } from 'react';\n\nimport { type Size } from '@dxos/ui-types';\n\nimport { mx } from '../util';\n\n// NOTE: Class names must be fully-specified string literals so Tailwind's static scanner can detect them.\nconst sizeMap: Record<string, { w: string; h: string }> = {\n 0: { w: 'w-0', h: 'h-0' },\n px: { w: 'w-px', h: 'h-px' },\n 0.5: { w: 'w-0.5', h: 'h-0.5' },\n 1: { w: 'w-1', h: 'h-1' },\n 1.5: { w: 'w-1.5', h: 'h-1.5' },\n 2: { w: 'w-2', h: 'h-2' },\n 2.5: { w: 'w-2.5', h: 'h-2.5' },\n 3: { w: 'w-3', h: 'h-3' },\n 3.5: { w: 'w-3.5', h: 'h-3.5' },\n 4: { w: 'w-4', h: 'h-4' },\n 5: { w: 'w-5', h: 'h-5' },\n 6: { w: 'w-6', h: 'h-6' },\n 7: { w: 'w-7', h: 'h-7' },\n 8: { w: 'w-8', h: 'h-8' },\n 9: { w: 'w-9', h: 'h-9' },\n 10: { w: 'w-10', h: 'h-10' },\n 11: { w: 'w-11', h: 'h-11' },\n 12: { w: 'w-12', h: 'h-12' },\n 14: { w: 'w-14', h: 'h-14' },\n 16: { w: 'w-16', h: 'h-16' },\n 20: { w: 'w-20', h: 'h-20' },\n 24: { w: 'w-24', h: 'h-24' },\n 28: { w: 'w-28', h: 'h-28' },\n 32: { w: 'w-32', h: 'h-32' },\n 36: { w: 'w-36', h: 'h-36' },\n 40: { w: 'w-40', h: 'h-40' },\n 44: { w: 'w-44', h: 'h-44' },\n 48: { w: 'w-48', h: 'h-48' },\n 52: { w: 'w-52', h: 'h-52' },\n 56: { w: 'w-56', h: 'h-56' },\n 60: { w: 'w-60', h: 'h-60' },\n 64: { w: 'w-64', h: 'h-64' },\n 72: { w: 'w-72', h: 'h-72' },\n 80: { w: 'w-80', h: 'h-80' },\n 96: { w: 'w-96', h: 'h-96' },\n};\n\nconst SIZE_VALUES: Size[] = Object.keys(sizeMap).map((key) => (key === 'px' ? 'px' : (Number(key) as Size)));\n\nexport const getHeight = (size: Size) => sizeMap[size]?.h;\nexport const getWidth = (size: Size) => sizeMap[size]?.w;\nexport const getSize = (size: Size) => mx(getHeight(size), getWidth(size));\n\nexport const sizeValue = (size: Size): number => (size === 'px' ? 1 : size);\nexport const sizeToRem = (size: Size): string => (size === 'px' ? '1px' : `${(size as number) * 0.25}rem`);\n\nexport const iconSize = (size: Size | null): CSSProperties =>\n ({ '--icon-size': size ? sizeToRem(size) : 'initial' }) as CSSProperties;\n\n/**\n * Snaps an arbitrary numeric value to the nearest valid Tailwind size token.\n *\n * The function tries progressively coarser series in order until a match is found:\n * 1. Exact match — returns the value as-is if it is already a valid `Size`.\n * 2. Zero or negative — clamps to `0`.\n * 3. Sub-half values (`< 0.5`) — maps to the `'px'` token (1 px).\n * 4. Half-step series (0.5 increments, e.g. 1.5, 2.5 …).\n * 5. Whole-number series (1, 2, 3 …).\n * 6. Double series (even numbers: 2, 4, 6 …).\n * 7. Quadruple series (multiples of 4: 4, 8, 12 …).\n * 8. Falls back to `defaultSize` if no series matches.\n *\n * @param value - Numeric size to snap (in Tailwind spacing units, where 1 unit = 0.25 rem).\n * @param defaultSize - Fallback `Size` token used when no series produces a valid match.\n * @returns The nearest valid `Size` token.\n */\nexport const snapSize = (value: number, defaultSize: Size): Size => {\n if (SIZE_VALUES.includes(value as Size)) {\n return value as Size;\n } else if (value <= 0) {\n return 0;\n } else if (value < 0.5) {\n return 'px';\n } else {\n const wholeSeries = Math.floor(value);\n const halfSeries = Math.floor(value * 2) / 2;\n const doubleSeries = Math.floor(value / 2) * 2;\n const quadrupleSeries = Math.floor(value / 4) * 4;\n if (SIZE_VALUES.includes(halfSeries as Size)) {\n return halfSeries as Size;\n } else if (SIZE_VALUES.includes(wholeSeries as Size)) {\n return wholeSeries as Size;\n } else if (SIZE_VALUES.includes(doubleSeries as Size)) {\n return doubleSeries as Size;\n } else if (SIZE_VALUES.includes(quadrupleSeries as Size)) {\n return quadrupleSeries as Size;\n } else {\n return defaultSize;\n }\n }\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { createTV } from 'tailwind-variants';\n\nimport { type ClassNameArray, type ClassNameValue, type Theme } from '@dxos/ui-types';\n\nimport { twMergeConfig } from './tw-merge-config';\n\nexport type { VariantProps } from 'tailwind-variants';\n\n/**\n * Shared tailwind-variants instance bound to the dxos tailwind-merge config (see {@link twMergeConfig}),\n * so recipes resolve class conflicts identically to {@link mx}. All component theme recipes import this,\n * never the bare `tailwind-variants` package.\n */\nexport const tv = createTV({ twMerge: true, twMergeConfig });\n\ntype SlotsRecipe<P extends Record<string, any>, S extends string> = (\n props?: P,\n) => Record<S, (opts?: { class?: ClassNameValue }) => string>;\n\n/**\n * The {@link Theme} sub-tree produced by {@link bridgeTv}, with each slot's resolver explicitly typed\n * so call sites (and tests) stay fully typed instead of falling back to `any`.\n */\nexport type BridgedTheme<P extends Record<string, any>, S extends string> = Theme<P> & {\n [K in S]: (styleProps: P, ...etc: ClassNameArray) => string;\n};\n\n/**\n * Adapt a tailwind-variants slots recipe into the existing {@link Theme} shape (a map of\n * {@link import('@dxos/ui-types').ComponentFunction}) so it can register in the `tx` theme tree and be\n * consumed via `tx('component.slot', styleProps, ...classNames)`. Slots are enumerated explicitly (not\n * via Proxy) so unknown paths resolve to `undefined` exactly as `getDeep` does today, and the result is\n * a plain, inspectable object. Derive `slots` from `Object.keys(recipe())` at the call site.\n */\nexport const bridgeTv = <P extends Record<string, any>, S extends string>(\n recipe: SlotsRecipe<P, S>,\n slots: readonly S[],\n): BridgedTheme<P, S> =>\n Object.fromEntries(\n slots.map((slot) => [slot, (styleProps: P, ...etc: ClassNameArray) => recipe(styleProps)[slot]({ class: etc })]),\n ) as BridgedTheme<P, S>;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type MessageValence } from '@dxos/ui-types';\n\nexport const textValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium text-success-text';\n case 'info':\n return 'font-medium text-info-text';\n case 'warning':\n return 'font-medium text-warning-text';\n case 'error':\n return 'font-medium text-error-text';\n default:\n return 'font-medium';\n }\n};\n\nexport const messageValence = (valence?: MessageValence) => {\n switch (valence) {\n case 'success':\n return 'font-medium border-success-text text-success-fg bg-success-surface';\n case 'info':\n return 'font-medium border-info-text text-info-fg bg-info-surface';\n case 'warning':\n return 'font-medium border-warning-text text-warning-fg bg-warning-surface';\n case 'error':\n return 'font-medium border-error-text text-error-fg bg-error-surface';\n default:\n return 'font-medium border-neutral-text text-neutral-fg bg-neutral-surface';\n }\n};\n\n/**\n * Classes for a Button rendered inside a Message.Root that should inherit the message's valence color.\n * Message.Root sets --dx-valence-bg / --dx-valence-bg-hover / --dx-valence-text on its DOM node.\n * Pass variant='valence' to the Button so button.css reads those variables.\n */\nexport const buttonValence = (_valence?: MessageValence): string =>\n 'text-(--dx-valence-text) bg-(--dx-valence-bg) hover:bg-(--dx-valence-bg-hover)';\n"],
5
+ "mappings": ";;;AAOO,IAAMA,iBAAiB;AAEvB,IAAMC,YAAY;EAAC;EAAI;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;;AAIpE,IAAMC,QAAQ;EAAC;EAAQ;EAAW;EAAc;EAAQ;;AAOxD,IAAMC,oBAAoB;AAC1B,IAAMC,wBAAwB;AAC9B,IAAMC,oBAAoB;AAC1B,IAAMC,mBAAmB;AACzB,IAAMC,mBAAmB;;;ACpBzB,IAAMC,iBAAiB;AACvB,IAAMC,eAAe;;;ACDrB,IAAMC,oBACX;AAEK,IAAMC,sCAAsC;AAE5C,IAAMC,mCAAmC;AACzC,IAAMC,iCAAiC;AACvC,IAAMC,2BAA2B;AACjC,IAAMC,uBAAuB;;;ACP7B,IAAMC,qBAAqB;;;ACC3B,IAAMC,gBAA8D,CAAC,EAAEC,UAAS,MAAO;EAC5FA,cAAc,eACV,cACAA,cAAc,YAAYA,cAAc,UACtC,cACA;;AAGD,IAAMC,gBAAoF,CAAC,EAChGC,OACAF,UAAS,MACV;AACC,UAAQE,OAAAA;IACN,KAAK;AACH,aAAOF,cAAc,WAAW;QAAC;UAAYA,cAAc,UAAU;QAAC;UAAY;QAAC;;IACrF,KAAK;AACH,aAAOA,cAAc,WAAW;QAAC;UAAYA,cAAc,UAAU;QAAC;UAAY;QAAC;;IACrF;AACE,aAAOA,cAAc,WAAW;QAAC;UAAYA,cAAc,UAA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DefaultInlineSize", "cardMaxInlineSize", "cardMinBlockSize", "cardMaxBlockSize", "staticDisabled", "dataDisabled", "hoverableControls", "groupHoverControlItemWithTransition", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "hoverableOpenControlItem", "hoverableControlItem", "descriptionMessage", "surfaceShadow", "elevation", "surfaceZIndex", "level", "neutral", "hue", "bg", "surface", "fg", "text", "border", "styles", "palette", "hues", "validHues", "Set", "map", "s", "toHue", "has", "getStyles", "find", "color", "getHashStyles", "id", "getHashHue", "getHash", "length", "split", "reduce", "acc", "char", "charCodeAt", "extendTailwindMerge", "validators", "twMergeConfig", "extend", "classGroups", "mx", "extendTailwindMerge", "extend", "twMergeConfig", "classGroups", "validators", "isArbitraryNumber", "sizeMap", "w", "h", "px", "SIZE_VALUES", "Object", "keys", "map", "key", "Number", "getHeight", "size", "getWidth", "getSize", "mx", "sizeValue", "sizeToRem", "iconSize", "snapSize", "value", "defaultSize", "includes", "wholeSeries", "Math", "floor", "halfSeries", "doubleSeries", "quadrupleSeries", "createTV", "tv", "createTV", "twMerge", "twMergeConfig", "bridgeTv", "recipe", "slots", "Object", "fromEntries", "map", "slot", "styleProps", "etc", "class", "textValence", "valence", "messageValence", "buttonValence", "_valence"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/defs.ts":{"bytes":3994,"imports":[],"format":"esm"},"src/fragments/density.ts":{"bytes":3504,"imports":[],"format":"esm"},"src/fragments/disabled.ts":{"bytes":808,"imports":[],"format":"esm"},"src/fragments/hover.ts":{"bytes":2576,"imports":[],"format":"esm"},"src/fragments/text.ts":{"bytes":740,"imports":[],"format":"esm"},"src/fragments/index.ts":{"bytes":749,"imports":[{"path":"src/fragments/density.ts","kind":"import-statement","original":"./density"},{"path":"src/fragments/disabled.ts","kind":"import-statement","original":"./disabled"},{"path":"src/fragments/hover.ts","kind":"import-statement","original":"./hover"},{"path":"src/fragments/text.ts","kind":"import-statement","original":"./text"}],"format":"esm"},"src/util/elevation.ts":{"bytes":3016,"imports":[],"format":"esm"},"src/util/hash-styles.ts":{"bytes":14739,"imports":[],"format":"esm"},"src/util/tw-merge-config.ts":{"bytes":4168,"imports":[],"format":"esm"},"src/util/mx.ts":{"bytes":2097,"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/size.ts":{"bytes":13347,"imports":[{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/util/tv.ts":{"bytes":4621,"imports":[{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/valence.ts":{"bytes":4284,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":894,"imports":[{"path":"src/util/elevation.ts","kind":"import-statement","original":"./elevation"},{"path":"src/util/hash-styles.ts","kind":"import-statement","original":"./hash-styles"},{"path":"src/util/mx.ts","kind":"import-statement","original":"./mx"},{"path":"src/util/size.ts","kind":"import-statement","original":"./size"},{"path":"src/util/tv.ts","kind":"import-statement","original":"./tv"},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"},{"path":"src/util/valence.ts","kind":"import-statement","original":"./valence"}],"format":"esm"},"src/index.ts":{"bytes":537,"imports":[{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/fragments/index.ts","kind":"import-statement","original":"./fragments"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27639},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true}],"exports":["bridgeTv","buttonValence","cardDefaultInlineSize","cardMaxBlockSize","cardMaxInlineSize","cardMinBlockSize","cardMinInlineSize","dataDisabled","densityBlockSize","densityDimensions","descriptionMessage","getHashHue","getHashStyles","getHeight","getSize","getStyles","getWidth","ghostFocusWithin","ghostHover","groupHoverControlItemWithTransition","hoverableControlItem","hoverableControls","hoverableFocusedKeyboardControls","hoverableFocusedWithinControls","hoverableOpenControlItem","hueShades","hues","iconSize","messageValence","mx","osTranslations","palette","roles","sizeToRem","sizeValue","snapSize","staticDisabled","surfaceShadow","surfaceZIndex","textValence","toHue","tv","twMergeConfig"],"entryPoint":"src/index.ts","inputs":{"src/defs.ts":{"bytesInOutput":557},"src/index.ts":{"bytesInOutput":0},"src/fragments/density.ts":{"bytesInOutput":846},"src/fragments/disabled.ts":{"bytesInOutput":150},"src/fragments/hover.ts":{"bytesInOutput":640},"src/fragments/text.ts":{"bytesInOutput":98},"src/util/elevation.ts":{"bytesInOutput":730},"src/util/hash-styles.ts":{"bytesInOutput":3647},"src/util/mx.ts":{"bytesInOutput":445},"src/util/tw-merge-config.ts":{"bytesInOutput":1009},"src/util/size.ts":{"bytesInOutput":2671},"src/util/tv.ts":{"bytesInOutput":264},"src/util/valence.ts":{"bytesInOutput":1024}},"bytes":13278}}}
1
+ {"inputs":{"src/defs.ts":{"bytes":3019,"imports":[],"format":"esm"},"src/fragments/disabled.ts":{"bytes":808,"imports":[],"format":"esm"},"src/fragments/hover.ts":{"bytes":2175,"imports":[],"format":"esm"},"src/fragments/text.ts":{"bytes":740,"imports":[],"format":"esm"},"src/fragments/index.ts":{"bytes":662,"imports":[{"path":"src/fragments/disabled.ts","kind":"import-statement","original":"./disabled"},{"path":"src/fragments/hover.ts","kind":"import-statement","original":"./hover"},{"path":"src/fragments/text.ts","kind":"import-statement","original":"./text"}],"format":"esm"},"src/util/elevation.ts":{"bytes":3016,"imports":[],"format":"esm"},"src/util/hash-styles.ts":{"bytes":14739,"imports":[],"format":"esm"},"src/util/tw-merge-config.ts":{"bytes":4168,"imports":[],"format":"esm"},"src/util/mx.ts":{"bytes":2097,"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/size.ts":{"bytes":13347,"imports":[{"path":"src/util/index.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/util/tv.ts":{"bytes":4621,"imports":[{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"}],"format":"esm"},"src/util/valence.ts":{"bytes":4284,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":894,"imports":[{"path":"src/util/elevation.ts","kind":"import-statement","original":"./elevation"},{"path":"src/util/hash-styles.ts","kind":"import-statement","original":"./hash-styles"},{"path":"src/util/mx.ts","kind":"import-statement","original":"./mx"},{"path":"src/util/size.ts","kind":"import-statement","original":"./size"},{"path":"src/util/tv.ts","kind":"import-statement","original":"./tv"},{"path":"src/util/tw-merge-config.ts","kind":"import-statement","original":"./tw-merge-config"},{"path":"src/util/valence.ts","kind":"import-statement","original":"./valence"}],"format":"esm"},"src/index.ts":{"bytes":537,"imports":[{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/fragments/index.ts","kind":"import-statement","original":"./fragments"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25228},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"tailwind-merge","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true}],"exports":["bridgeTv","buttonValence","cardDefaultInlineSize","cardMaxBlockSize","cardMaxInlineSize","cardMinBlockSize","cardMinInlineSize","dataDisabled","descriptionMessage","getHashHue","getHashStyles","getHeight","getSize","getStyles","getWidth","groupHoverControlItemWithTransition","hoverableControlItem","hoverableControls","hoverableFocusedKeyboardControls","hoverableFocusedWithinControls","hoverableOpenControlItem","hueShades","iconSize","messageValence","mx","osTranslations","palette","roles","sizeToRem","sizeValue","snapSize","staticDisabled","surfaceShadow","surfaceZIndex","textValence","toHue","tv","twMergeConfig"],"entryPoint":"src/index.ts","inputs":{"src/defs.ts":{"bytesInOutput":356},"src/index.ts":{"bytesInOutput":0},"src/fragments/disabled.ts":{"bytesInOutput":150},"src/fragments/hover.ts":{"bytesInOutput":541},"src/fragments/text.ts":{"bytesInOutput":98},"src/util/elevation.ts":{"bytesInOutput":730},"src/util/hash-styles.ts":{"bytesInOutput":3647},"src/util/mx.ts":{"bytesInOutput":445},"src/util/tw-merge-config.ts":{"bytesInOutput":1009},"src/util/size.ts":{"bytesInOutput":2671},"src/util/tv.ts":{"bytesInOutput":264},"src/util/valence.ts":{"bytesInOutput":1024}},"bytes":12020}}}