@lostgradient/cinder 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/components.json +1 -1
  3. package/dist/components/code-block/code-block.css +15 -9
  4. package/dist/components/code-block/code-block.variables.js +8 -2
  5. package/dist/components/confirm-dialog/confirm-dialog.css +2 -0
  6. package/dist/components/confirm-dialog/confirm-dialog.schema.js +10 -1
  7. package/dist/components/confirm-dialog/confirm-dialog.types.d.ts +7 -0
  8. package/dist/components/confirm-dialog/index.js +478 -106
  9. package/dist/components/faceted-filter-bar/faceted-filter-bar.schema.js +5 -1
  10. package/dist/components/faceted-filter-bar/faceted-filter-bar.types.d.ts +2 -0
  11. package/dist/components/faceted-filter-bar/index.js +40 -31
  12. package/dist/components/navigation-bar/index.js +11 -17
  13. package/dist/components/run-step-timeline/index.js +65 -6
  14. package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +9 -1
  15. package/dist/index.js +352 -246
  16. package/dist/server/components/color-field/index.js +2 -2
  17. package/dist/server/components/confirm-dialog/index.js +7 -2
  18. package/dist/server/components/faceted-filter-bar/index.js +1 -1
  19. package/dist/server/components/navigation-bar/index.js +1 -1
  20. package/dist/server/components/run-step-timeline/index.js +1 -1
  21. package/dist/server/index.js +7 -7
  22. package/dist/server/{index.server-5tf22d6e.js → index.server-4wx0qven.js} +3 -3
  23. package/dist/server/{index.server-894t97kv.js → index.server-7yvpb6z7.js} +4 -4
  24. package/dist/server/{index.server-btgb3d56.js → index.server-d5a5ccz7.js} +18 -12
  25. package/dist/server/{index.server-z38bxms8.js → index.server-g5jgq3jp.js} +65 -6
  26. package/dist/server/{index.server-39ne5cd1.js → index.server-pxq277t5.js} +32 -1
  27. package/package.json +22 -95
  28. package/src/components/code-block/code-block.css +15 -9
  29. package/src/components/code-block/code-block.variables.json +7 -1
  30. package/src/components/code-block/code-block.variables.ts +7 -1
  31. package/src/components/confirm-dialog/confirm-dialog.css +2 -0
  32. package/src/components/confirm-dialog/confirm-dialog.schema.json +8 -0
  33. package/src/components/confirm-dialog/confirm-dialog.schema.ts +10 -0
  34. package/src/components/confirm-dialog/confirm-dialog.svelte +31 -3
  35. package/src/components/confirm-dialog/confirm-dialog.types.ts +7 -0
  36. package/src/components/faceted-filter-bar/faceted-filter-bar.schema.json +4 -0
  37. package/src/components/faceted-filter-bar/faceted-filter-bar.schema.ts +4 -0
  38. package/src/components/faceted-filter-bar/faceted-filter-bar.svelte +13 -11
  39. package/src/components/faceted-filter-bar/faceted-filter-bar.types.ts +2 -0
  40. package/src/components/navigation-bar/navigation-bar.svelte +2 -2
  41. package/src/components/run-step-timeline/run-step-timeline.svelte +4 -4
  42. package/src/components/run-step-timeline/run-step-timeline.utilities.ts +68 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Color_field,
3
3
  color_field_default
4
- } from "../../index.server-894t97kv.js";
5
- import"../../index.server-8xvc73zh.js";
4
+ } from "../../index.server-7yvpb6z7.js";
6
5
  import"../../index.server-7wsshxkg.js";
6
+ import"../../index.server-8xvc73zh.js";
7
7
  import"../../index.server-42qeekwc.js";
8
8
  import"../../index.server-weae7gs2.js";
9
9
  import"../../index.server-493m9fm5.js";
@@ -1,11 +1,16 @@
1
1
  import {
2
2
  Confirm_dialog,
3
3
  confirm_dialog_default
4
- } from "../../index.server-39ne5cd1.js";
4
+ } from "../../index.server-pxq277t5.js";
5
+ import"../../index.server-8xvc73zh.js";
6
+ import"../../index.server-42qeekwc.js";
7
+ import"../../index.server-weae7gs2.js";
8
+ import"../../index.server-493m9fm5.js";
5
9
  import"../../index.server-t3hknp1c.js";
