@jolly-pixel/ui 1.0.1 → 2.0.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 (117) hide show
  1. package/LICENSE +44 -44
  2. package/NOTICE +9 -0
  3. package/README.md +194 -194
  4. package/dist/containers/Dialog.js +11 -11
  5. package/dist/containers/Dialog.styles.js +48 -48
  6. package/dist/containers/Dock.js +11 -11
  7. package/dist/containers/Dock.styles.js +351 -351
  8. package/dist/containers/DockLayout.js +4 -4
  9. package/dist/containers/Floating.js +23 -23
  10. package/dist/containers/Floating.styles.js +116 -116
  11. package/dist/containers/Folder.js +28 -28
  12. package/dist/containers/Folder.styles.js +221 -221
  13. package/dist/containers/Pane.js +50 -50
  14. package/dist/containers/Pane.styles.js +186 -186
  15. package/dist/containers/Rail.js +18 -18
  16. package/dist/containers/Tab.js +10 -10
  17. package/dist/containers/Tabs.js +26 -26
  18. package/dist/containers/Tabs.styles.js +93 -93
  19. package/dist/containers/Toolbar.js +25 -25
  20. package/dist/containers/resize.js +5 -5
  21. package/dist/controls/Button.js +9 -9
  22. package/dist/controls/Button.styles.js +79 -79
  23. package/dist/controls/ButtonGroup.js +28 -28
  24. package/dist/controls/ButtonGroup.styles.js +98 -98
  25. package/dist/controls/Checkbox.js +14 -14
  26. package/dist/controls/Checkbox.styles.js +111 -111
  27. package/dist/controls/Color.js +51 -51
  28. package/dist/controls/Color.styles.js +83 -83
  29. package/dist/controls/ColorPicker.js +104 -104
  30. package/dist/controls/ColorPicker.styles.js +296 -296
  31. package/dist/controls/Control.js +33 -33
  32. package/dist/controls/Control.styles.js +102 -102
  33. package/dist/controls/Controls.js +11 -11
  34. package/dist/controls/Controls.styles.js +98 -98
  35. package/dist/controls/Flags.js +18 -18
  36. package/dist/controls/Flags.styles.js +59 -59
  37. package/dist/controls/Number.js +21 -21
  38. package/dist/controls/Number.styles.js +44 -44
  39. package/dist/controls/PropertyRow.js +13 -13
  40. package/dist/controls/PropertyRow.styles.js +105 -105
  41. package/dist/controls/Range.js +24 -24
  42. package/dist/controls/Range.styles.js +25 -25
  43. package/dist/controls/Select.js +23 -23
  44. package/dist/controls/Select.styles.js +47 -47
  45. package/dist/controls/Separator.js +11 -11
  46. package/dist/controls/Separator.styles.js +45 -45
  47. package/dist/controls/Slider.js +36 -36
  48. package/dist/controls/Slider.styles.js +161 -161
  49. package/dist/controls/Text.js +17 -17
  50. package/dist/data/Tree.d.ts +0 -14
  51. package/dist/data/Tree.d.ts.map +1 -1
  52. package/dist/data/Tree.js +90 -120
  53. package/dist/data/Tree.js.map +1 -1
  54. package/dist/data/Tree.styles.d.ts.map +1 -1
  55. package/dist/data/Tree.styles.js +220 -237
  56. package/dist/data/Tree.styles.js.map +1 -1
  57. package/dist/data/dropZone.d.ts +0 -10
  58. package/dist/data/dropZone.d.ts.map +1 -1
  59. package/dist/data/dropZone.js +0 -10
  60. package/dist/data/dropZone.js.map +1 -1
  61. package/dist/data/resolveRename.d.ts +0 -3
  62. package/dist/data/resolveRename.d.ts.map +1 -1
  63. package/dist/data/resolveRename.js +0 -3
  64. package/dist/data/resolveRename.js.map +1 -1
  65. package/dist/data/resolveReparent.d.ts +0 -7
  66. package/dist/data/resolveReparent.d.ts.map +1 -1
  67. package/dist/data/resolveReparent.js +0 -6
  68. package/dist/data/resolveReparent.js.map +1 -1
  69. package/dist/data/rowDragSession.d.ts +0 -8
  70. package/dist/data/rowDragSession.d.ts.map +1 -1
  71. package/dist/data/rowDragSession.js +0 -6
  72. package/dist/data/rowDragSession.js.map +1 -1
  73. package/dist/data/treeNodes.d.ts +0 -6
  74. package/dist/data/treeNodes.d.ts.map +1 -1
  75. package/dist/data/treeNodes.js +2 -7
  76. package/dist/data/treeNodes.js.map +1 -1
  77. package/dist/feedback/JollyPixelLogo.js +84 -84
  78. package/dist/feedback/Loading.js +29 -29
  79. package/dist/feedback/Loading.styles.js +230 -230
  80. package/dist/feedback/Log.js +8 -8
  81. package/dist/feedback/Log.styles.js +61 -61
  82. package/dist/feedback/Progress.js +17 -17
  83. package/dist/feedback/Progress.styles.js +146 -146
  84. package/dist/field/JollyField.js +51 -51
  85. package/dist/field/JollyField.styles.js +429 -429
  86. package/dist/icon/Icon.js +24 -24
  87. package/dist/icon/builtins.js +126 -126
  88. package/dist/interaction/drag/DragSession.js +6 -6
  89. package/dist/interaction/scrub/ScrubController.js +6 -6
  90. package/dist/math/AxisController.js +22 -22
  91. package/dist/math/Point2d.js +12 -12
  92. package/dist/math/Point2d.styles.js +49 -49
  93. package/dist/math/Quaternion.js +4 -4
  94. package/dist/math/Transform.js +40 -40
  95. package/dist/math/Transform.styles.js +17 -17
  96. package/dist/math/VectorField.js +4 -4
  97. package/dist/math/VectorField.styles.js +102 -102
  98. package/dist/monitors/Graph.js +8 -8
  99. package/dist/monitors/Graph.styles.js +42 -42
  100. package/dist/monitors/Monitor.js +5 -5
  101. package/dist/monitors/Monitor.styles.js +31 -31
  102. package/dist/peer/Presence.js +33 -33
  103. package/dist/peer/Presence.styles.js +82 -82
  104. package/dist/stats/Stats.js +6 -6
  105. package/dist/stats/Stats.styles.js +54 -54
  106. package/dist/theme/components/DensityControl.js +16 -16
  107. package/dist/theme/components/ThemeControl.js +16 -16
  108. package/dist/theme/components/ThemePreferences.js +18 -18
  109. package/dist/theme/font.js +9 -9
  110. package/dist/theme/styles/hiddenStyles.js +4 -4
  111. package/dist/theme/styles/mixins.js +16 -16
  112. package/dist/theme/styles/themeStyles.js +4 -4
  113. package/dist/theme/tokens/density.js +19 -19
  114. package/dist/theme/tokens/ramps.js +40 -40
  115. package/dist/theme/tokens/scales.js +56 -56
  116. package/dist/theme/tokens/semantic.js +184 -184
  117. package/package.json +6 -5
