@stacksjs/components 0.2.961 → 0.2.962

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 (60) hide show
  1. package/README.md +4 -0
  2. package/dist/{AppearancePicker-30fetv0a.stx → AppearancePicker-34758z53.stx} +2 -70
  3. package/dist/{Button-ghdfqwg0.stx → Button-rns3jhjh.stx} +33 -70
  4. package/dist/{Checkbox-355qsbwd.stx → Checkbox-4g3hemtw.stx} +1 -69
  5. package/dist/{ColorSwatches-ecfxphjy.stx → ColorSwatches-mz9kt78g.stx} +1 -69
  6. package/dist/{DateTimePicker-pz9p8jw4.stx → DateTimePicker-d5984mm1.stx} +5 -3
  7. package/dist/{NumberInput-e2afxyh3.stx → NumberInput-nqqen5a6.stx} +2 -70
  8. package/dist/{PasswordInput-d78bk8r0.stx → PasswordInput-j38f2n01.stx} +2 -70
  9. package/dist/{RadioGroup-ps9kn22f.stx → RadioGroup-mz3pv7he.stx} +1 -69
  10. package/dist/{RadioGroupOption-6hyy1bvb.stx → RadioGroupOption-mk98taz5.stx} +1 -69
  11. package/dist/{SegmentedControl-b93n9n2v.stx → SegmentedControl-jm6tb9f8.stx} +1 -69
  12. package/dist/{Select-p8mgxthn.stx → Select-36s22z6d.stx} +2 -70
  13. package/dist/{SettingsGroup-g1hnxp1p.stx → SettingsGroup-t3emsgk2.stx} +2 -70
  14. package/dist/{SettingsPane-9svk1w3e.stx → SettingsPane-tqe8q5cw.stx} +11 -3
  15. package/dist/{SettingsPaneHeader-am42srhp.stx → SettingsPaneHeader-wznh6dss.stx} +2 -70
  16. package/dist/{SettingsRow-kgda3nv1.stx → SettingsRow-5jgay5ae.stx} +2 -70
  17. package/dist/SettingsSidebarGroup-p5h359bn.stx +57 -0
  18. package/dist/{SettingsSidebarItem-ga2jxq53.stx → SettingsSidebarItem-69zs4b55.stx} +2 -70
  19. package/dist/{SettingsUpdateRow-ajpnqx8a.stx → SettingsUpdateRow-92mmxvpd.stx} +1 -69
  20. package/dist/{SettingsWindow-v7jepxem.stx → SettingsWindow-q0x86xqb.stx} +8 -70
  21. package/dist/{Slider-j59dgw1c.stx → Slider-cebse060.stx} +1 -69
  22. package/dist/{Switch-vd8k23sr.stx → Switch-7s3bhjg4.stx} +2 -70
  23. package/dist/{TextInput-fge1b7tk.stx → TextInput-4v09vw1r.stx} +2 -70
  24. package/dist/index.js +17 -17
  25. package/dist/settings/settings.js +80 -19
  26. package/dist/ui/button/Button.d.ts +4 -1
  27. package/dist/ui/button/index.d.ts +4 -0
  28. package/dist/ui/date-time-picker/DateTimePicker.d.ts +2 -0
  29. package/dist/ui/settings/SettingsPane.d.ts +6 -3
  30. package/dist/ui/settings/SettingsWindow.d.ts +4 -1
  31. package/dist/ui/settings/index.d.ts +4 -0
  32. package/dist/ui/settings/view.d.ts +3 -0
  33. package/package.json +3 -3
  34. package/{dist/SettingsSidebarGroup-4ag5qjpw.stx → src/theme/macos.css} +0 -57
  35. package/src/ui/appearance-picker/AppearancePicker.stx +2 -70
  36. package/src/ui/button/Button.stx +33 -70
  37. package/src/ui/button/index.ts +9 -0
  38. package/src/ui/checkbox/Checkbox.stx +1 -69
  39. package/src/ui/color-swatches/ColorSwatches.stx +1 -69
  40. package/src/ui/date-time-picker/DateTimePicker.stx +5 -3
  41. package/src/ui/input/NumberInput.stx +2 -70
  42. package/src/ui/input/PasswordInput.stx +2 -70
  43. package/src/ui/input/TextInput.stx +2 -70
  44. package/src/ui/radio-group/RadioGroup.stx +1 -69
  45. package/src/ui/radio-group/RadioGroupOption.stx +1 -69
  46. package/src/ui/segmented-control/SegmentedControl.stx +1 -69
  47. package/src/ui/select/Select.stx +2 -70
  48. package/src/ui/settings/README.md +21 -0
  49. package/src/ui/settings/SettingsGroup.stx +2 -70
  50. package/src/ui/settings/SettingsPane.stx +11 -3
  51. package/src/ui/settings/SettingsPaneHeader.stx +2 -70
  52. package/src/ui/settings/SettingsRow.stx +2 -70
  53. package/src/ui/settings/SettingsSidebarGroup.stx +2 -70
  54. package/src/ui/settings/SettingsSidebarItem.stx +2 -70
  55. package/src/ui/settings/SettingsUpdateRow.stx +1 -69
  56. package/src/ui/settings/SettingsWindow.stx +8 -70
  57. package/src/ui/settings/index.ts +6 -0
  58. package/src/ui/settings/view.ts +93 -21
  59. package/src/ui/slider/Slider.stx +1 -69
  60. package/src/ui/switch/Switch.stx +2 -70
