@moldable-ai/ui 0.2.29 → 0.2.31
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.
- package/dist/catalog/component-catalog.d.ts +9 -2
- package/dist/catalog/component-catalog.d.ts.map +1 -1
- package/dist/catalog/component-catalog.js +11 -7
- package/dist/catalog/core-control-stories.d.ts.map +1 -1
- package/dist/catalog/core-control-stories.js +1 -1
- package/dist/catalog/core-foundation-stories.d.ts.map +1 -1
- package/dist/catalog/core-foundation-stories.js +5 -5
- package/dist/components/ui/app-frame.d.ts +20 -1
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +37 -7
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/button.d.ts +5 -3
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +39 -11
- package/dist/components/ui/card.d.ts +12 -2
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +3 -2
- package/dist/components/ui/checkbox.d.ts +4 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +4 -4
- package/dist/components/ui/context-menu.js +6 -6
- package/dist/components/ui/dropdown-menu.js +6 -6
- package/dist/components/ui/icon-button.d.ts +1 -1
- package/dist/components/ui/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button.js +1 -0
- package/dist/components/ui/input.d.ts +6 -2
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/material.d.ts +8 -3
- package/dist/components/ui/material.d.ts.map +1 -1
- package/dist/components/ui/material.js +2 -2
- package/dist/components/ui/search-field.d.ts +3 -1
- package/dist/components/ui/search-field.d.ts.map +1 -1
- package/dist/components/ui/search-field.js +16 -6
- package/dist/components/ui/segmented-control.d.ts +3 -1
- package/dist/components/ui/segmented-control.d.ts.map +1 -1
- package/dist/components/ui/segmented-control.js +23 -17
- package/dist/components/ui/select.js +2 -2
- package/dist/components/ui/sidebar.d.ts +5 -3
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +53 -15
- package/dist/components/ui/status.d.ts +1 -1
- package/dist/components/ui/status.js +1 -1
- package/dist/components/ui/switch.d.ts +3 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +3 -2
- package/dist/components/ui/toolbar-controls.d.ts +3 -1
- package/dist/components/ui/toolbar-controls.d.ts.map +1 -1
- package/dist/components/ui/toolbar-controls.js +14 -7
- package/dist/components/ui/toolbar.d.ts +5 -4
- package/dist/components/ui/toolbar.d.ts.map +1 -1
- package/dist/components/ui/toolbar.js +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/frame-lifecycle.d.ts +1 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +7 -0
- package/dist/lib/theme.d.ts +39 -5
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +105 -17
- package/dist/tokens/contracts.d.ts +79 -0
- package/dist/tokens/contracts.d.ts.map +1 -0
- package/dist/tokens/contracts.js +57 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +1 -0
- package/docs/README.md +2 -0
- package/docs/adaptive-materials.md +14 -9
- package/docs/design-tokens.md +10 -6
- package/docs/foundations.md +3 -3
- package/docs/macos-design-audit.md +144 -0
- package/docs/native-integration.md +4 -4
- package/docs/platform-architecture.md +189 -0
- package/docs/standalone-app-windows.md +37 -0
- package/docs/visual-regression.md +6 -8
- package/package.json +13 -1
- package/src/components/ui/accordion.md +46 -0
- package/src/components/ui/alert.md +12 -4
- package/src/components/ui/app-frame.md +8 -5
- package/src/components/ui/aspect-ratio.md +37 -0
- package/src/components/ui/avatar.md +48 -0
- package/src/components/ui/breadcrumb.md +52 -0
- package/src/components/ui/button-group.md +43 -0
- package/src/components/ui/button.md +20 -4
- package/src/components/ui/calendar.md +42 -0
- package/src/components/ui/card.md +43 -0
- package/src/components/ui/carousel.md +47 -0
- package/src/components/ui/chart.md +52 -0
- package/src/components/ui/checkbox.md +36 -0
- package/src/components/ui/collapsible.md +2 -3
- package/src/components/ui/color-well.md +14 -4
- package/src/components/ui/combobox.md +3 -3
- package/src/components/ui/confirm-dialog.md +5 -4
- package/src/components/ui/context-menu.md +3 -2
- package/src/components/ui/date-field.md +6 -1
- package/src/components/ui/date-picker.md +6 -3
- package/src/components/ui/dialog.md +14 -12
- package/src/components/ui/drawer.md +58 -0
- package/src/components/ui/error-boundary-view.md +1 -1
- package/src/components/ui/field.md +2 -1
- package/src/components/ui/form.md +71 -0
- package/src/components/ui/grid.md +4 -3
- package/src/components/ui/icon-button.md +4 -1
- package/src/components/ui/input-group.md +49 -0
- package/src/components/ui/input-otp.md +56 -0
- package/src/components/ui/input.md +40 -0
- package/src/components/ui/inspector.md +47 -7
- package/src/components/ui/item.md +5 -3
- package/src/components/ui/kbd.md +30 -0
- package/src/components/ui/label.md +29 -0
- package/src/components/ui/list.md +2 -2
- package/src/components/ui/material.md +25 -12
- package/src/components/ui/menu-items.md +60 -0
- package/src/components/ui/menubar.md +58 -0
- package/src/components/ui/message-scroller-primitive.md +70 -0
- package/src/components/ui/message-scroller.md +86 -0
- package/src/components/ui/navigation-button-group.md +4 -3
- package/src/components/ui/navigation-menu.md +52 -0
- package/src/components/ui/number-input.md +8 -0
- package/src/components/ui/pagination.md +51 -0
- package/src/components/ui/panel.md +6 -0
- package/src/components/ui/popover.md +10 -7
- package/src/components/ui/progress.md +31 -0
- package/src/components/ui/radio-group.md +36 -0
- package/src/components/ui/resizable.md +2 -1
- package/src/components/ui/scroll-area.md +3 -1
- package/src/components/ui/search-field.md +6 -1
- package/src/components/ui/segmented-control.md +6 -1
- package/src/components/ui/separator.md +35 -0
- package/src/components/ui/sidebar.md +20 -3
- package/src/components/ui/skeleton.md +36 -0
- package/src/components/ui/slider.md +58 -0
- package/src/components/ui/spinner.md +41 -0
- package/src/components/ui/split-view.md +8 -4
- package/src/components/ui/switch.md +44 -0
- package/src/components/ui/table.md +7 -7
- package/src/components/ui/tabs.md +3 -1
- package/src/components/ui/textarea.md +41 -0
- package/src/components/ui/toggle-group.md +2 -2
- package/src/components/ui/toggle.md +9 -9
- package/src/components/ui/toolbar-controls.md +17 -9
- package/src/components/ui/toolbar.md +6 -6
- package/src/styles/index.css +171 -117
- package/src/tokens/contracts.ts +131 -0
- package/src/tokens/index.css +6 -0
- package/src/tokens/index.ts +23 -0
- package/src/tokens/macos-26/README.md +37 -0
- package/src/tokens/macos-26/aliases.css +53 -0
- package/src/tokens/macos-26/compatibility.css +7 -0
- package/src/tokens/macos-26/index.css +3 -0
- package/src/tokens/macos-26/source/provenance.generated.json +28 -0
- package/src/tokens/macos-26/source/sidebar.generated.css +29 -0
- package/src/tokens/macos-26/source.css +7 -0
- package/src/tokens/macos-26/web-adaptations.json +25 -0
- package/src/tokens/macos-26/web-adaptations.md +15 -0
- package/src/tokens/macos-27/accessibility.css +11 -0
- package/src/tokens/macos-27/aliases.css +304 -0
- package/src/tokens/macos-27/compatibility.css +212 -0
- package/src/tokens/macos-27/index.css +15 -0
- package/src/tokens/macos-27/recipes.css +23 -0
- package/src/tokens/macos-27/source/chrome.generated.css +338 -0
- package/src/tokens/macos-27/source/colors.generated.css +140 -0
- package/src/tokens/macos-27/source/context.generated.css +18 -0
- package/src/tokens/macos-27/source/controls.generated.css +764 -0
- package/src/tokens/macos-27/source/effects.generated.css +68 -0
- package/src/tokens/macos-27/source/kit.generated.css +50 -0
- package/src/tokens/macos-27/source/overlays-status.generated.css +931 -0
- package/src/tokens/macos-27/source/paint-styles.generated.css +81 -0
- package/src/tokens/macos-27/source/provenance.generated.json +62 -0
- package/src/tokens/macos-27/source/sizes.generated.css +385 -0
- package/src/tokens/macos-27/source/source.generated.json +554 -0
- package/src/tokens/macos-27/source/text-styles.generated.css +116 -0
- package/src/tokens/macos-27/source.css +17 -0
- package/src/tokens/macos-27/web-adaptations.css +98 -0
- package/src/tokens/macos-27/web-adaptations.json +163 -0
- package/src/tokens/macos-27/web-adaptations.md +117 -0
- package/src/tokens/moldable/brand.css +48 -0
- package/src/tokens/moldable/index.css +1 -0
- package/src/tokens/platform-contract.test.ts +290 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Intentional macOS 27 adaptations for browser and native-webview rendering.
|
|
3
|
+
*
|
|
4
|
+
* Convention:
|
|
5
|
+
* - Source extraction remains unchanged in source/*.generated.css.
|
|
6
|
+
* - Every override is tagged with a stable M27-WEB-{AREA}-{NNN} ID.
|
|
7
|
+
* - Every tagged override has a matching entry in web-adaptations.json.
|
|
8
|
+
* - The full macOS 27 platform pack includes these effective values.
|
|
9
|
+
* - The /platforms/macos-27/source export remains source-faithful.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* @m27-divergence M27-WEB-COLOR-001 */
|
|
13
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'],
|
|
14
|
+
[data-ui-platform='macos'][data-ui-platform-version='27']
|
|
15
|
+
[data-ui-appearance='light'] {
|
|
16
|
+
--m27-source-color-vibrant-label-primary: #000000e0;
|
|
17
|
+
--m27-source-color-vibrant-label-secondary: #000000a3;
|
|
18
|
+
--m27-source-color-vibrant-label-tertiary: #0000007a;
|
|
19
|
+
--m27-source-color-vibrant-label-quaternary: #0000004a;
|
|
20
|
+
--m27-source-color-vibrant-label-quinary: #0000002e;
|
|
21
|
+
--m27-web-adaptation-count: 5;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* @m27-divergence M27-WEB-COLOR-001 */
|
|
25
|
+
[data-ui-platform='macos'][data-ui-platform-version='27']
|
|
26
|
+
[data-ui-appearance='dark'],
|
|
27
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'][data-ui-appearance='dark'] {
|
|
28
|
+
--m27-source-color-vibrant-label-primary: #fffffff0;
|
|
29
|
+
--m27-source-color-vibrant-label-secondary: #ffffffb8;
|
|
30
|
+
--m27-source-color-vibrant-label-tertiary: #ffffff8a;
|
|
31
|
+
--m27-source-color-vibrant-label-quaternary: #ffffff59;
|
|
32
|
+
--m27-source-color-vibrant-label-quinary: #ffffff38;
|
|
33
|
+
--m27-web-adaptation-count: 5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* The light source window uses a transparent border because AppKit supplies
|
|
38
|
+
* its perimeter through the native window compositor. Embedded web windows
|
|
39
|
+
* have no compositor-owned edge, so preserve that perceived boundary with a
|
|
40
|
+
* single semantic hairline. The dark source already contains a visible edge.
|
|
41
|
+
*/
|
|
42
|
+
/* @m27-divergence M27-WEB-EFFECT-002 */
|
|
43
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'],
|
|
44
|
+
[data-ui-platform='macos'][data-ui-platform-version='27']
|
|
45
|
+
[data-ui-appearance='light'] {
|
|
46
|
+
--m27-source-chrome-window-border: #00000024;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Native Liquid Glass uses separately blended contour, side-light, inner
|
|
51
|
+
* refraction, and cast-shadow layers. CSS box-shadow cannot assign a blend
|
|
52
|
+
* mode per shadow, so preserve the source geometry and depth with a
|
|
53
|
+
* normal-composited multi-edge highlight instead of a flat 1px border.
|
|
54
|
+
*/
|
|
55
|
+
/* @m27-divergence M27-WEB-EFFECT-001 */
|
|
56
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'],
|
|
57
|
+
[data-ui-platform='macos'][data-ui-platform-version='27']
|
|
58
|
+
[data-ui-appearance='light'] {
|
|
59
|
+
--m27-source-effect-liquid-glass-medium:
|
|
60
|
+
inset 0 1px 0 #ffffffd9, inset 0 -1px 0 #ffffff8c, inset 1px 0 0 #ffffff4d,
|
|
61
|
+
inset -1px 0 0 #ffffff4d, 0 0 0 0.5px #00000059, 0 18px 48px #00000040;
|
|
62
|
+
--m27-source-effect-liquid-glass-large:
|
|
63
|
+
inset 0 1px 0 #ffffffd9, inset 0 -1px 0 #ffffff8c, inset 1px 0 0 #ffffff4d,
|
|
64
|
+
inset -1px 0 0 #ffffff4d, 0 0 0 0.5px #00000059, 0 18px 48px #00000040;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* @m27-divergence M27-WEB-EFFECT-001 */
|
|
68
|
+
[data-ui-platform='macos'][data-ui-platform-version='27']
|
|
69
|
+
[data-ui-appearance='dark'],
|
|
70
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'][data-ui-appearance='dark'] {
|
|
71
|
+
--m27-source-effect-liquid-glass-medium:
|
|
72
|
+
inset 0 1px 0 #ffffff3d, inset 0 -1px 0 #ffffff1f, inset 1px 0 0 #ffffff17,
|
|
73
|
+
inset -1px 0 0 #ffffff17, 0 0 0 0.5px #a6a6a6, 0 18px 48px #00000073;
|
|
74
|
+
--m27-source-effect-liquid-glass-large:
|
|
75
|
+
inset 0 1px 0 #ffffff3d, inset 0 -1px 0 #ffffff1f, inset 1px 0 0 #ffffff17,
|
|
76
|
+
inset -1px 0 0 #ffffff17, 0 0 0 0.5px #a6a6a6, 0 18px 48px #00000073;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Native menu highlights inherit a softened mask from the surrounding glass
|
|
81
|
+
* material. A flat browser fill at the extracted 8px radius reads visibly
|
|
82
|
+
* squarer, so the effective web radius tracks the 12px menu silhouette.
|
|
83
|
+
*/
|
|
84
|
+
/* @m27-divergence M27-WEB-GEOMETRY-001 */
|
|
85
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'] {
|
|
86
|
+
--m27-source-chrome-menu-item-radius: 12px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* The extracted block inset includes optical breathing room supplied by the
|
|
91
|
+
* native material edge. With the web's explicit border and shadow, 5px reads
|
|
92
|
+
* as a second visible gutter. Keep the horizontal inset intact while reducing
|
|
93
|
+
* only the first/last row distance from the menu shell.
|
|
94
|
+
*/
|
|
95
|
+
/* @m27-divergence M27-WEB-GEOMETRY-002 */
|
|
96
|
+
[data-ui-platform='macos'][data-ui-platform-version='27'] {
|
|
97
|
+
--m27-source-chrome-menu-padding-block: 2px;
|
|
98
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "macOS 27",
|
|
3
|
+
"target": "web",
|
|
4
|
+
"schemaVersion": 1,
|
|
5
|
+
"idConvention": "M27-WEB-{AREA}-{NNN}",
|
|
6
|
+
"adaptations": [
|
|
7
|
+
{
|
|
8
|
+
"id": "M27-WEB-COLOR-001",
|
|
9
|
+
"area": "color",
|
|
10
|
+
"status": "intentional-divergence",
|
|
11
|
+
"summary": "Represent vibrant label colors with alpha compositing.",
|
|
12
|
+
"reason": "The source values rely on native macOS vibrancy and blend modes. Browser backdrop-filter does not reproduce that compositing pipeline, so opaque grayscale values lose or invert contrast over simulated materials.",
|
|
13
|
+
"sourceBehavior": "Opaque grayscale foreground combined with native vibrancy.",
|
|
14
|
+
"webBehavior": "Semantic black or white foreground with graduated alpha combined using normal browser compositing.",
|
|
15
|
+
"overrides": [
|
|
16
|
+
{
|
|
17
|
+
"appearance": "light",
|
|
18
|
+
"token": "--m27-source-color-vibrant-label-primary",
|
|
19
|
+
"sourceValue": "#1a1a1a",
|
|
20
|
+
"adaptedValue": "#000000e0"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"appearance": "light",
|
|
24
|
+
"token": "--m27-source-color-vibrant-label-secondary",
|
|
25
|
+
"sourceValue": "#727272",
|
|
26
|
+
"adaptedValue": "#000000a3"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"appearance": "light",
|
|
30
|
+
"token": "--m27-source-color-vibrant-label-tertiary",
|
|
31
|
+
"sourceValue": "#bfbfbf",
|
|
32
|
+
"adaptedValue": "#0000007a"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"appearance": "light",
|
|
36
|
+
"token": "--m27-source-color-vibrant-label-quaternary",
|
|
37
|
+
"sourceValue": "#d9d9d9",
|
|
38
|
+
"adaptedValue": "#0000004a"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"appearance": "light",
|
|
42
|
+
"token": "--m27-source-color-vibrant-label-quinary",
|
|
43
|
+
"sourceValue": "#e6e6e6",
|
|
44
|
+
"adaptedValue": "#0000002e"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"appearance": "dark",
|
|
48
|
+
"token": "--m27-source-color-vibrant-label-primary",
|
|
49
|
+
"sourceValue": "#f5f5f5",
|
|
50
|
+
"adaptedValue": "#fffffff0"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"appearance": "dark",
|
|
54
|
+
"token": "--m27-source-color-vibrant-label-secondary",
|
|
55
|
+
"sourceValue": "#8a8a8a",
|
|
56
|
+
"adaptedValue": "#ffffffb8"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"appearance": "dark",
|
|
60
|
+
"token": "--m27-source-color-vibrant-label-tertiary",
|
|
61
|
+
"sourceValue": "#404040",
|
|
62
|
+
"adaptedValue": "#ffffff8a"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"appearance": "dark",
|
|
66
|
+
"token": "--m27-source-color-vibrant-label-quaternary",
|
|
67
|
+
"sourceValue": "#262626",
|
|
68
|
+
"adaptedValue": "#ffffff59"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"appearance": "dark",
|
|
72
|
+
"token": "--m27-source-color-vibrant-label-quinary",
|
|
73
|
+
"sourceValue": "#111111",
|
|
74
|
+
"adaptedValue": "#ffffff38"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "M27-WEB-GEOMETRY-001",
|
|
80
|
+
"area": "geometry",
|
|
81
|
+
"status": "intentional-divergence",
|
|
82
|
+
"summary": "Round menu selection and hover fills to preserve the native glass silhouette.",
|
|
83
|
+
"reason": "The native menu highlight is softened by the surrounding Liquid Glass mask. A flat browser background at the extracted radius reads visibly squarer, so the web radius is increased to match the perceived macOS silhouette.",
|
|
84
|
+
"sourceBehavior": "An 8px item radius rendered inside the native material and glass mask.",
|
|
85
|
+
"webBehavior": "A 12px item radius rendered as a flat CSS highlight inside the 12px menu shell.",
|
|
86
|
+
"overrides": [
|
|
87
|
+
{
|
|
88
|
+
"token": "--m27-source-chrome-menu-item-radius",
|
|
89
|
+
"sourceValue": "8px",
|
|
90
|
+
"adaptedValue": "12px"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "M27-WEB-GEOMETRY-002",
|
|
96
|
+
"area": "geometry",
|
|
97
|
+
"status": "intentional-divergence",
|
|
98
|
+
"summary": "Reduce the menu shell's vertical inset without changing row height.",
|
|
99
|
+
"reason": "The native material edge supplies optical breathing room around the first and last rows. In the browser, the explicit border and shadow make the extracted 5px inset read as a second gutter.",
|
|
100
|
+
"sourceBehavior": "A 5px block inset softened by native material compositing.",
|
|
101
|
+
"webBehavior": "A 2px block inset inside the explicit CSS border and shadow.",
|
|
102
|
+
"overrides": [
|
|
103
|
+
{
|
|
104
|
+
"token": "--m27-source-chrome-menu-padding-block",
|
|
105
|
+
"sourceValue": "5px",
|
|
106
|
+
"adaptedValue": "2px"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "M27-WEB-EFFECT-001",
|
|
112
|
+
"area": "effect",
|
|
113
|
+
"status": "intentional-divergence",
|
|
114
|
+
"summary": "Translate the native Liquid Glass contour into layered CSS edge lighting.",
|
|
115
|
+
"reason": "The source effect assigns Linear Dodge, Linear Burn, and other blend modes to individual contour and inner-shadow layers. CSS box-shadow cannot assign a blend mode per shadow, and a flat border loses the bright refractive rim.",
|
|
116
|
+
"sourceBehavior": "A native glass effect with independently blended top, bottom, side, contour, and cast-shadow layers.",
|
|
117
|
+
"webBehavior": "A normal-composited stack of directional inset highlights, a half-pixel outer contour, and the source cast shadow.",
|
|
118
|
+
"overrides": [
|
|
119
|
+
{
|
|
120
|
+
"appearance": "light",
|
|
121
|
+
"token": "--m27-source-effect-liquid-glass-medium",
|
|
122
|
+
"sourceValue": "0 18px 48px #00000040, 0 0 0 0.5px #dbdbdb",
|
|
123
|
+
"adaptedValue": "inset 0 1px 0 #ffffffd9, inset 0 -1px 0 #ffffff8c, inset 1px 0 0 #ffffff4d, inset -1px 0 0 #ffffff4d, 0 0 0 0.5px #00000059, 0 18px 48px #00000040"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"appearance": "light",
|
|
127
|
+
"token": "--m27-source-effect-liquid-glass-large",
|
|
128
|
+
"sourceValue": "0 18px 48px #00000040, 0 0 0 0.5px #dbdbdb",
|
|
129
|
+
"adaptedValue": "inset 0 1px 0 #ffffffd9, inset 0 -1px 0 #ffffff8c, inset 1px 0 0 #ffffff4d, inset -1px 0 0 #ffffff4d, 0 0 0 0.5px #00000059, 0 18px 48px #00000040"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"appearance": "dark",
|
|
133
|
+
"token": "--m27-source-effect-liquid-glass-medium",
|
|
134
|
+
"sourceValue": "0 18px 48px #00000073, 0 0 0 0.5px #a6a6a6",
|
|
135
|
+
"adaptedValue": "inset 0 1px 0 #ffffff3d, inset 0 -1px 0 #ffffff1f, inset 1px 0 0 #ffffff17, inset -1px 0 0 #ffffff17, 0 0 0 0.5px #a6a6a6, 0 18px 48px #00000073"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"appearance": "dark",
|
|
139
|
+
"token": "--m27-source-effect-liquid-glass-large",
|
|
140
|
+
"sourceValue": "0 18px 48px #00000073, 0 0 0 0.5px #a6a6a6",
|
|
141
|
+
"adaptedValue": "inset 0 1px 0 #ffffff3d, inset 0 -1px 0 #ffffff1f, inset 1px 0 0 #ffffff17, inset -1px 0 0 #ffffff17, 0 0 0 0.5px #a6a6a6, 0 18px 48px #00000073"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "M27-WEB-EFFECT-002",
|
|
147
|
+
"area": "effect",
|
|
148
|
+
"status": "intentional-divergence",
|
|
149
|
+
"summary": "Supply the light window perimeter normally rendered by the native compositor.",
|
|
150
|
+
"reason": "The source light window border is transparent because AppKit and the macOS window compositor provide the visible edge. An embedded browser window has no compositor-owned perimeter, leaving edge-to-edge sidebars and the outer shell visually open.",
|
|
151
|
+
"sourceBehavior": "A transparent CSS-equivalent border with the visible perimeter supplied outside the view hierarchy.",
|
|
152
|
+
"webBehavior": "A single 14% black hairline around the embedded window; dark appearance retains its extracted 20% white edge.",
|
|
153
|
+
"overrides": [
|
|
154
|
+
{
|
|
155
|
+
"appearance": "light",
|
|
156
|
+
"token": "--m27-source-chrome-window-border",
|
|
157
|
+
"sourceValue": "transparent",
|
|
158
|
+
"adaptedValue": "#00000024"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# macOS 27 web adaptations
|
|
2
|
+
|
|
3
|
+
The macOS 27 token pack has two distinct responsibilities:
|
|
4
|
+
|
|
5
|
+
1. Preserve the values extracted from the macOS 27 source specification.
|
|
6
|
+
2. Produce the closest practical macOS 27 rendering in browsers and native
|
|
7
|
+
webviews.
|
|
8
|
+
|
|
9
|
+
Those goals occasionally conflict. Native macOS rendering can use effects
|
|
10
|
+
such as vibrancy, platform blend modes, material compositing, and font
|
|
11
|
+
rendering that CSS cannot reproduce exactly. When an extracted value produces
|
|
12
|
+
the wrong visual result on the web, add a documented web adaptation instead
|
|
13
|
+
of changing a showcase or component locally.
|
|
14
|
+
|
|
15
|
+
## File boundaries
|
|
16
|
+
|
|
17
|
+
- `source/*.generated.css` contains the extracted reference values. Do not
|
|
18
|
+
hand-edit these files.
|
|
19
|
+
- `source.css` exports the source-faithful reference pack without adaptations.
|
|
20
|
+
- `web-adaptations.css` overrides reference variables with effective web
|
|
21
|
+
values.
|
|
22
|
+
- `web-adaptations.json` records every intentional divergence in a
|
|
23
|
+
machine-readable manifest.
|
|
24
|
+
- `index.css` exports the effective macOS 27 platform pack and imports the web
|
|
25
|
+
adaptations before aliases, compatibility mappings, and recipes.
|
|
26
|
+
|
|
27
|
+
Components and showcases should consume the normal macOS 27 platform pack.
|
|
28
|
+
They must not compensate for platform-wide translation issues with local
|
|
29
|
+
colors or one-off CSS.
|
|
30
|
+
|
|
31
|
+
## Adaptation IDs
|
|
32
|
+
|
|
33
|
+
Every adaptation has a stable ID:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
M27-WEB-{AREA}-{NNN}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
|
|
41
|
+
- `M27-WEB-COLOR-001`
|
|
42
|
+
- `M27-WEB-MATERIAL-001`
|
|
43
|
+
- `M27-WEB-TYPE-001`
|
|
44
|
+
- `M27-WEB-EFFECT-001`
|
|
45
|
+
|
|
46
|
+
Use one ID for one coherent rendering discrepancy. A single adaptation may
|
|
47
|
+
cover multiple related tokens, appearances, or states when they form one
|
|
48
|
+
semantic scale.
|
|
49
|
+
|
|
50
|
+
## How to add or tune an adaptation
|
|
51
|
+
|
|
52
|
+
1. Reproduce the discrepancy in the Moldable UI calibration or component
|
|
53
|
+
page in both light and dark appearances.
|
|
54
|
+
2. Confirm that the mismatch comes from a browser or webview limitation, not
|
|
55
|
+
from application globals, Tailwind utilities, component CSS, or an
|
|
56
|
+
incorrect source extraction.
|
|
57
|
+
3. Keep the extracted value unchanged in `source/*.generated.css`.
|
|
58
|
+
4. Add or update the effective override in `web-adaptations.css`.
|
|
59
|
+
5. Tag the CSS group with its adaptation ID:
|
|
60
|
+
|
|
61
|
+
```css
|
|
62
|
+
/* @m27-divergence M27-WEB-COLOR-001 */
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
6. Add or update the matching entry in `web-adaptations.json`. Record:
|
|
66
|
+
- the stable adaptation ID;
|
|
67
|
+
- the affected area and appearance;
|
|
68
|
+
- every token name;
|
|
69
|
+
- the exact source value;
|
|
70
|
+
- the exact adapted value;
|
|
71
|
+
- why the source behavior cannot be reproduced directly;
|
|
72
|
+
- what web behavior replaces it.
|
|
73
|
+
|
|
74
|
+
7. Compare the result across representative backgrounds and material
|
|
75
|
+
thicknesses. Check normal and increased-contrast contexts where relevant.
|
|
76
|
+
8. Run the platform-contract test, UI package checks, and the Moldable UI app
|
|
77
|
+
checks.
|
|
78
|
+
|
|
79
|
+
## Review criteria
|
|
80
|
+
|
|
81
|
+
An adaptation is appropriate when it makes the effective web rendering more
|
|
82
|
+
faithful to macOS 27, not merely more attractive.
|
|
83
|
+
|
|
84
|
+
Prefer adaptations that:
|
|
85
|
+
|
|
86
|
+
- preserve the semantic hierarchy of the source values;
|
|
87
|
+
- work across both appearances and varied content backgrounds;
|
|
88
|
+
- remain centralized at the platform-token layer;
|
|
89
|
+
- use the smallest coherent set of overrides;
|
|
90
|
+
- preserve readable contrast without flattening primary, secondary, and
|
|
91
|
+
tertiary distinctions;
|
|
92
|
+
- can be removed cleanly if browser or webview capabilities improve.
|
|
93
|
+
|
|
94
|
+
Do not use an adaptation to:
|
|
95
|
+
|
|
96
|
+
- add Moldable branding;
|
|
97
|
+
- change a component for product-specific taste;
|
|
98
|
+
- hide a cascade or theme-isolation bug;
|
|
99
|
+
- compensate for an incorrect component size or layout;
|
|
100
|
+
- modify source artwork, symbols, vectors, image assets, or font files.
|
|
101
|
+
|
|
102
|
+
Moldable-specific styling belongs in the Moldable theme layer above the
|
|
103
|
+
platform pack.
|
|
104
|
+
|
|
105
|
+
## Validation
|
|
106
|
+
|
|
107
|
+
`platform-contract.test.ts` enforces that:
|
|
108
|
+
|
|
109
|
+
- the effective macOS 27 pack imports `web-adaptations.css`;
|
|
110
|
+
- the source-faithful entry point does not import adaptations;
|
|
111
|
+
- adaptation IDs are unique;
|
|
112
|
+
- every manifest entry has a matching CSS marker;
|
|
113
|
+
- every recorded source value still exists in the generated source styles;
|
|
114
|
+
- every recorded adapted value exists in the adaptation stylesheet.
|
|
115
|
+
|
|
116
|
+
If an override is intentional, document it. If it is not documented, it does
|
|
117
|
+
not belong in the macOS 27 platform pack.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Moldable uses the selected base platform for its general controls and
|
|
3
|
+
* chrome. Its floating sidebar is an explicit, independently versioned
|
|
4
|
+
* component recipe selected by ThemeProvider's `sidebarStyle` axis.
|
|
5
|
+
*/
|
|
6
|
+
[data-ui-theme='moldable'] {
|
|
7
|
+
--m-ui-theme-name: moldable;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Moldable's dark canvas stays close to the macOS window surface while
|
|
12
|
+
* carrying a subtle cool cast. Keep these product colors in the brand layer
|
|
13
|
+
* instead of changing the immutable platform source values.
|
|
14
|
+
*/
|
|
15
|
+
[data-ui-theme='moldable'][data-ui-appearance='dark'] {
|
|
16
|
+
--m-ui-surface-window: #1d1f1f;
|
|
17
|
+
--m-ui-surface-content: #1d1f1f;
|
|
18
|
+
--background: #1d1f1f;
|
|
19
|
+
--surface-canvas: #1d1f1f;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* The macOS 26 source shadow has a 40px blur intended for a full-size native
|
|
24
|
+
* floating panel. At showcase scale that blur reads as an inset gradient on
|
|
25
|
+
* the neighboring content pane. Moldable keeps the sidebar lift while using a
|
|
26
|
+
* tighter web rendering that does not veil adjacent content.
|
|
27
|
+
*/
|
|
28
|
+
[data-ui-theme='moldable'][data-ui-sidebar-style='floating'] {
|
|
29
|
+
--m-ui-sidebar-shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 4px 14px rgb(0 0 0 / 6%);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-ui-theme='moldable'][data-ui-sidebar-style='floating'][data-ui-appearance='dark'] {
|
|
33
|
+
--m-ui-sidebar-material-fill: #1b1d1e;
|
|
34
|
+
--m-ui-sidebar-border-width: 1px;
|
|
35
|
+
--m-ui-sidebar-border-color: #394043;
|
|
36
|
+
--m-ui-sidebar-selection-fill: color-mix(
|
|
37
|
+
in srgb,
|
|
38
|
+
var(--m-ui-color-accent) 14%,
|
|
39
|
+
transparent
|
|
40
|
+
);
|
|
41
|
+
--m-ui-sidebar-shadow:
|
|
42
|
+
0 1px 2px rgb(0 0 0 / 18%), 0 4px 14px rgb(0 0 0 / 16%);
|
|
43
|
+
--sidebar: var(--m-ui-sidebar-material-fill);
|
|
44
|
+
--sidebar-accent: var(--m-ui-sidebar-selection-fill);
|
|
45
|
+
--sidebar-accent-foreground: var(--m-ui-color-accent);
|
|
46
|
+
--sidebar-border: var(--m-ui-sidebar-border-color);
|
|
47
|
+
--surface-sidebar: var(--m-ui-sidebar-material-fill);
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './brand.css';
|