@lostgradient/cinder 0.27.0 → 0.28.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.
- package/CHANGELOG.md +42 -0
- package/components.json +1 -1
- package/dist/_internal/code-highlighter-context.d.ts +28 -0
- package/dist/cli/index.js +12 -8
- package/dist/components/approval-card/index.js +4 -4
- package/dist/components/button/button.css +25 -0
- package/dist/components/calendar/calendar.css +14 -0
- package/dist/components/capability-gate/capability-gate.css +5 -0
- package/dist/components/checkbox/checkbox.css +19 -0
- package/dist/components/chip/chip.css +14 -0
- package/dist/components/code-block/code-block.d.svelte.ts +1 -1
- package/dist/components/code-block/code-block.examples.json +1 -1
- package/dist/components/code-block/code-block.schema.js +3 -3
- package/dist/components/code-block/code-block.svelte.d.ts +1 -1
- package/dist/components/code-block/code-block.types.d.ts +14 -12
- package/dist/components/code-block/index.js +2 -2
- package/dist/components/color-picker/color-picker.css +2 -0
- package/dist/components/combobox/combobox.css +9 -1
- package/dist/components/command-palette/command-palette.css +7 -5
- package/dist/components/file-upload/file-upload.css +2 -1
- package/dist/components/guidance-region/index.css +1 -1
- package/dist/components/image/image.examples.json +1 -1
- package/dist/components/input/input.css +20 -6
- package/dist/components/json-schema-editor/index.js +5 -5
- package/dist/components/json-schema-editor/json-view-highlighter.d.ts +14 -0
- package/dist/components/key-value-editor/index.css +1 -1
- package/dist/components/modal-region/index.css +1 -1
- package/dist/components/multi-select/multi-select.css +9 -0
- package/dist/components/pagination/pagination.css +12 -0
- package/dist/components/pin-input/pin-input.css +9 -1
- package/dist/components/radio-group/radio-group.css +16 -0
- package/dist/components/run-step-timeline/index.js +2 -2
- package/dist/components/schema-form/index.js +2 -2
- package/dist/components/schema-form/schema-form.css +9 -0
- package/dist/components/segmented-control/segmented-control.css +3 -3
- package/dist/components/selection-popover/selection-popover.css +7 -1
- package/dist/components/tag-input/tag-input.css +10 -1
- package/dist/components/terminal-frame/index.js +2 -2
- package/dist/components/terminal-frame/terminal-frame.schema.js +2 -2
- package/dist/components/terminal-frame/terminal-frame.types.d.ts +8 -0
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/toggle/toggle.css +16 -0
- package/dist/components/tree/tree.examples.json +1 -1
- package/dist/components/virtual-list/index.js +2 -2
- package/dist/components/virtual-list/virtual-list.css +42 -9
- package/dist/highlighters/shiki/default.d.ts +13 -1
- package/dist/highlighters/shiki/default.js +2 -2
- package/dist/highlighters/shiki/index.d.ts +20 -12
- package/dist/highlighters/shiki/index.js +2 -2
- package/dist/index.browser.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -23
- package/dist/scripts/knowledge/index.d.ts +5 -1
- package/dist/server/components/approval-card/index.js +1 -1
- package/dist/server/components/code-block/index.js +1 -1
- package/dist/server/components/color-field/index.js +2 -2
- package/dist/server/components/color-picker/index.js +2 -2
- package/dist/server/components/json-schema-editor/index.js +2 -2
- package/dist/server/components/run-step-timeline/index.js +1 -1
- package/dist/server/components/terminal-frame/index.js +1 -1
- package/dist/server/components/virtual-list/index.js +1 -1
- package/dist/server/github-dark-e7nywpbe.js +3 -0
- package/dist/server/github-light-bqtmm1zq.js +3 -0
- package/dist/server/highlighters/shiki/default.js +2 -2
- package/dist/server/highlighters/shiki/index.js +2 -2
- package/dist/server/index.js +6 -6
- package/dist/server/{index.server-4qyyw4y5.js → index.server-043cfznf.js} +1 -1
- package/dist/server/{index.server-p46tn4eb.js → index.server-09tjs48p.js} +2 -2
- package/dist/server/index.server-0hyvdf74.js +8 -0
- package/dist/server/{index.server-dxgkh9tk.js → index.server-17thvpd3.js} +1 -1
- package/dist/server/index.server-19z6hqd6.js +4 -0
- package/dist/server/index.server-31020qgk.js +3 -0
- package/dist/server/{index.server-w3nqzde5.js → index.server-45wmvjrn.js} +3 -3
- package/dist/server/{index.server-3tkgm2gn.js → index.server-6mb7w5g4.js} +2 -2
- package/dist/server/{index.server-2vxmn7x1.js → index.server-c5yajkkc.js} +4 -4
- package/dist/server/index.server-e6fknxd9.js +4 -0
- package/dist/server/index.server-fev4kwm0.js +4 -0
- package/dist/server/index.server-k4vjk75r.js +4 -0
- package/dist/server/index.server-mjbtd1gs.js +7 -0
- package/dist/server/{index.server-2bfkhzzq.js → index.server-rkp4py5n.js} +2 -2
- package/dist/server/index.server-wdz9tsq4.js +3 -0
- package/dist/server/index.server-zj9909hd.js +4 -0
- package/dist/server/json-68twtta3.js +3 -0
- package/dist/server/tokens/registry.generated.js +1 -1
- package/dist/server/tokens/runtime/index.js +92 -0
- package/dist/styles/check-token-contrast-test-values.d.ts +1 -3
- package/dist/styles/token-contrast-test-readers.d.ts +1 -1
- package/dist/tokens/registry.generated.js +2 -2
- package/dist/tokens/resolved/dark-reduced-motion.json +104 -43
- package/dist/tokens/resolved/dark.json +104 -43
- package/dist/tokens/resolved/light-reduced-motion.json +104 -43
- package/dist/tokens/resolved/light.json +104 -43
- package/dist/tokens/runtime/authoring-catalogue.d.ts +19 -0
- package/dist/tokens/runtime/authoring-catalogue.generated.d.ts +8 -0
- package/dist/tokens/runtime/authoring-palette.d.ts +25 -0
- package/dist/tokens/runtime/authoring-profiles.d.ts +48 -0
- package/dist/tokens/runtime/authoring-provenance.d.ts +31 -0
- package/dist/tokens/runtime/authoring-types.d.ts +182 -0
- package/dist/tokens/runtime/base-corpus.d.ts +29 -0
- package/dist/tokens/runtime/base-corpus.generated.d.ts +8 -0
- package/dist/tokens/runtime/context-order.d.ts +60 -0
- package/dist/tokens/runtime/context-stack.d.ts +11 -0
- package/dist/tokens/runtime/contrast/color-difference.d.ts +16 -0
- package/dist/{styles/color-contrast-utilities.d.ts → tokens/runtime/contrast/color-math.d.ts} +2 -17
- package/dist/tokens/runtime/contrast/color-mix.d.ts +3 -0
- package/dist/tokens/runtime/contrast/css-color.d.ts +29 -0
- package/dist/tokens/runtime/contrast/index.d.ts +7 -0
- package/dist/tokens/runtime/contrast/measure.d.ts +45 -0
- package/dist/tokens/runtime/contrast/pairings.d.ts +36 -0
- package/dist/tokens/runtime/contrast/thresholds.d.ts +47 -0
- package/dist/tokens/runtime/corpus-documents.d.ts +36 -0
- package/dist/tokens/runtime/corpus-validation.d.ts +10 -0
- package/dist/tokens/runtime/corpus.d.ts +35 -0
- package/dist/tokens/runtime/css-configuration.d.ts +1 -0
- package/dist/tokens/runtime/css-stylelint.d.ts +2 -0
- package/dist/tokens/runtime/css-support.d.ts +110 -0
- package/dist/tokens/runtime/evaluate.d.ts +95 -0
- package/dist/tokens/runtime/evaluated-provenance.d.ts +36 -0
- package/dist/tokens/runtime/index.d.ts +38 -0
- package/dist/tokens/runtime/index.js +95 -0
- package/dist/tokens/runtime/package-version.generated.d.ts +9 -0
- package/dist/tokens/runtime/projection.d.ts +32 -0
- package/dist/tokens/runtime/registry.d.ts +125 -0
- package/dist/tokens/runtime/resolve-extends.d.ts +30 -0
- package/dist/tokens/runtime/resolve-references.d.ts +49 -0
- package/dist/tokens/runtime/resolve-shared.d.ts +34 -0
- package/dist/tokens/runtime/resolve.d.ts +44 -0
- package/dist/tokens/runtime/resolver-order.d.ts +89 -0
- package/dist/tokens/runtime/source-digest.d.ts +20 -0
- package/dist/tokens/runtime/stylesheet-skeleton.d.ts +31 -0
- package/dist/tokens/runtime/theme-runtime.test-support.d.ts +24 -0
- package/dist/tokens/runtime/theme-sources.d.ts +46 -0
- package/dist/tokens/runtime/theme-stylesheet.d.ts +31 -0
- package/dist/tokens/runtime/types.d.ts +115 -0
- package/dist/tokens/runtime/validate-resolver.d.ts +31 -0
- package/dist/tokens/runtime/validate-schema.d.ts +22 -0
- package/dist/tokens/runtime/validate-tokens.d.ts +25 -0
- package/dist/tokens/runtime/validate-values.d.ts +33 -0
- package/dist/tokens/runtime/validate.d.ts +3 -0
- package/dist/tokens/runtime/value-color-parse.d.ts +128 -0
- package/dist/tokens/runtime/value-color.d.ts +85 -0
- package/dist/tokens/runtime/value-entry.d.ts +3 -0
- package/dist/tokens/runtime/value-formatters.d.ts +59 -0
- package/dist/tokens/sets/colors.tokens.json +65 -13
- package/dist/tokens/sets/foundation.tokens.json +23 -0
- package/dist/tokens/sets/semantic.tokens.json +136 -30
- package/dist/utilities/highlighter.d.ts +5 -5
- package/dist/utilities/retrying-loader-cache.d.ts +3 -6
- package/package.json +15 -3
- package/src/_internal/code-highlighter-context.ts +41 -0
- package/src/components/button/button.css +25 -0
- package/src/components/calendar/calendar.css +14 -0
- package/src/components/capability-gate/capability-gate.css +5 -0
- package/src/components/checkbox/checkbox.css +19 -0
- package/src/components/chip/chip.css +14 -0
- package/src/components/code-block/code-block.examples.json +1 -1
- package/src/components/code-block/code-block.schema.json +2 -2
- package/src/components/code-block/code-block.schema.ts +2 -2
- package/src/components/code-block/code-block.svelte +15 -19
- package/src/components/code-block/code-block.types.ts +14 -12
- package/src/components/color-picker/color-picker.css +2 -0
- package/src/components/combobox/combobox.css +9 -1
- package/src/components/command-palette/command-palette.css +7 -5
- package/src/components/file-upload/file-upload.css +2 -1
- package/src/components/image/image.examples.json +1 -1
- package/src/components/input/input.css +20 -6
- package/src/components/json-schema-editor/json-view-highlighter.ts +23 -0
- package/src/components/json-schema-editor/json-view.svelte +2 -0
- package/src/components/multi-select/multi-select.css +9 -0
- package/src/components/pagination/pagination.css +12 -0
- package/src/components/pin-input/pin-input.css +9 -1
- package/src/components/radio-group/radio-group.css +16 -0
- package/src/components/schema-form/schema-form.css +9 -0
- package/src/components/segmented-control/segmented-control.css +3 -3
- package/src/components/selection-popover/selection-popover.css +7 -1
- package/src/components/tag-input/tag-input.css +10 -1
- package/src/components/terminal-frame/terminal-frame.schema.json +5 -0
- package/src/components/terminal-frame/terminal-frame.schema.ts +6 -0
- package/src/components/terminal-frame/terminal-frame.svelte +6 -2
- package/src/components/terminal-frame/terminal-frame.types.ts +8 -0
- package/src/components/textarea/textarea.css +1 -1
- package/src/components/toggle/toggle.css +16 -0
- package/src/components/tree/tree.examples.json +1 -1
- package/src/components/virtual-list/virtual-list.css +42 -9
- package/src/components/virtual-list/virtual-list.svelte +54 -20
- package/src/highlighters/shiki/default.ts +13 -1
- package/src/highlighters/shiki/index.ts +20 -12
- package/src/index.ts +5 -0
- package/src/styles/foundation.css +33 -1
- package/src/styles/tokens-base.css +4 -4
- package/src/tokens/registry.generated.json +3 -3
- package/src/tokens/resolved/dark-reduced-motion.json +104 -43
- package/src/tokens/resolved/dark.json +104 -43
- package/src/tokens/resolved/light-reduced-motion.json +104 -43
- package/src/tokens/resolved/light.json +104 -43
- package/src/tokens/runtime/authoring-catalogue.generated.ts +19300 -0
- package/src/tokens/runtime/authoring-catalogue.ts +256 -0
- package/src/tokens/runtime/authoring-palette.ts +100 -0
- package/src/tokens/runtime/authoring-profiles.ts +288 -0
- package/src/tokens/runtime/authoring-provenance.ts +290 -0
- package/src/tokens/runtime/authoring-types.ts +199 -0
- package/src/tokens/runtime/base-corpus.generated.ts +10 -0
- package/src/tokens/runtime/base-corpus.ts +78 -0
- package/src/tokens/runtime/context-order.ts +182 -0
- package/src/tokens/runtime/context-stack.ts +52 -0
- package/src/tokens/runtime/contrast/color-difference.ts +114 -0
- package/src/tokens/runtime/contrast/color-math.ts +89 -0
- package/src/tokens/runtime/contrast/color-mix.ts +20 -0
- package/src/tokens/runtime/contrast/css-color.ts +312 -0
- package/src/tokens/runtime/contrast/index.ts +7 -0
- package/src/tokens/runtime/contrast/measure.ts +185 -0
- package/src/tokens/runtime/contrast/pairings.ts +324 -0
- package/src/tokens/runtime/contrast/thresholds.ts +81 -0
- package/src/tokens/runtime/corpus-documents.ts +289 -0
- package/src/tokens/runtime/corpus-validation.ts +336 -0
- package/src/tokens/runtime/corpus.ts +179 -0
- package/src/tokens/runtime/css-configuration.ts +1 -0
- package/src/tokens/runtime/css-stylelint.ts +15 -0
- package/src/tokens/runtime/css-support.ts +407 -0
- package/src/tokens/runtime/evaluate.ts +262 -0
- package/src/tokens/runtime/evaluated-provenance.ts +116 -0
- package/src/tokens/runtime/format-validator.generated.d.ts +18 -0
- package/src/tokens/runtime/format-validator.generated.js +13029 -0
- package/src/tokens/runtime/index.ts +78 -0
- package/src/tokens/runtime/package-version.generated.ts +9 -0
- package/src/tokens/runtime/projection.ts +65 -0
- package/src/tokens/runtime/registry.ts +365 -0
- package/src/tokens/runtime/resolve-extends.ts +211 -0
- package/src/tokens/runtime/resolve-references.ts +313 -0
- package/src/tokens/runtime/resolve-shared.ts +186 -0
- package/src/tokens/runtime/resolve.ts +246 -0
- package/src/tokens/runtime/resolver-order.ts +326 -0
- package/src/tokens/runtime/resolver-validator.generated.d.ts +18 -0
- package/src/tokens/runtime/resolver-validator.generated.js +15492 -0
- package/src/tokens/runtime/source-digest.ts +49 -0
- package/src/tokens/runtime/stylesheet-skeleton.ts +123 -0
- package/src/tokens/runtime/theme-sources.ts +121 -0
- package/src/tokens/runtime/theme-stylesheet.ts +177 -0
- package/src/tokens/runtime/types.ts +140 -0
- package/src/tokens/runtime/validate-resolver.ts +338 -0
- package/src/tokens/runtime/validate-schema.ts +269 -0
- package/src/tokens/runtime/validate-tokens.ts +181 -0
- package/src/tokens/runtime/validate-values.ts +396 -0
- package/src/tokens/runtime/validate.ts +57 -0
- package/src/tokens/runtime/value-color-parse.ts +309 -0
- package/src/tokens/runtime/value-color.ts +217 -0
- package/src/tokens/runtime/value-entry.ts +52 -0
- package/src/tokens/runtime/value-formatters.ts +414 -0
- package/src/tokens/sets/colors.tokens.json +65 -13
- package/src/tokens/sets/foundation.tokens.json +23 -0
- package/src/tokens/sets/semantic.tokens.json +136 -30
- package/src/utilities/highlighter.ts +5 -5
- package/src/utilities/retrying-loader-cache.ts +3 -6
- package/dist/components/code-block/code-block-default-highlighter.d.ts +0 -40
- package/dist/server/index.server-298z43yn.js +0 -4
- package/dist/server/index.server-3h11wjyh.js +0 -8
- package/dist/server/index.server-a3aerbfr.js +0 -4
- package/dist/server/index.server-kge3zp6n.js +0 -4
- package/dist/server/index.server-syf81nwz.js +0 -6
- package/dist/server/index.server-zs08f5te.js +0 -3
- package/src/components/code-block/code-block-default-highlighter.ts +0 -63
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
"public": true,
|
|
16
16
|
"category": "color",
|
|
17
17
|
"contrastPairs": ["text.default"],
|
|
18
|
-
"cssRecipe": "light-dark(oklch(99.4% 0.002 255), oklch(21% 0.04 245))"
|
|
18
|
+
"cssRecipe": "light-dark(oklch(99.4% 0.002 255), oklch(21% 0.04 245))",
|
|
19
|
+
"palette": {
|
|
20
|
+
"family": "neutral",
|
|
21
|
+
"role": "surface-base"
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
25
|
},
|
|
@@ -32,7 +36,11 @@
|
|
|
32
36
|
"public": true,
|
|
33
37
|
"category": "color",
|
|
34
38
|
"contrastPairs": ["text.default"],
|
|
35
|
-
"cssRecipe": "light-dark(oklch(100% 0 255), oklch(28% 0.045 245))"
|
|
39
|
+
"cssRecipe": "light-dark(oklch(100% 0 255), oklch(28% 0.045 245))",
|
|
40
|
+
"palette": {
|
|
41
|
+
"family": "neutral",
|
|
42
|
+
"role": "surface-raised"
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
45
|
}
|
|
38
46
|
},
|
|
@@ -78,7 +86,11 @@
|
|
|
78
86
|
"cssProperty": "--cinder-surface-inset",
|
|
79
87
|
"public": true,
|
|
80
88
|
"category": "color",
|
|
81
|
-
"cssRecipe": "light-dark(oklch(96% 0.005 255), oklch(11% 0.03 245))"
|
|
89
|
+
"cssRecipe": "light-dark(oklch(96% 0.005 255), oklch(11% 0.03 245))",
|
|
90
|
+
"palette": {
|
|
91
|
+
"family": "neutral",
|
|
92
|
+
"role": "surface-inset"
|
|
93
|
+
}
|
|
82
94
|
}
|
|
83
95
|
}
|
|
84
96
|
},
|
|
@@ -154,7 +166,11 @@
|
|
|
154
166
|
"cssProperty": "--cinder-surface-canvas",
|
|
155
167
|
"public": true,
|
|
156
168
|
"category": "color",
|
|
157
|
-
"cssRecipe": "light-dark(oklch(98.4% 0.003 255), oklch(15% 0.035 245))"
|
|
169
|
+
"cssRecipe": "light-dark(oklch(98.4% 0.003 255), oklch(15% 0.035 245))",
|
|
170
|
+
"palette": {
|
|
171
|
+
"family": "neutral",
|
|
172
|
+
"role": "surface-canvas"
|
|
173
|
+
}
|
|
158
174
|
}
|
|
159
175
|
}
|
|
160
176
|
}
|
|
@@ -190,7 +206,11 @@
|
|
|
190
206
|
"cssProperty": "--cinder-border-ink",
|
|
191
207
|
"public": true,
|
|
192
208
|
"category": "color",
|
|
193
|
-
"cssRecipe": "light-dark(oklch(20% 0.02 255), oklch(86% 0.065 250))"
|
|
209
|
+
"cssRecipe": "light-dark(oklch(20% 0.02 255), oklch(86% 0.065 250))",
|
|
210
|
+
"palette": {
|
|
211
|
+
"family": "neutral",
|
|
212
|
+
"role": "border-ink"
|
|
213
|
+
}
|
|
194
214
|
}
|
|
195
215
|
}
|
|
196
216
|
},
|
|
@@ -222,7 +242,11 @@
|
|
|
222
242
|
"cssProperty": "--cinder-border-faint",
|
|
223
243
|
"public": true,
|
|
224
244
|
"category": "color",
|
|
225
|
-
"cssRecipe": "light-dark(oklch(92% 0.003 255), oklch(33% 0.03 245))"
|
|
245
|
+
"cssRecipe": "light-dark(oklch(92% 0.003 255), oklch(33% 0.03 245))",
|
|
246
|
+
"palette": {
|
|
247
|
+
"family": "neutral",
|
|
248
|
+
"role": "border-faint"
|
|
249
|
+
}
|
|
226
250
|
}
|
|
227
251
|
}
|
|
228
252
|
},
|
|
@@ -288,7 +312,11 @@
|
|
|
288
312
|
"cssProperty": "--cinder-text-muted",
|
|
289
313
|
"public": true,
|
|
290
314
|
"category": "color",
|
|
291
|
-
"cssRecipe": "light-dark(oklch(32% 0.014 245), oklch(82% 0.02 245))"
|
|
315
|
+
"cssRecipe": "light-dark(oklch(32% 0.014 245), oklch(82% 0.02 245))",
|
|
316
|
+
"palette": {
|
|
317
|
+
"family": "neutral",
|
|
318
|
+
"role": "text-muted"
|
|
319
|
+
}
|
|
292
320
|
}
|
|
293
321
|
}
|
|
294
322
|
},
|
|
@@ -303,7 +331,11 @@
|
|
|
303
331
|
"cssProperty": "--cinder-text-subtle",
|
|
304
332
|
"public": true,
|
|
305
333
|
"category": "color",
|
|
306
|
-
"cssRecipe": "light-dark(oklch(42% 0.012 245), oklch(72% 0.02 245))"
|
|
334
|
+
"cssRecipe": "light-dark(oklch(42% 0.012 245), oklch(72% 0.02 245))",
|
|
335
|
+
"palette": {
|
|
336
|
+
"family": "neutral",
|
|
337
|
+
"role": "text-subtle"
|
|
338
|
+
}
|
|
307
339
|
}
|
|
308
340
|
}
|
|
309
341
|
},
|
|
@@ -318,7 +350,11 @@
|
|
|
318
350
|
"cssProperty": "--cinder-text-disabled",
|
|
319
351
|
"public": true,
|
|
320
352
|
"category": "color",
|
|
321
|
-
"cssRecipe": "light-dark(oklch(52% 0.01 245), oklch(64% 0.02 245))"
|
|
353
|
+
"cssRecipe": "light-dark(oklch(52% 0.01 245), oklch(64% 0.02 245))",
|
|
354
|
+
"palette": {
|
|
355
|
+
"family": "neutral",
|
|
356
|
+
"role": "text-disabled"
|
|
357
|
+
}
|
|
322
358
|
}
|
|
323
359
|
}
|
|
324
360
|
},
|
|
@@ -349,7 +385,12 @@
|
|
|
349
385
|
"cssProperty": "--cinder-text-default",
|
|
350
386
|
"public": true,
|
|
351
387
|
"category": "color",
|
|
352
|
-
"cssRecipe": "light-dark(oklch(20% 0.018 245), oklch(92% 0.02 245))"
|
|
388
|
+
"cssRecipe": "light-dark(oklch(20% 0.018 245), oklch(92% 0.02 245))",
|
|
389
|
+
"palette": {
|
|
390
|
+
"family": "neutral",
|
|
391
|
+
"role": "text-default",
|
|
392
|
+
"anchor": true
|
|
393
|
+
}
|
|
353
394
|
}
|
|
354
395
|
}
|
|
355
396
|
}
|
|
@@ -367,7 +408,11 @@
|
|
|
367
408
|
"cssProperty": "--cinder-fill-disabled",
|
|
368
409
|
"public": true,
|
|
369
410
|
"category": "color",
|
|
370
|
-
"cssRecipe": "light-dark(oklch(86% 0.006 255), oklch(30% 0.015 245))"
|
|
411
|
+
"cssRecipe": "light-dark(oklch(86% 0.006 255), oklch(30% 0.015 245))",
|
|
412
|
+
"palette": {
|
|
413
|
+
"family": "neutral",
|
|
414
|
+
"role": "fill-disabled"
|
|
415
|
+
}
|
|
371
416
|
}
|
|
372
417
|
}
|
|
373
418
|
}
|
|
@@ -403,7 +448,11 @@
|
|
|
403
448
|
"cssProperty": "--cinder-accent-text",
|
|
404
449
|
"public": true,
|
|
405
450
|
"category": "color",
|
|
406
|
-
"cssRecipe": "light-dark(oklch(45% 0.22 270), oklch(72% 0.14 270))"
|
|
451
|
+
"cssRecipe": "light-dark(oklch(45% 0.22 270), oklch(72% 0.14 270))",
|
|
452
|
+
"palette": {
|
|
453
|
+
"family": "accent",
|
|
454
|
+
"role": "text"
|
|
455
|
+
}
|
|
407
456
|
}
|
|
408
457
|
}
|
|
409
458
|
},
|
|
@@ -436,7 +485,12 @@
|
|
|
436
485
|
"cssProperty": "--cinder-accent-solid",
|
|
437
486
|
"public": true,
|
|
438
487
|
"category": "color",
|
|
439
|
-
"cssRecipe": "light-dark(oklch(50% 0.22 270), oklch(72% 0.14 270))"
|
|
488
|
+
"cssRecipe": "light-dark(oklch(50% 0.22 270), oklch(72% 0.14 270))",
|
|
489
|
+
"palette": {
|
|
490
|
+
"family": "accent",
|
|
491
|
+
"role": "solid",
|
|
492
|
+
"anchor": true
|
|
493
|
+
}
|
|
440
494
|
}
|
|
441
495
|
}
|
|
442
496
|
},
|
|
@@ -529,23 +583,23 @@
|
|
|
529
583
|
"offset": {
|
|
530
584
|
"$type": "dimension",
|
|
531
585
|
"$value": {
|
|
532
|
-
"value":
|
|
586
|
+
"value": 0,
|
|
533
587
|
"unit": "px"
|
|
534
588
|
},
|
|
535
|
-
"$description": "Focus ring offset from the control edge.",
|
|
589
|
+
"$description": "Focus ring offset from the control edge. Zero: the ring sits directly on the control edge with no offset band, so focus reads as one tight 2px line rather than a 4px double band (COR-1498). Filled controls add a private 2px gap instead; see `ring.offset-color`. Emitted as `0px`, not a bare `0`, because the ring recipes add it to `--cinder-ring-width` inside `calc()`, where a unitless zero is a number and invalidates the sum.",
|
|
536
590
|
"$extensions": {
|
|
537
591
|
"com.lostgradient.cinder": {
|
|
538
592
|
"cssProperty": "--cinder-ring-offset",
|
|
539
593
|
"public": true,
|
|
540
594
|
"category": "size",
|
|
541
|
-
"cssRecipe":
|
|
595
|
+
"cssRecipe": "0px"
|
|
542
596
|
}
|
|
543
597
|
}
|
|
544
598
|
},
|
|
545
599
|
"offset-color": {
|
|
546
600
|
"$type": "color",
|
|
547
601
|
"$value": "{surface.raised}",
|
|
548
|
-
"$description": "
|
|
602
|
+
"$description": "Color of the gap band between a focus ring and the control. Filled controls (a solid accent, danger or status fill on the focused element) paint a 2px gap in this color before the ring, so the accent-hued ring sits on the page instead of on a same-hue fill. Unfilled controls use `ring.offset`, which is zero, so they paint no gap. box-shadow cannot paint a transparent gap, so the band needs a real color; it is pinned to `surface.raised`, where controls overwhelmingly live.",
|
|
549
603
|
"$extensions": {
|
|
550
604
|
"com.lostgradient.cinder": {
|
|
551
605
|
"cssProperty": "--cinder-ring-offset-color",
|
|
@@ -577,7 +631,7 @@
|
|
|
577
631
|
"colorSpace": "oklch",
|
|
578
632
|
"components": [0.15, 0.035, 245]
|
|
579
633
|
},
|
|
580
|
-
"$description": "Ring color
|
|
634
|
+
"$description": "Ring color used by the FloatingAction primary variant, whose ring sits directly on its accent fill. Light arm is a near-black and dark arm a near-white, both strongly contrasting the page background. Against the fill itself it measures about 3:1 in light mode and about 2.5:1 in dark mode, so other filled controls use a `ring.offset-color` gap and the standard ring instead (focus-ring-policy.md).",
|
|
581
635
|
"$extensions": {
|
|
582
636
|
"com.lostgradient.cinder": {
|
|
583
637
|
"cssProperty": "--cinder-ring-on-accent",
|
|
@@ -961,7 +1015,12 @@
|
|
|
961
1015
|
"cssProperty": "--cinder-status-success-solid",
|
|
962
1016
|
"public": true,
|
|
963
1017
|
"category": "color",
|
|
964
|
-
"cssRecipe": "light-dark(oklch(50% 0.157 145), oklch(78% 0.14 145))"
|
|
1018
|
+
"cssRecipe": "light-dark(oklch(50% 0.157 145), oklch(78% 0.14 145))",
|
|
1019
|
+
"palette": {
|
|
1020
|
+
"family": "success",
|
|
1021
|
+
"role": "solid",
|
|
1022
|
+
"anchor": true
|
|
1023
|
+
}
|
|
965
1024
|
}
|
|
966
1025
|
}
|
|
967
1026
|
},
|
|
@@ -977,7 +1036,11 @@
|
|
|
977
1036
|
"cssProperty": "--cinder-status-success-solid-active",
|
|
978
1037
|
"public": true,
|
|
979
1038
|
"category": "color",
|
|
980
|
-
"cssRecipe": "light-dark(oklch(35% 0.1 145), oklch(62% 0.14 145))"
|
|
1039
|
+
"cssRecipe": "light-dark(oklch(35% 0.1 145), oklch(62% 0.14 145))",
|
|
1040
|
+
"palette": {
|
|
1041
|
+
"family": "success",
|
|
1042
|
+
"role": "solid-active"
|
|
1043
|
+
}
|
|
981
1044
|
}
|
|
982
1045
|
}
|
|
983
1046
|
},
|
|
@@ -993,7 +1056,11 @@
|
|
|
993
1056
|
"cssProperty": "--cinder-status-success-solid-hover",
|
|
994
1057
|
"public": true,
|
|
995
1058
|
"category": "color",
|
|
996
|
-
"cssRecipe": "light-dark(oklch(42% 0.12 145), oklch(70% 0.14 145))"
|
|
1059
|
+
"cssRecipe": "light-dark(oklch(42% 0.12 145), oklch(70% 0.14 145))",
|
|
1060
|
+
"palette": {
|
|
1061
|
+
"family": "success",
|
|
1062
|
+
"role": "solid-hover"
|
|
1063
|
+
}
|
|
997
1064
|
}
|
|
998
1065
|
}
|
|
999
1066
|
}
|
|
@@ -1029,7 +1096,12 @@
|
|
|
1029
1096
|
"cssProperty": "--cinder-status-warning-solid",
|
|
1030
1097
|
"public": true,
|
|
1031
1098
|
"category": "color",
|
|
1032
|
-
"cssRecipe": "light-dark(oklch(54% 0.113 75), oklch(82% 0.156 75))"
|
|
1099
|
+
"cssRecipe": "light-dark(oklch(54% 0.113 75), oklch(82% 0.156 75))",
|
|
1100
|
+
"palette": {
|
|
1101
|
+
"family": "warning",
|
|
1102
|
+
"role": "solid",
|
|
1103
|
+
"anchor": true
|
|
1104
|
+
}
|
|
1033
1105
|
}
|
|
1034
1106
|
}
|
|
1035
1107
|
},
|
|
@@ -1045,7 +1117,11 @@
|
|
|
1045
1117
|
"cssProperty": "--cinder-status-warning-solid-active",
|
|
1046
1118
|
"public": true,
|
|
1047
1119
|
"category": "color",
|
|
1048
|
-
"cssRecipe": "light-dark(oklch(38% 0.07 75), oklch(66% 0.13 75))"
|
|
1120
|
+
"cssRecipe": "light-dark(oklch(38% 0.07 75), oklch(66% 0.13 75))",
|
|
1121
|
+
"palette": {
|
|
1122
|
+
"family": "warning",
|
|
1123
|
+
"role": "solid-active"
|
|
1124
|
+
}
|
|
1049
1125
|
}
|
|
1050
1126
|
}
|
|
1051
1127
|
},
|
|
@@ -1061,7 +1137,11 @@
|
|
|
1061
1137
|
"cssProperty": "--cinder-status-warning-solid-hover",
|
|
1062
1138
|
"public": true,
|
|
1063
1139
|
"category": "color",
|
|
1064
|
-
"cssRecipe": "light-dark(oklch(42% 0.08 75), oklch(74% 0.156 75))"
|
|
1140
|
+
"cssRecipe": "light-dark(oklch(42% 0.08 75), oklch(74% 0.156 75))",
|
|
1141
|
+
"palette": {
|
|
1142
|
+
"family": "warning",
|
|
1143
|
+
"role": "solid-hover"
|
|
1144
|
+
}
|
|
1065
1145
|
}
|
|
1066
1146
|
}
|
|
1067
1147
|
}
|
|
@@ -1097,7 +1177,12 @@
|
|
|
1097
1177
|
"cssProperty": "--cinder-status-danger-solid",
|
|
1098
1178
|
"public": true,
|
|
1099
1179
|
"category": "color",
|
|
1100
|
-
"cssRecipe": "light-dark(oklch(50% 0.202 25), oklch(72% 0.172 25))"
|
|
1180
|
+
"cssRecipe": "light-dark(oklch(50% 0.202 25), oklch(72% 0.172 25))",
|
|
1181
|
+
"palette": {
|
|
1182
|
+
"family": "danger",
|
|
1183
|
+
"role": "solid",
|
|
1184
|
+
"anchor": true
|
|
1185
|
+
}
|
|
1101
1186
|
}
|
|
1102
1187
|
}
|
|
1103
1188
|
},
|
|
@@ -1113,7 +1198,11 @@
|
|
|
1113
1198
|
"cssProperty": "--cinder-status-danger-solid-active",
|
|
1114
1199
|
"public": true,
|
|
1115
1200
|
"category": "color",
|
|
1116
|
-
"cssRecipe": "light-dark(oklch(35% 0.142 25), oklch(60% 0.172 25))"
|
|
1201
|
+
"cssRecipe": "light-dark(oklch(35% 0.142 25), oklch(60% 0.172 25))",
|
|
1202
|
+
"palette": {
|
|
1203
|
+
"family": "danger",
|
|
1204
|
+
"role": "solid-active"
|
|
1205
|
+
}
|
|
1117
1206
|
}
|
|
1118
1207
|
}
|
|
1119
1208
|
},
|
|
@@ -1129,7 +1218,11 @@
|
|
|
1129
1218
|
"cssProperty": "--cinder-status-danger-solid-hover",
|
|
1130
1219
|
"public": true,
|
|
1131
1220
|
"category": "color",
|
|
1132
|
-
"cssRecipe": "light-dark(oklch(42% 0.171 25), oklch(64% 0.172 25))"
|
|
1221
|
+
"cssRecipe": "light-dark(oklch(42% 0.171 25), oklch(64% 0.172 25))",
|
|
1222
|
+
"palette": {
|
|
1223
|
+
"family": "danger",
|
|
1224
|
+
"role": "solid-hover"
|
|
1225
|
+
}
|
|
1133
1226
|
}
|
|
1134
1227
|
}
|
|
1135
1228
|
}
|
|
@@ -1165,7 +1258,12 @@
|
|
|
1165
1258
|
"cssProperty": "--cinder-status-info-solid",
|
|
1166
1259
|
"public": true,
|
|
1167
1260
|
"category": "color",
|
|
1168
|
-
"cssRecipe": "light-dark(oklch(50% 0.098 230), oklch(78% 0.13 230))"
|
|
1261
|
+
"cssRecipe": "light-dark(oklch(50% 0.098 230), oklch(78% 0.13 230))",
|
|
1262
|
+
"palette": {
|
|
1263
|
+
"family": "info",
|
|
1264
|
+
"role": "solid",
|
|
1265
|
+
"anchor": true
|
|
1266
|
+
}
|
|
1169
1267
|
}
|
|
1170
1268
|
}
|
|
1171
1269
|
},
|
|
@@ -1181,7 +1279,11 @@
|
|
|
1181
1279
|
"cssProperty": "--cinder-status-info-solid-active",
|
|
1182
1280
|
"public": true,
|
|
1183
1281
|
"category": "color",
|
|
1184
|
-
"cssRecipe": "light-dark(oklch(35% 0.065 230), oklch(62% 0.12 230))"
|
|
1282
|
+
"cssRecipe": "light-dark(oklch(35% 0.065 230), oklch(62% 0.12 230))",
|
|
1283
|
+
"palette": {
|
|
1284
|
+
"family": "info",
|
|
1285
|
+
"role": "solid-active"
|
|
1286
|
+
}
|
|
1185
1287
|
}
|
|
1186
1288
|
}
|
|
1187
1289
|
},
|
|
@@ -1197,7 +1299,11 @@
|
|
|
1197
1299
|
"cssProperty": "--cinder-status-info-solid-hover",
|
|
1198
1300
|
"public": true,
|
|
1199
1301
|
"category": "color",
|
|
1200
|
-
"cssRecipe": "light-dark(oklch(42% 0.079 230), oklch(70% 0.13 230))"
|
|
1302
|
+
"cssRecipe": "light-dark(oklch(42% 0.079 230), oklch(70% 0.13 230))",
|
|
1303
|
+
"palette": {
|
|
1304
|
+
"family": "info",
|
|
1305
|
+
"role": "solid-hover"
|
|
1306
|
+
}
|
|
1201
1307
|
}
|
|
1202
1308
|
}
|
|
1203
1309
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `Highlighter` contract for `<CodeBlock>`.
|
|
3
3
|
*
|
|
4
|
-
* `<CodeBlock>`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* `<CodeBlock>` imports no highlighter of its own. A consumer supplies one —
|
|
5
|
+
* a `shikiHighlighter()` instance over the grammars it needs,
|
|
6
|
+
* `fullShikiHighlighter()` for every grammar Shiki ships, or any function of
|
|
7
|
+
* this type — either per block through `<CodeBlock highlighter={...} />` or
|
|
8
|
+
* for a whole subtree through `setCodeHighlighterContext(highlighter)`.
|
|
9
9
|
*
|
|
10
10
|
* This file holds the canonical type so plain `.ts` consumers and `.svelte`
|
|
11
11
|
* components can both `import type` it without going through a component
|
|
@@ -8,11 +8,8 @@
|
|
|
8
8
|
* chunk-load failure, etc.) would lock the cached rejection in forever
|
|
9
9
|
* and every subsequent call would replay the failure.
|
|
10
10
|
*
|
|
11
|
-
* Used by the
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* can reuse it WITHOUT a static import edge to the Shiki adapter — keeping the
|
|
15
|
-
* adapter out of CodeBlock's static import graph (see
|
|
16
|
-
* `code-block.bundle-boundary.test.ts`).
|
|
11
|
+
* Used by the Shiki adapter (to wrap its lazy Shiki imports) and by the JSON
|
|
12
|
+
* Schema interpreter. Lives in `utilities/` so a module can reuse it without
|
|
13
|
+
* an import edge to the Shiki adapter.
|
|
17
14
|
*/
|
|
18
15
|
export declare function createRetryingLoaderCache<T>(loader: () => Promise<T>): () => Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lostgradient/cinder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "A Svelte 5 component library and design system focused on accessibility, theming, and per-component tree-shaking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"svelte",
|
|
@@ -169,6 +169,14 @@
|
|
|
169
169
|
"import": "./src/tokens/resolved/light.json",
|
|
170
170
|
"default": "./src/tokens/resolved/light.json"
|
|
171
171
|
},
|
|
172
|
+
"./tokens/runtime": {
|
|
173
|
+
"types": "./dist/tokens/runtime/index.d.ts",
|
|
174
|
+
"browser": "./src/tokens/runtime/index.ts",
|
|
175
|
+
"svelte": "./src/tokens/runtime/index.ts",
|
|
176
|
+
"node": "./dist/server/tokens/runtime/index.js",
|
|
177
|
+
"import": "./src/tokens/runtime/index.ts",
|
|
178
|
+
"default": "./dist/tokens/runtime/index.js"
|
|
179
|
+
},
|
|
172
180
|
"./tokens/registry": {
|
|
173
181
|
"types": "./dist/tokens/registry.generated.d.ts",
|
|
174
182
|
"browser": "./src/tokens/registry.generated.ts",
|
|
@@ -6451,7 +6459,7 @@
|
|
|
6451
6459
|
"types": "./dist/index.d.ts",
|
|
6452
6460
|
"dependencies": {
|
|
6453
6461
|
"@floating-ui/dom": "1.7.6",
|
|
6454
|
-
"@lostgradient/markdown": "^0.6.
|
|
6462
|
+
"@lostgradient/markdown": "^0.6.2",
|
|
6455
6463
|
"@shikijs/engine-oniguruma": "^3.21.0",
|
|
6456
6464
|
"@shikijs/langs": "^3.21.0",
|
|
6457
6465
|
"@shikijs/themes": "^3.21.0",
|
|
@@ -6573,6 +6581,10 @@
|
|
|
6573
6581
|
"!src/highlighters/**/*.spec.ts",
|
|
6574
6582
|
"src/tokens/**/*.json",
|
|
6575
6583
|
"src/tokens/registry.generated.ts",
|
|
6584
|
+
"src/tokens/runtime/**/*.ts",
|
|
6585
|
+
"src/tokens/runtime/**/*.js",
|
|
6586
|
+
"!src/tokens/runtime/**/*.test.ts",
|
|
6587
|
+
"!src/tokens/runtime/**/*.test-support.ts",
|
|
6576
6588
|
"src/styles/**/*.css",
|
|
6577
6589
|
"src/styles/**/*.css.d.ts",
|
|
6578
6590
|
"src/styles/base-guard.ts",
|
|
@@ -6584,5 +6596,5 @@
|
|
|
6584
6596
|
"bin": {
|
|
6585
6597
|
"cinder": "./dist/cli/index.js"
|
|
6586
6598
|
},
|
|
6587
|
-
"gitHead": "
|
|
6599
|
+
"gitHead": "6b5b3d637d1dc425acdb31b6260831afd5292bc5"
|
|
6588
6600
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The code-highlighter context. An application publishes one highlighter near
|
|
3
|
+
* its root, and every descendant `<CodeBlock>` without its own `highlighter`
|
|
4
|
+
* prop highlights with it.
|
|
5
|
+
*
|
|
6
|
+
* `<CodeBlock>` imports no highlighter of its own. A default reachable from
|
|
7
|
+
* the component, even behind a lazy `import()`, makes a consumer's bundler emit
|
|
8
|
+
* every grammar and theme that highlighter can load, whether or not any block
|
|
9
|
+
* ever uses them. Resolving the highlighter from a prop or from this context
|
|
10
|
+
* keeps the choice, and its bundle cost, with the application.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { createContext } from 'svelte';
|
|
14
|
+
|
|
15
|
+
import type { Highlighter } from '../utilities/highlighter.ts';
|
|
16
|
+
import { optionalContext } from './optional-context.ts';
|
|
17
|
+
|
|
18
|
+
const [getCodeHighlighterContextStrict, setCodeHighlighterContextRaw] =
|
|
19
|
+
createContext<Highlighter>();
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Publish `highlighter` for every descendant `<CodeBlock>` that has no
|
|
23
|
+
* `highlighter` prop. Call it during component initialization, like any
|
|
24
|
+
* Svelte context setter. A nearer call replaces it for that subtree.
|
|
25
|
+
*
|
|
26
|
+
* @security Every block that falls back to this highlighter renders its
|
|
27
|
+
* output verbatim through `{@html}`, exactly as for the `highlighter` prop:
|
|
28
|
+
* the highlighter must escape the code it is given.
|
|
29
|
+
*/
|
|
30
|
+
export function setCodeHighlighterContext(highlighter: Highlighter): void {
|
|
31
|
+
setCodeHighlighterContextRaw(highlighter);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Read the nearest published highlighter, or `undefined` when no ancestor
|
|
36
|
+
* published one. A missing provider is a supported state: the block renders
|
|
37
|
+
* its escaped plain fallback.
|
|
38
|
+
*/
|
|
39
|
+
export const getCodeHighlighterContext: () => Highlighter | undefined = optionalContext(
|
|
40
|
+
getCodeHighlighterContextStrict,
|
|
41
|
+
);
|
|
@@ -477,6 +477,31 @@
|
|
|
477
477
|
border-color: transparent;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
+
/* Filled faces (primary, danger) get a page-coloured gap between the fill and
|
|
481
|
+
* the ring, so the accent-hued ring sits on the page instead of on a same-hue
|
|
482
|
+
* fill (COR-1498, focus-ring-policy.md). An aria-disabled button that is not
|
|
483
|
+
* loading has no fill and keeps the tight ring. */
|
|
484
|
+
.cinder-button[data-cinder-variant='primary']:focus-visible:not(:disabled):not(
|
|
485
|
+
[aria-disabled='true']:not([data-cinder-loading])
|
|
486
|
+
),
|
|
487
|
+
.cinder-button[data-cinder-variant='danger']:focus-visible:not(:disabled):not(
|
|
488
|
+
[aria-disabled='true']:not([data-cinder-loading])
|
|
489
|
+
) {
|
|
490
|
+
box-shadow: var(--_cinder-focus-ring-filled-shadow);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
@media (forced-colors: active) {
|
|
494
|
+
.cinder-button[data-cinder-variant='primary']:focus-visible:not(:disabled):not(
|
|
495
|
+
[aria-disabled='true']:not([data-cinder-loading])
|
|
496
|
+
),
|
|
497
|
+
.cinder-button[data-cinder-variant='danger']:focus-visible:not(:disabled):not(
|
|
498
|
+
[aria-disabled='true']:not([data-cinder-loading])
|
|
499
|
+
) {
|
|
500
|
+
outline: var(--cinder-ring-width) solid ButtonText;
|
|
501
|
+
outline-offset: 3px;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
480
505
|
@media (forced-colors: active) {
|
|
481
506
|
.cinder-button[data-cinder-icon-only][data-cinder-variant='ghost'] {
|
|
482
507
|
background: ButtonFace;
|
|
@@ -109,6 +109,20 @@
|
|
|
109
109
|
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/* Range ends are solid accent fills: gap, then ring (COR-1498). */
|
|
113
|
+
.cinder-calendar__day[data-range-start]:focus-visible,
|
|
114
|
+
.cinder-calendar__day[data-range-end]:focus-visible {
|
|
115
|
+
box-shadow: var(--_cinder-focus-ring-filled-shadow);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (forced-colors: active) {
|
|
119
|
+
.cinder-calendar__day[data-range-start]:focus-visible,
|
|
120
|
+
.cinder-calendar__day[data-range-end]:focus-visible {
|
|
121
|
+
outline: var(--cinder-ring-width) solid ButtonText;
|
|
122
|
+
outline-offset: 1px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
112
126
|
@media (forced-colors: active) {
|
|
113
127
|
.cinder-calendar__day:focus-visible {
|
|
114
128
|
outline: var(--cinder-ring-width) solid ButtonText;
|
|
@@ -116,6 +116,11 @@
|
|
|
116
116
|
0 0 0 calc(var(--cinder-ring-offset) + var(--cinder-ring-width)) var(--cinder-ring-color);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/* The primary action is a solid accent fill: gap, then ring (COR-1498). */
|
|
120
|
+
.cinder-capability-gate__primary:focus-visible {
|
|
121
|
+
box-shadow: var(--_cinder-focus-ring-filled-shadow);
|
|
122
|
+
}
|
|
123
|
+
|
|
119
124
|
@media (forced-colors: active) {
|
|
120
125
|
.cinder-capability-gate__primary:focus-visible,
|
|
121
126
|
.cinder-capability-gate__fallback:focus-visible,
|
|
@@ -186,6 +186,25 @@
|
|
|
186
186
|
border-color: var(--cinder-status-danger-solid);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
/* Checked and indeterminate boxes are solid accent fills, so the ring gets a
|
|
190
|
+
page-coloured gap (COR-1498). Written inline so an invalid box keeps its
|
|
191
|
+
danger ring through the hook. */
|
|
192
|
+
.cinder-checkbox:checked:focus-visible,
|
|
193
|
+
.cinder-checkbox:indeterminate:focus-visible {
|
|
194
|
+
box-shadow:
|
|
195
|
+
0 0 0 var(--_cinder-focus-ring-filled-gap) var(--cinder-ring-offset-color),
|
|
196
|
+
0 0 0 calc(var(--_cinder-focus-ring-filled-gap) + var(--cinder-ring-width))
|
|
197
|
+
var(--_cinder-checkbox-ring, var(--cinder-ring-color));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (forced-colors: active) {
|
|
201
|
+
.cinder-checkbox:checked:focus-visible,
|
|
202
|
+
.cinder-checkbox:indeterminate:focus-visible {
|
|
203
|
+
outline: var(--cinder-ring-width) solid Highlight;
|
|
204
|
+
outline-offset: 1px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
189
208
|
/* Label */
|
|
190
209
|
.cinder-checkbox-field__label,
|
|
191
210
|
.cinder-checkbox-field .cinder-form-field__label {
|
|
@@ -222,6 +222,20 @@
|
|
|
222
222
|
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
/* Pressed accent, danger, success, warning and info chips are solid fills, so
|
|
226
|
+
* the ring gets a page-coloured gap (COR-1498). Neutral pressed is a surface
|
|
227
|
+
* shift, not a fill, and keeps the tight ring. */
|
|
228
|
+
button.cinder-chip[aria-pressed='true']:not([data-cinder-variant='neutral']):focus-visible {
|
|
229
|
+
box-shadow: var(--_cinder-focus-ring-filled-shadow);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (forced-colors: active) {
|
|
233
|
+
button.cinder-chip[aria-pressed='true']:not([data-cinder-variant='neutral']):focus-visible {
|
|
234
|
+
outline: var(--cinder-ring-width) solid ButtonText;
|
|
235
|
+
outline-offset: 3px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
225
239
|
@media (forced-colors: active) {
|
|
226
240
|
button.cinder-chip:focus-visible,
|
|
227
241
|
.cinder-chip__remove:focus-visible {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"id": "with-language",
|
|
20
20
|
"title": "With language label and copy",
|
|
21
|
-
"description": "Header shows the language and a copy-to-clipboard button.
|
|
21
|
+
"description": "Header shows the language and a copy-to-clipboard button. The block highlights with the highlighter an ancestor publishes through setCodeHighlighterContext — here, the playground publishes one — and renders plain code when none is published.",
|
|
22
22
|
"code": "<script lang=\"ts\">\n import { CodeBlock } from '@lostgradient/cinder';\n\n const code = `SELECT id, name, created_at\nFROM users\nWHERE active = true\nORDER BY created_at DESC\nLIMIT 10;`;\n</script>\n\n<CodeBlock {code} language=\"sql\" copyable />\n"
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"highlight": {
|
|
14
14
|
"type": "boolean",
|
|
15
|
-
"description": "Whether to highlight. Defaults to `true` whenever `language` is set.\n\n`highlight={false}` is an absolute off switch: it disables ALL\nhighlighting — including an explicit `highlighter` prop
|
|
15
|
+
"description": "Whether to highlight. Defaults to `true` whenever `language` is set and a\nhighlighter resolves from the `highlighter` prop or from context.\n\n`highlight={false}` is an absolute off switch: it disables ALL\nhighlighting — including an explicit `highlighter` prop and a context\nhighlighter. The block renders the escaped plain `<pre><code>` fallback\nwhile keeping the `language` header label. When highlighting is enabled,\nclient-side colorization may appear after first paint, but the block keeps\nstable layout metrics."
|
|
16
16
|
},
|
|
17
17
|
"copyable": {
|
|
18
18
|
"type": "boolean",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{
|
|
39
39
|
"name": "highlighter",
|
|
40
40
|
"reason": "function-or-snippet",
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "Highlighter for this instance. Receives `(code, language)` and returns an\nHTML string (sync or async). Takes precedence over a highlighter an\nancestor published through `setCodeHighlighterContext`; with neither, the\nblock renders unhighlighted."
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
}
|
|
@@ -16,7 +16,7 @@ const schema = {
|
|
|
16
16
|
highlight: {
|
|
17
17
|
type: 'boolean',
|
|
18
18
|
description:
|
|
19
|
-
'Whether to highlight. Defaults to `true` whenever `language` is set.\n\n`highlight={false}` is an absolute off switch: it disables ALL\nhighlighting — including an explicit `highlighter` prop
|
|
19
|
+
'Whether to highlight. Defaults to `true` whenever `language` is set and a\nhighlighter resolves from the `highlighter` prop or from context.\n\n`highlight={false}` is an absolute off switch: it disables ALL\nhighlighting — including an explicit `highlighter` prop and a context\nhighlighter. The block renders the escaped plain `<pre><code>` fallback\nwhile keeping the `language` header label. When highlighting is enabled,\nclient-side colorization may appear after first paint, but the block keeps\nstable layout metrics.',
|
|
20
20
|
},
|
|
21
21
|
copyable: {
|
|
22
22
|
type: 'boolean',
|
|
@@ -45,7 +45,7 @@ const schema = {
|
|
|
45
45
|
name: 'highlighter',
|
|
46
46
|
reason: 'function-or-snippet',
|
|
47
47
|
description:
|
|
48
|
-
'
|
|
48
|
+
'Highlighter for this instance. Receives `(code, language)` and returns an\nHTML string (sync or async). Takes precedence over a highlighter an\nancestor published through `setCodeHighlighterContext`; with neither, the\nblock renders unhighlighted.',
|
|
49
49
|
},
|
|
50
50
|
],
|
|
51
51
|
},
|