@@ -342,76 +342,8 @@ defineExpose({ value: selectedValue, options: optionList })
342
342
  </div>
343
343
  @endif
344
344
 
345
- <style data-native-exclude>
346
- :where(:root) {
347
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
348
- --stx-mac-font-size: 13px;
349
- --stx-mac-font-size-small: 11px;
350
- --stx-mac-hairline: 0.5px;
351
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
352
- --stx-mac-card-radius: 12px;
353
- --stx-mac-control-radius: 6px;
354
- --stx-mac-row-height: 38px;
355
- --stx-mac-row-inset: 10px;
356
- --stx-mac-sidebar-width: 226px;
357
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
358
- --stx-mac-accent-ink: #ffffff;
359
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
360
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
361
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
362
- --stx-mac-window: #ffffff;
363
- --stx-mac-sidebar: #f2f1f0;
364
- --stx-mac-card: rgba(0, 0, 0, 0.04);
365
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
366
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
367
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
368
- --stx-mac-well: rgba(0, 0, 0, 0.07);
369
- --stx-mac-control: #ffffff;
370
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
371
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
372
- --stx-mac-switch-on: #34c759;
373
- --stx-mac-knob: #ffffff;
374
- --stx-mac-danger: #ff3b30;
375
- }
376
- :where(.dark) {
377
- --stx-mac-accent: var(--stx-accent, #0a84ff);
378
- --stx-mac-accent-ink: #ffffff;
379
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
380
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
381
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
382
- --stx-mac-window: #1e1e1e;
383
- --stx-mac-sidebar: #2a2a2a;
384
- --stx-mac-card: rgba(255, 255, 255, 0.05);
385
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
386
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
387
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
388
- --stx-mac-well: rgba(255, 255, 255, 0.1);
389
- --stx-mac-control: rgba(255, 255, 255, 0.14);
390
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
391
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
392
- --stx-mac-switch-on: #30d158;
393
- --stx-mac-knob: #ffffff;
394
- --stx-mac-danger: #ff453a;
395
- }
396
- @media (max-resolution: 1.5dppx) {
397
- :where(:root) {
398
- --stx-mac-hairline: 1px;
399
- }
400
- }
401
- @media (prefers-contrast: more) {
402
- :where(:root) {
403
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
404
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
405
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
406
- --stx-mac-hairline: 1px;
407
- }
408
- :where(.dark) {
409
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
410
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
411
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
412
- }
413
- }
414
-
345
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
346
+ <style data-native-exclude data-stx-public-style>
415
347
  .stx-mac-popup-field {
416
348
  display: inline-flex;
417
349
  flex-direction: column;
@@ -113,6 +113,7 @@ way, as attributes on the host's views.
113
113
  | `searchable` | `true` | |
114
114
  | `searchPlaceholder` | `'Search'` | |
115
115
  | `storageKey` | | Remembers the last pane under `stx:settings:<key>`. |
116
+ | `loadingPane`, `failedPane`, `retryPane` | English | Labels for loading, failure and retry on deferred panes. |
116
117
  | `presentation` | `'window'` | `window` fills a titlebar-less window and clears its buttons. `sheet` is a rounded panel inside another window. |
117
118
  | `sidebarWidth` | `226` | Pixels. |
118
119
  | `height` | viewport, or `min(640px, 90vh)` for a sheet | A CSS length. |
@@ -143,6 +144,26 @@ import { componentApi } from '@stacksjs/components/component-api'
143
144
  componentApi('settings').revealSetting('open-at-login')
144
145
  ```
145
146
 
147
+ ## Deferred panes in static builds
148
+
149
+ Put `defer` on inactive panes that can load on first use.
150
+
151
+ ```html
152
+ <SettingsPane id="appearance" title="Appearance" defer>
153
+ <SettingsGroup>
154
+ <SettingsRow setting="accent" label="Accent colour" keywords="theme" />
155
+ </SettingsGroup>
156
+ </SettingsPane>
157
+ ```
158
+
159
+ Keep one pane `active` so it renders at first paint. Static exports package
160
+ the deferred pane's markup, component setup and styles in a same-origin asset.
161
+ Search can find its row labels and keywords before the asset loads. A sidebar
162
+ selection, search result, navigation row, or remembered pane loads the asset.
163
+ A failed load offers a retry in the pane. Loaded panes stay mounted as you
164
+ move between them. The development server and native AppKit host render the
165
+ panes inline.
166
+
146
167
  ## Rows
147
168
 
148
169
  `<SettingsRow>` props: `label`, `description`, `icon` and `tone` (a leading
@@ -97,76 +97,8 @@ if (native) {
97
97
  </section>
98
98
  @endif
99
99
 
100
- <style data-native-exclude>
101
- :where(:root) {
102
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
103
- --stx-mac-font-size: 13px;
104
- --stx-mac-font-size-small: 11px;
105
- --stx-mac-hairline: 0.5px;
106
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
107
- --stx-mac-card-radius: 12px;
108
- --stx-mac-control-radius: 6px;
109
- --stx-mac-row-height: 38px;
110
- --stx-mac-row-inset: 10px;
111
- --stx-mac-sidebar-width: 226px;
112
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
113
- --stx-mac-accent-ink: #ffffff;
114
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
115
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
116
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
117
- --stx-mac-window: #ffffff;
118
- --stx-mac-sidebar: #f2f1f0;
119
- --stx-mac-card: rgba(0, 0, 0, 0.04);
120
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
121
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
122
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
123
- --stx-mac-well: rgba(0, 0, 0, 0.07);
124
- --stx-mac-control: #ffffff;
125
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
126
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
127
- --stx-mac-switch-on: #34c759;
128
- --stx-mac-knob: #ffffff;
129
- --stx-mac-danger: #ff3b30;
130
- }
131
- :where(.dark) {
132
- --stx-mac-accent: var(--stx-accent, #0a84ff);
133
- --stx-mac-accent-ink: #ffffff;
134
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
135
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
136
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
137
- --stx-mac-window: #1e1e1e;
138
- --stx-mac-sidebar: #2a2a2a;
139
- --stx-mac-card: rgba(255, 255, 255, 0.05);
140
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
141
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
142
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
143
- --stx-mac-well: rgba(255, 255, 255, 0.1);
144
- --stx-mac-control: rgba(255, 255, 255, 0.14);
145
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
146
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
147
- --stx-mac-switch-on: #30d158;
148
- --stx-mac-knob: #ffffff;
149
- --stx-mac-danger: #ff453a;
150
- }
151
- @media (max-resolution: 1.5dppx) {
152
- :where(:root) {
153
- --stx-mac-hairline: 1px;
154
- }
155
- }
156
- @media (prefers-contrast: more) {
157
- :where(:root) {
158
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
159
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
160
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
161
- --stx-mac-hairline: 1px;
162
- }
163
- :where(.dark) {
164
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
165
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
166
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
167
- }
168
- }
169
-
100
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
101
+ <style data-native-exclude data-stx-public-style>
170
102
  /*
171
103
  * The card. No border and no clipping: a pop-up menu or a focus ring inside a
172
104
  * row has to be able to leave it.
@@ -6,8 +6,10 @@ import { SETTINGS_NATIVE } from './native-theme'
6
6
  * sidebar item carries; a pane with a `parent` is a sub-pane, reached by a
7
7
  * navigation row and not from the sidebar.
8
8
  *
9
- * Every pane is in the page from the start and all but one are hidden. The
10
- * shell shows the open one; `active` leaves this one showing before it has.
9
+ * The shell shows the open pane. `active` leaves it showing before the
10
+ * shell runs. In static web builds, `defer` moves an inactive pane's
11
+ * contents into an asset fetched when the pane opens. Request-rendered web
12
+ * builds can serve it through the owning page if deferred regions are enabled.
11
13
  *
12
14
  * On a native host ($native) a pane is a scroll view of its own, so each pane
13
15
  * keeps its place when the window moves between them.
@@ -17,6 +19,7 @@ export const title = $props.title || paneId
17
19
  export const keywords = $props.keywords || ''
18
20
  export const parent = $props.parent || ''
19
21
  export const active = $bool($props.active)
22
+ export const deferred = $bool($props.defer)
20
23
  export const role = parent ? 'region' : 'tabpanel'
21
24
  export const className = $props.className || ''
22
25
  export const T = SETTINGS_NATIVE
@@ -58,12 +61,17 @@ export const T = SETTINGS_NATIVE
58
61
  aria-label="{{ title }}"
59
62
  class="stx-settings-pane {{ className }}"
60
63
  hidden
64
+ @if(deferred)
65
+ data-stx-defer-fragment="settings-{{ paneId }}"
66
+ data-stx-fragment-index="data-settings-row data-setting data-label data-keywords"
67
+ data-stx-fragment-index-boundary="data-stx-settings"
68
+ @endif
61
69
  >
62
70
  <slot />
63
71
  </section>
64
72
  @endif
65
73
 
66
- <style data-native-exclude>
74
+ <style data-native-exclude data-stx-public-style>
67
75
  .stx-settings-pane { display: block; min-width: 0; outline: 0; }
68
76
  .stx-settings-pane[hidden] { display: none; }
69
77
  </style>
@@ -54,76 +54,8 @@ const detail = useReactiveProp('description', {{ description }})
54
54
  </header>
55
55
  @endif
56
56
 
57
- <style data-native-exclude>
58
- :where(:root) {
59
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
60
- --stx-mac-font-size: 13px;
61
- --stx-mac-font-size-small: 11px;
62
- --stx-mac-hairline: 0.5px;
63
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
64
- --stx-mac-card-radius: 12px;
65
- --stx-mac-control-radius: 6px;
66
- --stx-mac-row-height: 38px;
67
- --stx-mac-row-inset: 10px;
68
- --stx-mac-sidebar-width: 226px;
69
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
70
- --stx-mac-accent-ink: #ffffff;
71
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
72
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
73
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
74
- --stx-mac-window: #ffffff;
75
- --stx-mac-sidebar: #f2f1f0;
76
- --stx-mac-card: rgba(0, 0, 0, 0.04);
77
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
78
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
79
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
80
- --stx-mac-well: rgba(0, 0, 0, 0.07);
81
- --stx-mac-control: #ffffff;
82
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
83
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
84
- --stx-mac-switch-on: #34c759;
85
- --stx-mac-knob: #ffffff;
86
- --stx-mac-danger: #ff3b30;
87
- }
88
- :where(.dark) {
89
- --stx-mac-accent: var(--stx-accent, #0a84ff);
90
- --stx-mac-accent-ink: #ffffff;
91
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
92
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
93
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
94
- --stx-mac-window: #1e1e1e;
95
- --stx-mac-sidebar: #2a2a2a;
96
- --stx-mac-card: rgba(255, 255, 255, 0.05);
97
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
98
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
99
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
100
- --stx-mac-well: rgba(255, 255, 255, 0.1);
101
- --stx-mac-control: rgba(255, 255, 255, 0.14);
102
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
103
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
104
- --stx-mac-switch-on: #30d158;
105
- --stx-mac-knob: #ffffff;
106
- --stx-mac-danger: #ff453a;
107
- }
108
- @media (max-resolution: 1.5dppx) {
109
- :where(:root) {
110
- --stx-mac-hairline: 1px;
111
- }
112
- }
113
- @media (prefers-contrast: more) {
114
- :where(:root) {
115
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
116
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
117
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
118
- --stx-mac-hairline: 1px;
119
- }
120
- :where(.dark) {
121
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
122
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
123
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
124
- }
125
- }
126
-
57
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
58
+ <style data-native-exclude data-stx-public-style>
127
59
  :where([data-settings-pane-header]) {
128
60
  --stx-settings-tone-grey: #8e8e93;
129
61
  --stx-settings-tone-blue: #007aff;
@@ -189,76 +189,8 @@ defineExpose({ labelId, descriptionId, nameControl })
189
189
  </div>
190
190
  @endif
191
191
 
192
- <style data-native-exclude>
193
- :where(:root) {
194
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
195
- --stx-mac-font-size: 13px;
196
- --stx-mac-font-size-small: 11px;
197
- --stx-mac-hairline: 0.5px;
198
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
199
- --stx-mac-card-radius: 12px;
200
- --stx-mac-control-radius: 6px;
201
- --stx-mac-row-height: 38px;
202
- --stx-mac-row-inset: 10px;
203
- --stx-mac-sidebar-width: 226px;
204
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
205
- --stx-mac-accent-ink: #ffffff;
206
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
207
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
208
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
209
- --stx-mac-window: #ffffff;
210
- --stx-mac-sidebar: #f2f1f0;
211
- --stx-mac-card: rgba(0, 0, 0, 0.04);
212
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
213
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
214
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
215
- --stx-mac-well: rgba(0, 0, 0, 0.07);
216
- --stx-mac-control: #ffffff;
217
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
218
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
219
- --stx-mac-switch-on: #34c759;
220
- --stx-mac-knob: #ffffff;
221
- --stx-mac-danger: #ff3b30;
222
- }
223
- :where(.dark) {
224
- --stx-mac-accent: var(--stx-accent, #0a84ff);
225
- --stx-mac-accent-ink: #ffffff;
226
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
227
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
228
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
229
- --stx-mac-window: #1e1e1e;
230
- --stx-mac-sidebar: #2a2a2a;
231
- --stx-mac-card: rgba(255, 255, 255, 0.05);
232
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
233
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
234
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
235
- --stx-mac-well: rgba(255, 255, 255, 0.1);
236
- --stx-mac-control: rgba(255, 255, 255, 0.14);
237
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
238
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
239
- --stx-mac-switch-on: #30d158;
240
- --stx-mac-knob: #ffffff;
241
- --stx-mac-danger: #ff453a;
242
- }
243
- @media (max-resolution: 1.5dppx) {
244
- :where(:root) {
245
- --stx-mac-hairline: 1px;
246
- }
247
- }
248
- @media (prefers-contrast: more) {
249
- :where(:root) {
250
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
251
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
252
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
253
- --stx-mac-hairline: 1px;
254
- }
255
- :where(.dark) {
256
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
257
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
258
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
259
- }
260
- }
261
-
192
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
193
+ <style data-native-exclude data-stx-public-style>
262
194
  :where([data-settings-row]) {
263
195
  /* The tile colours a Settings icon is drawn on. */
264
196
  --stx-settings-tone-grey: #8e8e93;
@@ -32,76 +32,8 @@ export const T = SETTINGS_NATIVE
32
32
  </div>
33
33
  @endif
34
34
 
35
- <style data-native-exclude>
36
- :where(:root) {
37
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
38
- --stx-mac-font-size: 13px;
39
- --stx-mac-font-size-small: 11px;
40
- --stx-mac-hairline: 0.5px;
41
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
42
- --stx-mac-card-radius: 12px;
43
- --stx-mac-control-radius: 6px;
44
- --stx-mac-row-height: 38px;
45
- --stx-mac-row-inset: 10px;
46
- --stx-mac-sidebar-width: 226px;
47
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
48
- --stx-mac-accent-ink: #ffffff;
49
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
50
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
51
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
52
- --stx-mac-window: #ffffff;
53
- --stx-mac-sidebar: #f2f1f0;
54
- --stx-mac-card: rgba(0, 0, 0, 0.04);
55
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
56
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
57
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
58
- --stx-mac-well: rgba(0, 0, 0, 0.07);
59
- --stx-mac-control: #ffffff;
60
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
61
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
62
- --stx-mac-switch-on: #34c759;
63
- --stx-mac-knob: #ffffff;
64
- --stx-mac-danger: #ff3b30;
65
- }
66
- :where(.dark) {
67
- --stx-mac-accent: var(--stx-accent, #0a84ff);
68
- --stx-mac-accent-ink: #ffffff;
69
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
70
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
71
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
72
- --stx-mac-window: #1e1e1e;
73
- --stx-mac-sidebar: #2a2a2a;
74
- --stx-mac-card: rgba(255, 255, 255, 0.05);
75
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
76
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
77
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
78
- --stx-mac-well: rgba(255, 255, 255, 0.1);
79
- --stx-mac-control: rgba(255, 255, 255, 0.14);
80
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
81
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
82
- --stx-mac-switch-on: #30d158;
83
- --stx-mac-knob: #ffffff;
84
- --stx-mac-danger: #ff453a;
85
- }
86
- @media (max-resolution: 1.5dppx) {
87
- :where(:root) {
88
- --stx-mac-hairline: 1px;
89
- }
90
- }
91
- @media (prefers-contrast: more) {
92
- :where(:root) {
93
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
94
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
95
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
96
- --stx-mac-hairline: 1px;
97
- }
98
- :where(.dark) {
99
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
100
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
101
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
102
- }
103
- }
104
-
35
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
36
+ <style data-native-exclude data-stx-public-style>
105
37
  :where([data-settings-group]) {
106
38
  --stx-settings-group-gap: 13px;
107
39
  --stx-settings-item-gap: 2px;
@@ -69,76 +69,8 @@ export const glyphInk = settingsNativeGlyph(tone)
69
69
  </button>
70
70
  @endif
71
71
 
72
- <style data-native-exclude>
73
- :where(:root) {
74
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
75
- --stx-mac-font-size: 13px;
76
- --stx-mac-font-size-small: 11px;
77
- --stx-mac-hairline: 0.5px;
78
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
79
- --stx-mac-card-radius: 12px;
80
- --stx-mac-control-radius: 6px;
81
- --stx-mac-row-height: 38px;
82
- --stx-mac-row-inset: 10px;
83
- --stx-mac-sidebar-width: 226px;
84
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
85
- --stx-mac-accent-ink: #ffffff;
86
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
87
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
88
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
89
- --stx-mac-window: #ffffff;
90
- --stx-mac-sidebar: #f2f1f0;
91
- --stx-mac-card: rgba(0, 0, 0, 0.04);
92
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
93
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
94
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
95
- --stx-mac-well: rgba(0, 0, 0, 0.07);
96
- --stx-mac-control: #ffffff;
97
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
98
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
99
- --stx-mac-switch-on: #34c759;
100
- --stx-mac-knob: #ffffff;
101
- --stx-mac-danger: #ff3b30;
102
- }
103
- :where(.dark) {
104
- --stx-mac-accent: var(--stx-accent, #0a84ff);
105
- --stx-mac-accent-ink: #ffffff;
106
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
107
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
108
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
109
- --stx-mac-window: #1e1e1e;
110
- --stx-mac-sidebar: #2a2a2a;
111
- --stx-mac-card: rgba(255, 255, 255, 0.05);
112
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
113
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
114
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
115
- --stx-mac-well: rgba(255, 255, 255, 0.1);
116
- --stx-mac-control: rgba(255, 255, 255, 0.14);
117
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
118
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
119
- --stx-mac-switch-on: #30d158;
120
- --stx-mac-knob: #ffffff;
121
- --stx-mac-danger: #ff453a;
122
- }
123
- @media (max-resolution: 1.5dppx) {
124
- :where(:root) {
125
- --stx-mac-hairline: 1px;
126
- }
127
- }
128
- @media (prefers-contrast: more) {
129
- :where(:root) {
130
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
131
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
132
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
133
- --stx-mac-hairline: 1px;
134
- }
135
- :where(.dark) {
136
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
137
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
138
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
139
- }
140
- }
141
-
72
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
73
+ <style data-native-exclude data-stx-public-style>
142
74
  :where([data-settings-item]) {
143
75
  --stx-settings-item-height: 30px;
144
76
  --stx-settings-item-radius: 8px;
@@ -64,76 +64,8 @@ defineExpose({ view })
64
64
  <Button :if="view().action === 'relaunch'" appearance="mac" variant="primary" :label="view().actionLabel" @click="act('relaunch')" />
65
65
  </SettingsRow>
66
66
 
67
+ <style data-native-exclude data-stx-public-style src="../../theme/macos.css"></style>
67
68
  <style data-native-exclude>
68
- :where(:root) {
69
- --stx-mac-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
70
- --stx-mac-font-size: 13px;
71
- --stx-mac-font-size-small: 11px;
72
- --stx-mac-hairline: 0.5px;
73
- --stx-mac-focus-ring: 0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent);
74
- --stx-mac-card-radius: 12px;
75
- --stx-mac-control-radius: 6px;
76
- --stx-mac-row-height: 38px;
77
- --stx-mac-row-inset: 10px;
78
- --stx-mac-sidebar-width: 226px;
79
- --stx-mac-accent: var(--stx-accent, rgb(0, 122, 255));
80
- --stx-mac-accent-ink: #ffffff;
81
- --stx-mac-ink: rgba(0, 0, 0, 0.85);
82
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.5);
83
- --stx-mac-ink-tertiary: rgba(0, 0, 0, 0.26);
84
- --stx-mac-window: #ffffff;
85
- --stx-mac-sidebar: #f2f1f0;
86
- --stx-mac-card: rgba(0, 0, 0, 0.04);
87
- --stx-mac-separator: rgba(0, 0, 0, 0.1);
88
- --stx-mac-hover: rgba(0, 0, 0, 0.05);
89
- --stx-mac-selection-inactive: rgba(0, 0, 0, 0.08);
90
- --stx-mac-well: rgba(0, 0, 0, 0.07);
91
- --stx-mac-control: #ffffff;
92
- --stx-mac-control-line: rgba(0, 0, 0, 0.12);
93
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
94
- --stx-mac-switch-on: #34c759;
95
- --stx-mac-knob: #ffffff;
96
- --stx-mac-danger: #ff3b30;
97
- }
98
- :where(.dark) {
99
- --stx-mac-accent: var(--stx-accent, #0a84ff);
100
- --stx-mac-accent-ink: #ffffff;
101
- --stx-mac-ink: rgba(255, 255, 255, 0.85);
102
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.55);
103
- --stx-mac-ink-tertiary: rgba(255, 255, 255, 0.25);
104
- --stx-mac-window: #1e1e1e;
105
- --stx-mac-sidebar: #2a2a2a;
106
- --stx-mac-card: rgba(255, 255, 255, 0.05);
107
- --stx-mac-separator: rgba(255, 255, 255, 0.1);
108
- --stx-mac-hover: rgba(255, 255, 255, 0.06);
109
- --stx-mac-selection-inactive: rgba(255, 255, 255, 0.1);
110
- --stx-mac-well: rgba(255, 255, 255, 0.1);
111
- --stx-mac-control: rgba(255, 255, 255, 0.14);
112
- --stx-mac-control-line: rgba(255, 255, 255, 0.06);
113
- --stx-mac-control-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
114
- --stx-mac-switch-on: #30d158;
115
- --stx-mac-knob: #ffffff;
116
- --stx-mac-danger: #ff453a;
117
- }
118
- @media (max-resolution: 1.5dppx) {
119
- :where(:root) {
120
- --stx-mac-hairline: 1px;
121
- }
122
- }
123
- @media (prefers-contrast: more) {
124
- :where(:root) {
125
- --stx-mac-separator: rgba(0, 0, 0, 0.4);
126
- --stx-mac-control-line: rgba(0, 0, 0, 0.5);
127
- --stx-mac-ink-secondary: rgba(0, 0, 0, 0.75);
128
- --stx-mac-hairline: 1px;
129
- }
130
- :where(.dark) {
131
- --stx-mac-separator: rgba(255, 255, 255, 0.45);
132
- --stx-mac-control-line: rgba(255, 255, 255, 0.5);
133
- --stx-mac-ink-secondary: rgba(255, 255, 255, 0.8);
134
- }
135
- }
136
-
137
69
  .stx-settings-update-progress {
138
70
  color: var(--stx-mac-ink-secondary);
139
71
  font-size: var(--stx-mac-font-size-small);