6
10
  import"../../index.server-x9s4m9eg.js";
7
11
  import"../../index.server-zwjp26z8.js";
8
12
  import"../../index.server-1vsv7ngz.js";
13
+ import"../../index.server-abm21gz1.js";
9
14
  import"../../index.server-t859hsx1.js";
10
15
  import"../../index.server-6pdmym90.js";
11
16
  import"../../index.server-nj8mebze.js";
@@ -18,4 +23,4 @@ export {
18
23
  Confirm_dialog as ConfirmDialog
19
24
  };
20
25
 
21
- //# debugId=C1B33C2D042807EF64756E2164756E21
26
+ //# debugId=9E06E7591B75703964756E2164756E21
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Faceted_filter_bar,
3
3
  faceted_filter_bar_default
4
- } from "../../index.server-btgb3d56.js";
4
+ } from "../../index.server-d5a5ccz7.js";
5
5
  import"../../index.server-62mtrvr7.js";
6
6
  import"../../index.server-b6jr01st.js";
7
7
  import"../../index.server-317enkqq.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Navigation_bar,
3
3
  navigation_bar_default
4
- } from "../../index.server-5tf22d6e.js";
4
+ } from "../../index.server-4wx0qven.js";
5
5
  import"../../index.server-ge07r1p8.js";
6
6
  import"../../index.server-z7nvkz8v.js";
7
7
  import"../../index.server-0v6na3yp.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Run_step_timeline,
3
3
  run_step_timeline_default
4
- } from "../../index.server-z38bxms8.js";
4
+ } from "../../index.server-g5jgq3jp.js";
5
5
  import"../../index.server-7g2pzksm.js";
6
6
  import"../../index.server-2ta1a4ze.js";
7
7
  import"../../index.server-npxtkwjp.js";
@@ -179,7 +179,7 @@ import"./index.server-2752sd9e.js";
179
179
  import"./index.server-amfq2v2p.js";
180
180
  import {
181
181
  run_step_timeline_default
182
- } from "./index.server-z38bxms8.js";
182
+ } from "./index.server-g5jgq3jp.js";
183
183
  import {
184
184
  schedule_builder_default
185
185
  } from "./index.server-qbkxz7r2.js";
@@ -263,7 +263,7 @@ import {
263
263
  } from "./index.server-dj47xy3x.js";
264
264
  import {
265
265
  navigation_bar_default
266
- } from "./index.server-5tf22d6e.js";
266
+ } from "./index.server-4wx0qven.js";
267
267
  import {
268
268
  navigation_item_default
269
269
  } from "./index.server-ncdt0xb7.js";
@@ -387,7 +387,7 @@ import {
387
387
  } from "./index.server-dpw9dc92.js";
388
388
  import {
389
389
  faceted_filter_bar_default
390
- } from "./index.server-btgb3d56.js";
390
+ } from "./index.server-d5a5ccz7.js";
391
391
  import"./index.server-62mtrvr7.js";
392
392
  import {
393
393
  feature_section_default
@@ -512,8 +512,7 @@ import {
512
512
  import"./index.server-2h3y9v3e.js";
513
513
  import {
514
514
  color_field_default
515
- } from "./index.server-894t97kv.js";
516
- import"./index.server-8xvc73zh.js";
515
+ } from "./index.server-7yvpb6z7.js";
517
516
  import {
518
517
  color_picker_default
519
518
  } from "./index.server-a2hz77tt.js";
@@ -536,7 +535,8 @@ import {
536
535
  } from "./index.server-38aywdk1.js";
537
536
  import {
538
537
  confirm_dialog_default
539
- } from "./index.server-39ne5cd1.js";
538
+ } from "./index.server-pxq277t5.js";
539
+ import"./index.server-8xvc73zh.js";
540
540
  import {
541
541
  checkbox_default
542
542
  } from "./index.server-h90pjrez.js";
@@ -1214,4 +1214,4 @@ export {
1214
1214
  AccessGateExport as AccessGate
1215
1215
  };
1216
1216
 