@@ -3,61 +3,61 @@ import { css } from "lit";
3
3
  /**
4
4
  * Shared spacing, motion, and numeric-font tokens.
5
5
  */
6
- export const scaleTokens = css `
7
- :host {
8
- --jolly-space-1: 4px;
9
- --jolly-space-2: 8px;
10
- --jolly-space-3: 12px;
11
- --jolly-space-4: 16px;
12
- --jolly-space-5: 20px;
13
- --jolly-space-6: 24px;
14
-
15
- /*
16
- * Two radii with clearly different jobs: controls are nearly square, planes
17
- * are visibly rounded, so the two never read as the same role.
18
- */
19
- --jolly-radius-sm: 2px;
20
- --jolly-radius-md: 6px;
21
-
22
- /*
23
- * Rows own no outer spacing. The container that stacks them applies this gap,
24
- * so consumers can stack fields flush when they want to.
25
- */
26
- --jolly-row-gap: var(--jolly-space-1);
27
-
28
- /* Extra separation after folder groups, including reordered folders. */
29
- --jolly-folder-gap: calc(var(--jolly-space-1) / 2);
30
-
31
- /*
32
- * Reserved leading space for the lock affordance. Zero by default; a
33
- * collaborative container opts its subtree in, which buys the fixed inset
34
- * that keeps lock state from shifting the row.
35
- */
36
- --jolly-gutter-width: 0px;
37
-
38
- /* Optional shared column for trailing revert and presence chrome. */
39
- --jolly-field-trailing-width: auto;
40
-
41
- /*
42
- * Trailing inset of a field row. Set it to 0 on a subtree whose fields sit
43
- * beside folder headers, where the bar paints past the value otherwise.
44
- */
45
- --jolly-field-inset-end: var(--jolly-space-1);
46
-
47
- --jolly-duration-fast: 100ms;
48
- --jolly-duration-base: 160ms;
49
- --jolly-easing: cubic-bezier(0.2, 0, 0.2, 1);
50
-
51
- --jolly-font-family: "Roboto Mono", ui-monospace, sfmono-regular, "Cascadia Code",
52
- consolas, monospace;
53
- --jolly-font-numeric: "tabular-nums";
54
- }
55
-
56
- @media (prefers-reduced-motion: reduce) {
57
- :host {
58
- --jolly-duration-fast: 0ms;
59
- --jolly-duration-base: 0ms;
60
- }
61
- }
6
+ export const scaleTokens = css `
7
+ :host {
8
+ --jolly-space-1: 4px;
9
+ --jolly-space-2: 8px;
10
+ --jolly-space-3: 12px;
11
+ --jolly-space-4: 16px;
12
+ --jolly-space-5: 20px;
13
+ --jolly-space-6: 24px;
14
+
15
+ /*
16
+ * Two radii with clearly different jobs: controls are nearly square, planes
17
+ * are visibly rounded, so the two never read as the same role.
18
+ */
19
+ --jolly-radius-sm: 2px;
20
+ --jolly-radius-md: 6px;
21
+
22
+ /*
23
+ * Rows own no outer spacing. The container that stacks them applies this gap,
24
+ * so consumers can stack fields flush when they want to.
25
+ */
26
+ --jolly-row-gap: var(--jolly-space-1);
27
+
28
+ /* Extra separation after folder groups, including reordered folders. */
29
+ --jolly-folder-gap: calc(var(--jolly-space-1) / 2);
30
+
31
+ /*
32
+ * Reserved leading space for the lock affordance. Zero by default; a
33
+ * collaborative container opts its subtree in, which buys the fixed inset
34
+ * that keeps lock state from shifting the row.
35
+ */
36
+ --jolly-gutter-width: 0px;
37
+
38
+ /* Optional shared column for trailing revert and presence chrome. */
39
+ --jolly-field-trailing-width: auto;
40
+
41
+ /*
42
+ * Trailing inset of a field row. Set it to 0 on a subtree whose fields sit
43
+ * beside folder headers, where the bar paints past the value otherwise.
44
+ */
45
+ --jolly-field-inset-end: var(--jolly-space-1);
46
+
47
+ --jolly-duration-fast: 100ms;
48
+ --jolly-duration-base: 160ms;
49
+ --jolly-easing: cubic-bezier(0.2, 0, 0.2, 1);
50
+
51
+ --jolly-font-family: "Roboto Mono", ui-monospace, sfmono-regular, "Cascadia Code",
52
+ consolas, monospace;
53
+ --jolly-font-numeric: "tabular-nums";
54
+ }
55
+
56
+ @media (prefers-reduced-motion: reduce) {
57
+ :host {
58
+ --jolly-duration-fast: 0ms;
59
+ --jolly-duration-base: 0ms;
60
+ }
61
+ }
62
62
  `;
63
63
  //# sourceMappingURL=scales.js.map
@@ -6,203 +6,203 @@ import { rampTokens } from "./ramps.js";
6
6
  * Planes are opaque and painted only by window level containers.
7
7
  * Leaves tint instead, so a control composites over whichever plane it lands on.
8
8
  */
9
- const surfaceTokens = css `
10
- --jolly-surface: light-dark(var(--jolly-neutral-100), var(--jolly-neutral-900));
11
- --jolly-surface-sunken: light-dark(var(--jolly-neutral-200), var(--jolly-neutral-950));
12
- --jolly-surface-raised: light-dark(var(--jolly-neutral-0), var(--jolly-neutral-800));
9
+ const surfaceTokens = css `
10
+ --jolly-surface: light-dark(var(--jolly-neutral-100), var(--jolly-neutral-900));
11
+ --jolly-surface-sunken: light-dark(var(--jolly-neutral-200), var(--jolly-neutral-950));
12
+ --jolly-surface-raised: light-dark(var(--jolly-neutral-0), var(--jolly-neutral-800));
13
13
  `;
14
14
  /**
15
15
  * The single interactive colour. Every control background is this ink at an
16
16
  * alpha stop, which is what keeps nested containers coherent without each
17
17
  * depth picking its own opaque ramp index.
18
18
  */
19
- const inkTokens = css `
20
- --jolly-ink: light-dark(var(--jolly-neutral-900), var(--jolly-neutral-50));
21
- --jolly-ink-danger: var(--jolly-danger-500);
22
-
23
- --jolly-control-bg: color-mix(in oklab, var(--jolly-ink) 8%, transparent);
24
- --jolly-control-bg-hover: color-mix(in oklab, var(--jolly-ink) 12%, transparent);
25
- --jolly-control-bg-focus: color-mix(in oklab, var(--jolly-ink) 20%, transparent);
26
- --jolly-control-bg-active: color-mix(in oklab, var(--jolly-ink) 26%, transparent);
27
-
28
- /* Blue chrome separates container hierarchy from neutral leaf controls. */
29
- --jolly-folder-header-bg: color-mix(
30
- in oklab,
31
- var(--jolly-accent-fill) 12%,
32
- transparent
33
- );
34
- --jolly-folder-header-bg-hover: color-mix(
35
- in oklab,
36
- var(--jolly-accent-fill) 18%,
37
- transparent
38
- );
39
- /* Inverted, so an action stays legible over the header pattern. */
40
- --jolly-folder-action-fg: var(--jolly-surface);
41
- --jolly-folder-action-bg: color-mix(
42
- in oklab,
43
- var(--jolly-ink) 84%,
44
- var(--jolly-surface)
45
- );
46
- --jolly-folder-action-bg-hover: color-mix(
47
- in oklab,
48
- var(--jolly-ink) 92%,
49
- var(--jolly-surface)
50
- );
51
- --jolly-folder-action-bg-focus: var(--jolly-ink);
52
- --jolly-folder-action-bg-active: var(--jolly-ink);
53
- /*
54
- * Filled with danger ink, so a destructive action keeps that same weight.
55
- * Its glyph is white in both themes, since the ground stays red in both.
56
- */
57
- --jolly-folder-action-danger-fg: var(--jolly-neutral-0);
58
- --jolly-folder-action-danger-bg: var(--jolly-ink-danger);
59
- --jolly-folder-action-danger-bg-hover: color-mix(
60
- in oklab,
61
- var(--jolly-ink-danger) 86%,
62
- var(--jolly-ink)
63
- );
64
- --jolly-folder-action-danger-bg-focus: color-mix(
65
- in oklab,
66
- var(--jolly-ink-danger) 72%,
67
- var(--jolly-ink)
68
- );
69
-
70
- --jolly-pane-header-bg: var(--jolly-accent-fill);
71
- --jolly-dock-resize-bg: color-mix(
72
- in oklab,
73
- var(--jolly-accent-fill) 12%,
74
- transparent
75
- );
76
- --jolly-dock-resize-bg-hover: color-mix(
77
- in oklab,
78
- var(--jolly-accent-fill) 18%,
79
- transparent
80
- );
81
-
82
- /*
83
- * A drop zone covers a whole dock rather than a handle, so it sits well below
84
- * the resize wash: the same tint over that much area would read as a filled
85
- * panel instead of as a place something can land.
86
- */
87
- --jolly-dock-zone-bg: color-mix(
88
- in oklab,
89
- var(--jolly-accent-fill) 6%,
90
- transparent
91
- );
92
- --jolly-dock-zone-bg-armed: color-mix(
93
- in oklab,
94
- var(--jolly-accent-fill) 10%,
95
- transparent
96
- );
97
-
98
- /* Below the rest stop, so a readonly control reads as inert rather than idle. */
99
- --jolly-control-bg-muted: color-mix(in oklab, var(--jolly-ink) 4%, transparent);
100
-
101
- /* Faint enough to locate the active row without competing with the control. */
102
- --jolly-row-bg-focus: color-mix(in oklab, var(--jolly-ink) 5%, transparent);
103
-
104
- /* Error re-tints the same mechanism, and starts above the hover stop so it
105
- never reads as "the pointer is here". */
106
- --jolly-invalid-bg: color-mix(in oklab, var(--jolly-ink-danger) 15%, transparent);
107
- --jolly-invalid-bg-hover: color-mix(in oklab, var(--jolly-ink-danger) 20%, transparent);
108
- --jolly-invalid-bg-focus: color-mix(in oklab, var(--jolly-ink-danger) 28%, transparent);
109
-
110
- /* Slider and scrub tracks read as a recess rather than a filled control. */
111
- --jolly-groove: color-mix(in oklab, var(--jolly-ink) 20%, transparent);
112
-
113
- /* Dividers sit below the control fill, so they separate without ruling. */
114
- --jolly-divider: color-mix(in oklab, var(--jolly-ink) 10%, transparent);
115
-
116
- /*
117
- * A control already filled with the accent has no room left to tint, so its
118
- * hover and focus steps lighten the fill instead.
119
- */
120
- --jolly-accent-fill-hover: color-mix(in oklab, var(--jolly-accent-fill) 88%, white);
121
- --jolly-accent-fill-focus: color-mix(in oklab, var(--jolly-accent-fill) 76%, white);
19
+ const inkTokens = css `
20
+ --jolly-ink: light-dark(var(--jolly-neutral-900), var(--jolly-neutral-50));
21
+ --jolly-ink-danger: var(--jolly-danger-500);
22
+
23
+ --jolly-control-bg: color-mix(in oklab, var(--jolly-ink) 8%, transparent);
24
+ --jolly-control-bg-hover: color-mix(in oklab, var(--jolly-ink) 12%, transparent);
25
+ --jolly-control-bg-focus: color-mix(in oklab, var(--jolly-ink) 20%, transparent);
26
+ --jolly-control-bg-active: color-mix(in oklab, var(--jolly-ink) 26%, transparent);
27
+
28
+ /* Blue chrome separates container hierarchy from neutral leaf controls. */
29
+ --jolly-folder-header-bg: color-mix(
30
+ in oklab,
31
+ var(--jolly-accent-fill) 12%,
32
+ transparent
33
+ );
34
+ --jolly-folder-header-bg-hover: color-mix(
35
+ in oklab,
36
+ var(--jolly-accent-fill) 18%,
37
+ transparent
38
+ );
39
+ /* Inverted, so an action stays legible over the header pattern. */
40
+ --jolly-folder-action-fg: var(--jolly-surface);
41
+ --jolly-folder-action-bg: color-mix(
42
+ in oklab,
43
+ var(--jolly-ink) 84%,
44
+ var(--jolly-surface)
45
+ );
46
+ --jolly-folder-action-bg-hover: color-mix(
47
+ in oklab,
48
+ var(--jolly-ink) 92%,
49
+ var(--jolly-surface)
50
+ );
51
+ --jolly-folder-action-bg-focus: var(--jolly-ink);
52
+ --jolly-folder-action-bg-active: var(--jolly-ink);
53
+ /*
54
+ * Filled with danger ink, so a destructive action keeps that same weight.
55
+ * Its glyph is white in both themes, since the ground stays red in both.
56
+ */
57
+ --jolly-folder-action-danger-fg: var(--jolly-neutral-0);
58
+ --jolly-folder-action-danger-bg: var(--jolly-ink-danger);
59
+ --jolly-folder-action-danger-bg-hover: color-mix(
60
+ in oklab,
61
+ var(--jolly-ink-danger) 86%,
62
+ var(--jolly-ink)
63
+ );
64
+ --jolly-folder-action-danger-bg-focus: color-mix(
65
+ in oklab,
66
+ var(--jolly-ink-danger) 72%,
67
+ var(--jolly-ink)
68
+ );
69
+
70
+ --jolly-pane-header-bg: var(--jolly-accent-fill);
71
+ --jolly-dock-resize-bg: color-mix(
72
+ in oklab,
73
+ var(--jolly-accent-fill) 12%,
74
+ transparent
75
+ );
76
+ --jolly-dock-resize-bg-hover: color-mix(
77
+ in oklab,
78
+ var(--jolly-accent-fill) 18%,
79
+ transparent
80
+ );
81
+
82
+ /*
83
+ * A drop zone covers a whole dock rather than a handle, so it sits well below
84
+ * the resize wash: the same tint over that much area would read as a filled
85
+ * panel instead of as a place something can land.
86
+ */
87
+ --jolly-dock-zone-bg: color-mix(
88
+ in oklab,
89
+ var(--jolly-accent-fill) 6%,
90
+ transparent
91
+ );
92
+ --jolly-dock-zone-bg-armed: color-mix(
93
+ in oklab,
94
+ var(--jolly-accent-fill) 10%,
95
+ transparent
96
+ );
97
+
98
+ /* Below the rest stop, so a readonly control reads as inert rather than idle. */
99
+ --jolly-control-bg-muted: color-mix(in oklab, var(--jolly-ink) 4%, transparent);
100
+
101
+ /* Faint enough to locate the active row without competing with the control. */
102
+ --jolly-row-bg-focus: color-mix(in oklab, var(--jolly-ink) 5%, transparent);
103
+
104
+ /* Error re-tints the same mechanism, and starts above the hover stop so it
105
+ never reads as "the pointer is here". */
106
+ --jolly-invalid-bg: color-mix(in oklab, var(--jolly-ink-danger) 15%, transparent);
107
+ --jolly-invalid-bg-hover: color-mix(in oklab, var(--jolly-ink-danger) 20%, transparent);
108
+ --jolly-invalid-bg-focus: color-mix(in oklab, var(--jolly-ink-danger) 28%, transparent);
109
+
110
+ /* Slider and scrub tracks read as a recess rather than a filled control. */
111
+ --jolly-groove: color-mix(in oklab, var(--jolly-ink) 20%, transparent);
112
+
113
+ /* Dividers sit below the control fill, so they separate without ruling. */
114
+ --jolly-divider: color-mix(in oklab, var(--jolly-ink) 10%, transparent);
115
+
116
+ /*
117
+ * A control already filled with the accent has no room left to tint, so its
118
+ * hover and focus steps lighten the fill instead.
119
+ */
120
+ --jolly-accent-fill-hover: color-mix(in oklab, var(--jolly-accent-fill) 88%, white);
121
+ --jolly-accent-fill-focus: color-mix(in oklab, var(--jolly-accent-fill) 76%, white);
122
122
  `;
123
123
  /**
124
124
  * Public semantic tokens built from the internal ramps.
125
125
  */
126
- const semanticTokens = css `
127
- --jolly-border: light-dark(var(--jolly-neutral-300), var(--jolly-neutral-700));
128
- --jolly-border-strong: light-dark(var(--jolly-neutral-500), var(--jolly-neutral-500));
129
-
130
- --jolly-text: light-dark(var(--jolly-neutral-900), var(--jolly-neutral-50));
131
- --jolly-text-muted: light-dark(var(--jolly-neutral-600), var(--jolly-neutral-400));
132
- --jolly-text-on-fill: var(--jolly-neutral-0);
133
-
134
- --jolly-accent-fill: var(--jolly-accent-600);
135
- --jolly-accent-text: light-dark(var(--jolly-accent-700), var(--jolly-accent-300));
136
- --jolly-separator-label: var(--jolly-accent-text);
137
- --jolly-separator-rule: color-mix(
138
- in oklab,
139
- var(--jolly-accent-text) 28%,
140
- transparent
141
- );
142
-
143
- --jolly-focus-ring: light-dark(var(--jolly-accent-600), var(--jolly-accent-400));
144
- --jolly-danger: light-dark(var(--jolly-danger-700), var(--jolly-danger-300));
145
- --jolly-danger-border: light-dark(var(--jolly-danger-500), var(--jolly-danger-300));
146
- --jolly-warning: light-dark(var(--jolly-warning-700), var(--jolly-warning-300));
147
- --jolly-success: light-dark(var(--jolly-success-700), var(--jolly-success-300));
148
-
149
- --jolly-modified: light-dark(var(--jolly-accent-600), var(--jolly-accent-400));
150
- --jolly-locked: light-dark(var(--jolly-accent-600), var(--jolly-accent-400));
151
-
152
- --jolly-shadow-overlay: 0 2px 8px light-dark(rgb(0 0 0 / 0.16), rgb(0 0 0 / 0.44));
153
- --jolly-shadow-floating: 0 4px 16px light-dark(rgb(0 0 0 / 0.18), rgb(0 0 0 / 0.5));
154
- --jolly-shadow-modal: 0 12px 40px light-dark(rgb(0 0 0 / 0.24), rgb(0 0 0 / 0.6));
126
+ const semanticTokens = css `
127
+ --jolly-border: light-dark(var(--jolly-neutral-300), var(--jolly-neutral-700));
128
+ --jolly-border-strong: light-dark(var(--jolly-neutral-500), var(--jolly-neutral-500));
129
+
130
+ --jolly-text: light-dark(var(--jolly-neutral-900), var(--jolly-neutral-50));
131
+ --jolly-text-muted: light-dark(var(--jolly-neutral-600), var(--jolly-neutral-400));
132
+ --jolly-text-on-fill: var(--jolly-neutral-0);
133
+
134
+ --jolly-accent-fill: var(--jolly-accent-600);
135
+ --jolly-accent-text: light-dark(var(--jolly-accent-700), var(--jolly-accent-300));
136
+ --jolly-separator-label: var(--jolly-accent-text);
137
+ --jolly-separator-rule: color-mix(
138
+ in oklab,
139
+ var(--jolly-accent-text) 28%,
140
+ transparent
141
+ );
142
+
143
+ --jolly-focus-ring: light-dark(var(--jolly-accent-600), var(--jolly-accent-400));
144
+ --jolly-danger: light-dark(var(--jolly-danger-700), var(--jolly-danger-300));
145
+ --jolly-danger-border: light-dark(var(--jolly-danger-500), var(--jolly-danger-300));
146
+ --jolly-warning: light-dark(var(--jolly-warning-700), var(--jolly-warning-300));
147
+ --jolly-success: light-dark(var(--jolly-success-700), var(--jolly-success-300));
148
+
149
+ --jolly-modified: light-dark(var(--jolly-accent-600), var(--jolly-accent-400));
150
+ --jolly-locked: light-dark(var(--jolly-accent-600), var(--jolly-accent-400));
151
+
152
+ --jolly-shadow-overlay: 0 2px 8px light-dark(rgb(0 0 0 / 0.16), rgb(0 0 0 / 0.44));
153
+ --jolly-shadow-floating: 0 4px 16px light-dark(rgb(0 0 0 / 0.18), rgb(0 0 0 / 0.5));
154
+ --jolly-shadow-modal: 0 12px 40px light-dark(rgb(0 0 0 / 0.24), rgb(0 0 0 / 0.6));
155
155
  `;