1217
- //# debugId=3994A26365BEC65164756E2164756E21
1217
+ //# debugId=F0C951E819A724F664756E2164756E21
@@ -170,7 +170,7 @@ function Navigation_bar($$renderer, $$props) {
170
170
  menuToggle($$renderer2, {
171
171
  "aria-expanded": mobileMenuOpen ? "true" : "false",
172
172
  "aria-controls": regionId,
173
- ...false_default ? { onclick: handleToggle } : {}
173
+ onclick: handleToggle
174
174
  });
175
175
  $$renderer2.push(`<!----></div>`);
176
176
  } else {
@@ -192,7 +192,7 @@ function Navigation_bar($$renderer, $$props) {
192
192
  menuToggle($$renderer2, {
193
193
  "aria-expanded": mobileMenuOpen ? "true" : "false",
194
194
  "aria-controls": regionId,
195
- ...false_default ? { onclick: handleToggle } : {}
195
+ onclick: handleToggle
196
196
  });
197
197
  $$renderer2.push(`<!----></div>`);
198
198
  } else {
@@ -218,4 +218,4 @@ function Navigation_bar($$renderer, $$props) {
218
218
  var navigation_bar_default = Navigation_bar;
219
219
  export { Navigation_bar, navigation_bar_default };
220
220
 
221
- //# debugId=7CE77ABFF189F35064756E2164756E21
221
+ //# debugId=B71D374361EC71D464756E2164756E21
@@ -1,9 +1,9 @@
1
- import {
2
- Input
3
- } from "./index.server-8xvc73zh.js";
4
1
  import {
5
2
  parseColor
6
3
  } from "./index.server-7wsshxkg.js";
4
+ import {
5
+ Input
6
+ } from "./index.server-8xvc73zh.js";
7
7
  import {
8
8
  classNames
9
9
  } from "./index.server-z7nvkz8v.js";
@@ -291,4 +291,4 @@ function Color_field($$renderer, $$props) {
291
291
  var color_field_default = Color_field;
292
292
  export { Color_field, color_field_default };
293
293
 
294
- //# debugId=492F4F53A13D2F7A64756E2164756E21
294
+ //# debugId=4D38464B115D3DC664756E2164756E21
@@ -23,6 +23,7 @@ function Faceted_filter_bar($$renderer, $$props) {
23
23
  let {
24
24
  "aria-label": ariaLabel = "Filters",
25
25
  searchQuery,
26
+ showSearch = true,
26
27
  searchPlaceholder = "Search…",
27
28
  searchAriaLabel = "Search",
28
29
  facets = [],
@@ -51,7 +52,7 @@ function Faceted_filter_bar($$renderer, $$props) {
51
52
  return value;
52
53
  return facet.options.find((option) => option.value === value)?.label ?? value;
53
54
  }
54
- const hasAppliedFilters = $.derived(() => appliedFilters.length > 0 || currentSearchQuery().length > 0);
55
+ const hasAppliedFilters = $.derived(() => appliedFilters.length > 0 || showSearch && currentSearchQuery().length > 0);
55
56
  const totalActiveCount = $.derived(() => appliedFilters.length);
56
57
  const summaryMessage = $.derived(() => {
57
58
  if (totalActiveCount() === 0)
@@ -92,16 +93,21 @@ function Faceted_filter_bar($$renderer, $$props) {
92
93
  "aria-label": ariaLabel,
93
94
  "data-disabled": disabled ? "" : undefined
94
95
  })}><div class="cinder-faceted-filter-bar__controls">`);
95
- Search_field($$renderer2, {
96
- id: searchId(),
97
- class: "cinder-faceted-filter-bar__search",
98
- value: currentSearchQuery(),
99
- placeholder: searchPlaceholder,
100
- "aria-label": searchAriaLabel,
101
- disabled,
102
- oninput: handleSearchInput
103
- });
104
- $$renderer2.push(`<!----> <!--[-->`);
96
+ if (showSearch) {
97
+ $$renderer2.push("<!--[0-->");
98
+ Search_field($$renderer2, {
99
+ id: searchId(),
100
+ class: "cinder-faceted-filter-bar__search",
101
+ value: currentSearchQuery(),
102
+ placeholder: searchPlaceholder,
103
+ "aria-label": searchAriaLabel,
104
+ disabled,
105
+ oninput: handleSearchInput
106
+ });
107
+ } else {
108
+ $$renderer2.push("<!--[-1-->");
109
+ }
110
+ $$renderer2.push(`<!--]--> <!--[-->`);
105
111
  const each_array = $.ensure_array_like(facets);
106
112
  for (let $$index_1 = 0, $$length = each_array.length;$$index_1 < $$length; $$index_1++) {
107
113
  let facet = each_array[$$index_1];
@@ -192,4 +198,4 @@ function Faceted_filter_bar($$renderer, $$props) {
192
198
  var faceted_filter_bar_default = Faceted_filter_bar;
193
199
  export { Faceted_filter_bar, faceted_filter_bar_default };
194
200
 
195
- //# debugId=896B97E3E46F61EB64756E2164756E21
201
+ //# debugId=E343E69E0C14B4CA64756E2164756E21
@@ -61,6 +61,65 @@ function Run_step_branch_disclosure($$renderer, $$props) {
61
61
  }
62
62
 
63
63
  // src/components/run-step-timeline/run-step-timeline.utilities.ts
64
+ function relocateCompensationSteps(steps) {
65
+ return relocateSiblingItems(steps, (step) => step);
66
+ }
67
+ function relocateSiblingItems(items, getStep) {
68
+ if (!items.some((item) => getStep(item)?.compensates !== undefined))
69
+ return items;
70
+ const stepById = new Map;
71
+ for (const item of items) {
72
+ const step = getStep(item);
73
+ if (step !== undefined) {
74
+ stepById.set(step.id, step);
75
+ }
76
+ }
77
+ const canRelocate = (step) => {
78
+ const visited = new Set([step.id]);
79
+ let targetId = step.compensates;
80
+ while (targetId !== undefined) {
81
+ const target = stepById.get(targetId);
82
+ if (target === undefined || visited.has(targetId))
83
+ return false;
84
+ visited.add(targetId);
85
+ targetId = target.compensates;
86
+ }
87
+ return true;
88
+ };
89
+ const relocatable = new Set;
90
+ const compensationsByTarget = new Map;
91
+ for (const item of items) {
92
+ const step = getStep(item);
93
+ if (step === undefined || step.compensates === undefined || !canRelocate(step))
94
+ continue;
95
+ relocatable.add(step);
96
+ const compensations = compensationsByTarget.get(step.compensates) ?? [];
97
+ compensations.push(item);
98
+ compensationsByTarget.set(step.compensates, compensations);
99
+ }
100
+ const result = [];
101
+ const appendWithCompensations = (item) => {
102
+ result.push(item);
103
+ const step = getStep(item);
104
+ if (step === undefined)
105
+ return;
106
+ for (const compensation of compensationsByTarget.get(step.id) ?? []) {
107
+ appendWithCompensations(compensation);
108
+ }
109
+ };
110
+ for (const item of items) {
111
+ const step = getStep(item);
112
+ if (step === undefined || !relocatable.has(step))
113
+ appendWithCompensations(item);
114
+ }
115
+ return result;
116
+ }
117
+ function relocateCompensationEntries(entries) {
118
+ return relocateSiblingItems(entries, (entry) => isBranchGroup(entry) ? undefined : entry);
119
+ }
120
+ function isBranchGroup(entry) {
121
+ return "kind" in entry && entry.kind === "branch";
122
+ }
64
123
  function statusDotStatus(status) {
65
124
  switch (status) {
66
125
  case "succeeded":
@@ -280,8 +339,8 @@ function Run_step_timeline($$renderer, $$props) {
280
339
  ...rest
281
340
  } = $$props;
282
341
  const resolvedAriaLabel = $2.derived(() => ariaLabelledby === undefined && ariaLabel === undefined ? label : ariaLabel);
283
- const renderedEntries = $2.derived(() => flattenEntries(steps));
284
- function isBranchGroup(entry) {
342
+ const renderedEntries = $2.derived(() => flattenEntries(relocateCompensationEntries(steps)));
343
+ function isBranchGroup2(entry) {
285
344
  return "kind" in entry && entry.kind === "branch";
286
345
  }
287
346
  function flattenEntries(entries) {
@@ -294,7 +353,7 @@ function Run_step_timeline($$renderer, $$props) {
294
353
  stepRun = [];
295
354
  };
296
355
  for (const entry of entries) {
297
- if (isBranchGroup(entry)) {
356
+ if (isBranchGroup2(entry)) {
298
357
  flushRun();
299
358
  result.push({
300
359
  kind: "branch",
@@ -356,7 +415,7 @@ function Run_step_timeline($$renderer, $$props) {
356
415
  }
357
416
  function flattenSteps(list, pathPrefix) {
358
417
  const rows = [];
359
- appendRunStepRows(rows, list, 0, pathPrefix);
418
+ appendRunStepRows(rows, relocateCompensationSteps(list), 0, pathPrefix);
360
419
  const currentRowIndex = deepestCurrentStepIndex(rows);
361
420
  const labelByPathKey = new Map;
362
421
  for (const row of rows) {
@@ -394,7 +453,7 @@ function Run_step_timeline($$renderer, $$props) {
394
453
  rows.push({ kind: "step", step, depth, pathKey });
395
454
  if (step.children && step.children.length > 0) {
396
455
  if (depth < MAX_NESTED_STEP_DEPTH) {
397
- appendRunStepRows(rows, step.children, depth + 1, pathKey);
456
+ appendRunStepRows(rows, relocateCompensationSteps(step.children), depth + 1, pathKey);
398
457
  } else {
399
458
  const hiddenSummary = summarizeNestedRunSteps(step.children);
400
459
  rows.push({
@@ -731,4 +790,4 @@ function Run_step_timeline($$renderer, $$props) {
731
790
  var run_step_timeline_default = Run_step_timeline;
732
791
  export { Run_step_timeline, run_step_timeline_default };
733
792
 
734
- //# debugId=C9EF855146F109ED64756E2164756E21
793
+ //# debugId=30B377135A5A317664756E2164756E21
@@ -1,3 +1,6 @@
1
+ import {
2
+ Input
3
+ } from "./index.server-8xvc73zh.js";
1
4
  import {
2
5
  Modal
3
6
  } from "./index.server-t3hknp1c.js";
@@ -13,6 +16,7 @@ import * as $ from "svelte/internal/server";
13
16
  function Confirm_dialog($$renderer, $$props) {
14
17
  $$renderer.component(($$renderer2) => {
15
18
  const descriptionId = $.props_id($$renderer2);
19
+ const typedConfirmationId = `${descriptionId}-typed-confirmation`;
16
20
  let {
17
21
  open = false,
18
22
  title,
@@ -20,12 +24,19 @@ function Confirm_dialog($$renderer, $$props) {
20
24
  cancelLabel = "Cancel",
21
25
  confirmLabel,
22
26
  destructive = false,
27
+ typeToConfirm,
28
+ typeToConfirmLabel,
23
29
  onconfirm,
24
30
  oncancel,
25
31
  triggerRef = null,
26
32
  class: className
27
33
  } = $$props;
28
34
  const describedById = $.derived(() => description ? descriptionId : undefined);
35
+ const normalizedTypeToConfirm = $.derived(() => typeToConfirm?.trim() || undefined);
36
+ const normalizedTypeToConfirmLabel = $.derived(() => typeToConfirmLabel?.trim() || undefined);
37
+ let typedConfirmation = "";
38
+ let previousOpen = open;
39
+ const typedConfirmationMatches = $.derived(() => normalizedTypeToConfirm() === undefined || typedConfirmation.trim().toLowerCase() === normalizedTypeToConfirm().toLowerCase());
29
40
  function handleCancel() {
30
41
  open = false;
31
42
  oncancel?.();
@@ -51,6 +62,7 @@ function Confirm_dialog($$renderer, $$props) {
51
62
  $$renderer4.push(`<!----> `);
52
63
  Button($$renderer4, {
53
64
  variant: destructive ? "danger" : "primary",
65
+ disabled: !typedConfirmationMatches(),
54
66
  onclick: handleConfirm,
55
67
  children: ($$renderer5) => {
56
68
  $$renderer5.push(`<!---->${$.escape(confirmLabel)}`);
@@ -83,6 +95,25 @@ function Confirm_dialog($$renderer, $$props) {
83
95
  } else {
84
96
  $$renderer4.push("<!--[-1-->");
85
97
  }
98
+ $$renderer4.push(`<!--]--> `);
99
+ if (normalizedTypeToConfirm() !== undefined) {
100
+ $$renderer4.push("<!--[0-->");
101
+ Input($$renderer4, {
102
+ id: typedConfirmationId,
103
+ class: "cinder-confirm-dialog__typed-confirmation",
104
+ label: normalizedTypeToConfirmLabel() ?? `Type "${normalizedTypeToConfirm()}" to confirm`,
105
+ autocomplete: "off",
106
+ get value() {
107
+ return typedConfirmation;
108
+ },
109
+ set value($$value) {
110
+ typedConfirmation = $$value;
111
+ $$settled = false;
112
+ }
113
+ });
114
+ } else {
115
+ $$renderer4.push("<!--[-1-->");
116
+ }
86
117
  $$renderer4.push(`<!--]-->`);
87
118
  },
88
119
  $$slots: { footer: true, default: true }
@@ -104,4 +135,4 @@ function Confirm_dialog($$renderer, $$props) {
104
135
  var confirm_dialog_default = Confirm_dialog;
105
136
  export { Confirm_dialog, confirm_dialog_default };
106
137
 
107
- //# debugId=FA54B1DD55876D8464756E2164756E21
138
+ //# debugId=F4D3FC361521845464756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lostgradient/cinder",
3
- "version": "0.11.0",
3
+ "version": "0.12.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",
@@ -6508,13 +6508,33 @@
6508
6508
  "dependencies": {
6509
6509
  "@floating-ui/dom": "1.7.6",
6510
6510
  "@modelcontextprotocol/sdk": "^1.29.0",
6511
+ "@shikijs/engine-oniguruma": "^3.21.0",
6512
+ "@shikijs/langs": "^3.21.0",
6513
+ "@shikijs/types": "^3.21.0",
6511
6514
  "@tanstack/virtual-core": "^3.17.1",
6515
+ "@types/hast": "^3.0.4",
6516
+ "@types/mdast": "^4.0.4",
6517
+ "@types/unist": "^3.0.0",
6512
6518
  "ajv": "^8",
6519
+ "comlink": "^4.4.2",
6513
6520
  "conversationalist": "^0.2.1",
6514
6521
  "diff-match-patch": "^1.0.5",
6515
6522
  "esm-env": "^1.2.0",
6523
+ "hast-util-sanitize": "^5.0.0",
6524
+ "js-yaml": "^4.1.0",
6516
6525
  "libphonenumber-js": "^1.13.3",
6517
- "qrcode": "^1.5.4"
6526
+ "qrcode": "^1.5.4",
6527
+ "rehype-katex": "^7.0.1",
6528
+ "rehype-sanitize": "^6.0.0",
6529
+ "rehype-stringify": "^10.0.1",
6530
+ "remark-gfm": "^4.0.1",
6531
+ "remark-math": "^6.0.0",
6532
+ "remark-parse": "^11.0.0",
6533
+ "remark-rehype": "^11.1.2",
6534
+ "remark-stringify": "^11.0.0",
6535
+ "shiki": "^3.21.0",
6536
+ "unified": "^11.0.5",
6537
+ "unist-util-visit": "^5.0.0"
6518
6538
  },
6519
6539
  "devDependencies": {
6520
6540
  "@changesets/parse": "0.4.3",
@@ -6527,7 +6547,6 @@
6527
6547
  "chalk": "^5.6.2",
6528
6548
  "change-case": "^5.4.4",
6529
6549
  "happy-dom": "^15.11.7",
6530
- "js-yaml": "^4.1.0",
6531
6550
  "lucide-svelte": "^0.503.0",
6532
6551
  "oxlint": "^1.56.0",
6533
6552
  "oxlint-tsgolint": "^0.17.0",
@@ -6548,35 +6567,12 @@
6548
6567
  "@milkdown/ctx": "^7.17.3",
6549
6568
  "@milkdown/kit": "^7.17.3",
6550
6569
  "@milkdown/prose": "^7.17.3",
6551
- "@shikijs/engine-oniguruma": "^3.21.0",
6552
- "@shikijs/langs": "^3.21.0",
6553
- "@shikijs/rehype": "^3.21.0",
6554
- "@shikijs/types": "^3.21.0",
6555
- "@types/hast": "^3.0.4",
6556
- "@types/mdast": "^4.0.4",
6557
- "@types/unist": "^3.0.0",
6558
- "comlink": "^4.4.2",
6559
- "hast-util-sanitize": "^5.0.0",
6560
- "js-yaml": "^4.1.0",
6561
6570
  "lucide-svelte": ">=0.400.0 <1",
6562
6571
  "prosemirror-inputrules": "^1.5.1",
6563
6572
  "prosemirror-model": "^1.25.4",
6564
6573
  "prosemirror-state": "^1.4.4",
6565
6574
  "prosemirror-view": "^1.41.3",
6566
- "rehype-katex": "^7.0.1",
6567
- "rehype-sanitize": "^6.0.0",
6568
- "rehype-stringify": "^10.0.1",
6569
- "remark-gfm": "^4.0.1",
6570
- "remark-html": "^16.0.1",
6571
- "remark-math": "^6.0.0",
6572
- "remark-parse": "^11.0.0",
6573
- "remark-rehype": "^11.1.2",
6574
- "remark-stringify": "^11.0.0",
6575
- "shiki": "^3.21.0",
6576
6575
  "svelte": ">=5.56.0 <6",
6577
- "unified": "^11.0.5",
6578
- "unist-util-remove": "^4.0.0",
6579
- "unist-util-visit": "^5.0.0",
6580
6576
  "zod": "4.4.1"
6581
6577
  },
6582
6578
  "peerDependenciesMeta": {
@@ -6589,36 +6585,6 @@
6589
6585
  "@milkdown/prose": {
6590
6586
  "optional": true
6591
6587
  },
6592
- "@shikijs/engine-oniguruma": {
6593
- "optional": true
6594
- },
6595
- "@shikijs/langs": {
6596
- "optional": true
6597
- },
6598
- "@shikijs/rehype": {
6599
- "optional": true
6600
- },
6601
- "@shikijs/types": {
6602
- "optional": true
6603
- },
6604
- "@types/hast": {
6605
- "optional": true
6606
- },
6607
- "@types/mdast": {
6608
- "optional": true
6609
- },
6610
- "@types/unist": {
6611
- "optional": true
6612
- },
6613
- "comlink": {
6614
- "optional": true
6615
- },
6616
- "hast-util-sanitize": {
6617
- "optional": true
6618
- },
6619
- "js-yaml": {
6620
- "optional": true
6621
- },
6622
6588
  "prosemirror-inputrules": {
6623
6589
  "optional": true
6624
6590
  },
@@ -6630,45 +6596,6 @@
6630
6596
  },
6631
6597
  "prosemirror-view": {
6632
6598
  "optional": true
6633
- },
6634
- "rehype-katex": {
6635
- "optional": true
6636
- },
6637
- "rehype-sanitize": {
6638
- "optional": true
6639
- },
6640
- "rehype-stringify": {
6641
- "optional": true
6642
- },
6643
- "remark-gfm": {
6644
- "optional": true
6645
- },
6646
- "remark-html": {
6647
- "optional": true
6648
- },
6649
- "remark-math": {
6650
- "optional": true
6651
- },
6652
- "remark-parse": {
6653
- "optional": true
6654
- },
6655
- "remark-rehype": {
6656
- "optional": true
6657
- },
6658
- "remark-stringify": {
6659
- "optional": true
6660
- },
6661
- "shiki": {
6662
- "optional": true
6663
- },
6664
- "unified": {
6665
- "optional": true
6666
- },
6667
- "unist-util-remove": {
6668
- "optional": true
6669
- },
6670
- "unist-util-visit": {
6671
- "optional": true
6672
6599
  }
6673
6600
  },
6674
6601
  "engines": {
@@ -9,12 +9,17 @@
9
9
  * ======================================== */
10
10
 
11
11
  .cinder-code-block {
12
+ --cinder-code-block-background: var(--_cinder-code-block-code-surface);
13
+ --cinder-code-block-font-size: var(--cinder-text-sm);
14
+ --cinder-code-block-height: auto;
15
+ --cinder-code-block-line-height: var(--cinder-leading-relaxed);
16
+ --cinder-code-block-padding: var(--cinder-space-4);
12
17
  --_cinder-code-block-code-surface: light-dark(
13
18
  var(--cinder-surface-raised),
14
19
  var(--cinder-surface-inset)
15
20
  );
16
21
 
17
- background: var(--cinder-surface-inset);
22
+ background: var(--cinder-code-block-background);
18
23
  border: 1px solid var(--cinder-border);
19
24
  border-radius: var(--cinder-radius-md);
20
25
  overflow: hidden;
@@ -44,33 +49,34 @@
44
49
  * inner pre elements can stay metrically identical. */
45
50
  .cinder-code-block__viewport {
46
51
  display: block;
47
- overflow-x: auto;
48
- background: var(--_cinder-code-block-code-surface);
52
+ block-size: var(--cinder-code-block-height);
53
+ overflow: auto;
54
+ background: var(--cinder-code-block-background);
49
55
  }
50
56
 
51
57
  .cinder-code-block__pre,
52
58
  .cinder-code-block :where(pre.shiki) {
53
59
  margin: 0;
54
- padding: var(--cinder-space-4);
60
+ padding: var(--cinder-code-block-padding);
55
61
  width: max-content;
56
62
  min-width: 100%;
57
63
  overflow-x: clip;
58
64
  font-family: var(--cinder-font-mono);
59
- font-size: var(--cinder-text-sm);
60
- line-height: var(--cinder-leading-relaxed);
65
+ font-size: var(--cinder-code-block-font-size);
66
+ line-height: var(--cinder-code-block-line-height);
61
67
  color: var(--cinder-text);
62
68
  /* Use near-white in light mode so github-light token colors (e.g. #d73a49
63
69
  * keyword red) clear 4.5:1 WCAG AA. In dark mode keep the deep inset so
64
70
  * github-dark tokens maintain contrast on a very dark surface. */
65
- background: var(--_cinder-code-block-code-surface);
71
+ background: var(--cinder-code-block-background);
66
72
  }
67
73
 
68
74
  /* Shiki writes inline background styles on its generated <pre>; keep the
69
75
  * highlighted state visually and metrically identical to the plain fallback. */
70
76
  .cinder-code-block :where(pre.shiki) {
71
77
  margin: 0 !important;
72
- padding: var(--cinder-space-4) !important;
73
- background: var(--_cinder-code-block-code-surface) !important;
78
+ padding: var(--cinder-code-block-padding) !important;
79
+ background: var(--cinder-code-block-background) !important;
74
80
  }
75
81
 
76
82
  .cinder-code-block__code,
@@ -1 +1,7 @@
1
- []
1
+ [
2
+ "--cinder-code-block-background",
3
+ "--cinder-code-block-font-size",
4
+ "--cinder-code-block-height",
5
+ "--cinder-code-block-line-height",
6
+ "--cinder-code-block-padding"
7
+ ]
@@ -1,3 +1,9 @@
1
- const variables: readonly string[] = [];
1
+ const variables: readonly string[] = [
2
+ '--cinder-code-block-background',
3
+ '--cinder-code-block-font-size',
4
+ '--cinder-code-block-height',
5
+ '--cinder-code-block-line-height',
6
+ '--cinder-code-block-padding',
7
+ ];
2
8
 
3
9
  export default variables;
@@ -1,4 +1,6 @@
1
1
  @layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
2
+ @import '../input/input.css';
3
+
2
4
  @layer cinder.components {
3
5
  .cinder-confirm-dialog__description {
4
6
  margin: 0;
@@ -26,6 +26,14 @@
26
26
  "type": "boolean",
27
27
  "description": "When true, the confirm button uses variant=\"danger\". The cancel button still\nreceives default focus regardless — color is never the sole destructive signal."
28
28
  },
29
+ "typeToConfirm": {
30
+ "type": "string",
31
+ "description": "When set, renders a labelled text input and disables the confirm button until the\ntrimmed input matches this value case-insensitively."
32
+ },
33
+ "typeToConfirmLabel": {
34
+ "type": "string",
35
+ "description": "Visible label for the typed-confirmation input. Defaults to `Type \"<value>\" to confirm`."
36
+ },
29
37
  "class": {
30
38
  "type": "string",
31
39
  "description": "Optional extra class on the underlying <Modal>. Destructured as `class: className` per repo convention."