156
156
  /**
157
157
  * Scope-host theme tokens with light and dark variants.
158
158
  */
159
- export const themeTokens = css `
160
- :host {
161
- color-scheme: light dark;
162
- ${rampTokens}
163
- ${surfaceTokens}
164
- ${inkTokens}
165
- ${semanticTokens}
166
- }
167
-
168
- :host([theme="light"]) {
169
- color-scheme: light;
170
- }
171
-
172
- :host([theme="dark"]) {
173
- color-scheme: dark;
174
- }
175
-
176
- /*
177
- * The design carries control boundaries with fill rather than an outline, which
178
- * the forced-colors palette flattens away. Restoring a system border here keeps
179
- * the controls operable without affecting the default design.
180
- */
181
- @media (forced-colors: active) {
182
- :host {
183
- --jolly-control-bg: ButtonFace;
184
- --jolly-control-bg-hover: ButtonFace;
185
- --jolly-control-bg-focus: ButtonFace;
186
- --jolly-control-bg-active: ButtonFace;
187
- --jolly-folder-header-bg: ButtonFace;
188
- --jolly-folder-header-bg-hover: ButtonFace;
189
- --jolly-folder-action-fg: ButtonText;
190
- --jolly-folder-action-bg: ButtonFace;
191
- --jolly-folder-action-bg-hover: ButtonFace;
192
- --jolly-folder-action-bg-focus: ButtonFace;
193
- --jolly-folder-action-bg-active: ButtonFace;
194
- --jolly-folder-action-danger-fg: ButtonText;
195
- --jolly-folder-action-danger-bg: ButtonFace;
196
- --jolly-folder-action-danger-bg-hover: ButtonFace;
197
- --jolly-folder-action-danger-bg-focus: ButtonFace;
198
- --jolly-pane-header-bg: ButtonFace;
199
- --jolly-dock-resize-bg: ButtonFace;
200
- --jolly-dock-resize-bg-hover: Highlight;
201
- --jolly-separator-label: CanvasText;
202
- --jolly-separator-rule: ButtonBorder;
203
- --jolly-row-bg-focus: transparent;
204
- --jolly-groove: ButtonBorder;
205
- }
206
- }
159
+ export const themeTokens = css `
160
+ :host {
161
+ color-scheme: light dark;
162
+ ${rampTokens}
163
+ ${surfaceTokens}
164
+ ${inkTokens}
165
+ ${semanticTokens}
166
+ }
167
+
168
+ :host([theme="light"]) {
169
+ color-scheme: light;
170
+ }
171
+
172
+ :host([theme="dark"]) {
173
+ color-scheme: dark;
174
+ }
175
+
176
+ /*
177
+ * The design carries control boundaries with fill rather than an outline, which
178
+ * the forced-colors palette flattens away. Restoring a system border here keeps
179
+ * the controls operable without affecting the default design.
180
+ */
181
+ @media (forced-colors: active) {
182
+ :host {
183
+ --jolly-control-bg: ButtonFace;
184
+ --jolly-control-bg-hover: ButtonFace;
185
+ --jolly-control-bg-focus: ButtonFace;
186
+ --jolly-control-bg-active: ButtonFace;
187
+ --jolly-folder-header-bg: ButtonFace;
188
+ --jolly-folder-header-bg-hover: ButtonFace;
189
+ --jolly-folder-action-fg: ButtonText;
190
+ --jolly-folder-action-bg: ButtonFace;
191
+ --jolly-folder-action-bg-hover: ButtonFace;
192
+ --jolly-folder-action-bg-focus: ButtonFace;
193
+ --jolly-folder-action-bg-active: ButtonFace;
194
+ --jolly-folder-action-danger-fg: ButtonText;
195
+ --jolly-folder-action-danger-bg: ButtonFace;
196
+ --jolly-folder-action-danger-bg-hover: ButtonFace;
197
+ --jolly-folder-action-danger-bg-focus: ButtonFace;
198
+ --jolly-pane-header-bg: ButtonFace;
199
+ --jolly-dock-resize-bg: ButtonFace;
200
+ --jolly-dock-resize-bg-hover: Highlight;
201
+ --jolly-separator-label: CanvasText;
202
+ --jolly-separator-rule: ButtonBorder;
203
+ --jolly-row-bg-focus: transparent;
204
+ --jolly-groove: ButtonBorder;
205
+ }
206
+ }
207
207
  `;
208
208
  //# sourceMappingURL=semantic.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jolly-pixel/ui",
3
3
  "description": "Common and System's UI for JollyPixel's editors",
4
- "version": "1.0.1",
4
+ "version": "2.0.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -37,7 +37,8 @@
37
37
  },
38
38
  "publishConfig": {
39
39
  "registry": "https://registry.npmjs.org",
40
- "access": "public"
40
+ "access": "public",
41
+ "provenance": true
41
42
  },
42
43
  "repository": {
43
44
  "type": "git",
@@ -56,7 +57,7 @@
56
57
  "author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
57
58
  "license": "MIT",
58
59
  "peerDependencies": {
59
- "@jolly-pixel/network": "^1.1.0",
60
+ "@jolly-pixel/network": "^2.0.0",
60
61
  "lit": "^3.3.0"
61
62
  },
62
63
  "peerDependenciesMeta": {
@@ -66,10 +67,10 @@
66
67
  },
67
68
  "dependencies": {
68
69
  "@jolly-pixel/color": "1.0.0",
69
- "@jolly-pixel/resize-handle": "1.1.0"
70
+ "@jolly-pixel/resize-handle": "1.2.0"
70
71
  },
71
72
  "devDependencies": {
72
- "@jolly-pixel/network": "1.1.0",
73
+ "@jolly-pixel/network": "2.0.0",
73
74
  "lit": "3.3.3"
74
75
  }
75
76
  }