@kubex/zinc 1.1.92 → 1.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +2880 -453
- package/dist/vscode.html-custom-data.json +209 -22
- package/dist/web-types.json +452 -39
- package/dist/zn.d.ts +633 -61
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +865 -560
- package/docs/pages/components/page-builder.md +143 -19
- package/docs/pages/components/schedule-builder.md +345 -0
- package/docs/pages/components/slash-menu.md +132 -6
- package/docs/pages/components/textarea.md +16 -0
- package/package.json +1 -1
- package/scss/_root.scss +7 -1
- package/src/components/alert/alert.scss +9 -13
- package/src/components/button/button.scss +5 -2
- package/src/components/chip/chip.scss +1 -1
- package/src/components/icon-picker/icon-picker.component.ts +1 -1
- package/src/components/inline-edit/inline-edit.component.ts +6 -1
- package/src/components/input/input.component.ts +12 -2
- package/src/components/linked-select/linked-select.component.ts +22 -5
- package/src/components/page/page.scss +20 -9
- package/src/components/page-builder/modules/page-section-card/page-section-card.component.ts +16 -9
- package/src/components/page-builder/modules/page-section-card/page-section-card.scss +13 -0
- package/src/components/page-builder/modules/page-section-card/page-section-card.test.ts +9 -0
- package/src/components/page-builder/page-builder.component.ts +535 -232
- package/src/components/page-builder/page-builder.scss +230 -19
- package/src/components/page-builder/page-builder.test.ts +790 -110
- package/src/components/page-builder/page-tree.test.ts +483 -0
- package/src/components/page-builder/page-tree.ts +329 -0
- package/src/components/page-builder/page.types.ts +98 -10
- package/src/components/page-nav/page-nav.scss +9 -1
- package/src/components/panel/panel.component.ts +5 -1
- package/src/components/priority-list/priority-list.component.ts +1 -0
- package/src/components/priority-list/priority-list.scss +2 -1
- package/src/components/remarkd-editor/remarkd-editor.component.ts +198 -9
- package/src/components/remarkd-editor/remarkd-editor.scss +81 -0
- package/src/components/remarkd-editor/remarkd-editor.test.ts +179 -0
- package/src/components/schedule-builder/index.ts +12 -0
- package/src/components/schedule-builder/schedule-builder.component.ts +1543 -0
- package/src/components/schedule-builder/schedule-builder.scss +448 -0
- package/src/components/schedule-builder/schedule-builder.test.ts +344 -0
- package/src/components/settings-container/settings-container.scss +2 -1
- package/src/components/slash-item/slash-item.component.ts +1 -1
- package/src/components/slash-menu/slash-menu-items.ts +48 -0
- package/src/components/slash-menu/slash-menu.component.ts +134 -27
- package/src/components/slash-menu/slash-menu.scss +90 -12
- package/src/components/slash-menu/slash-menu.test.ts +107 -0
- package/src/components/textarea/textarea.component.ts +12 -2
- package/src/components/textarea/textarea.test.ts +2 -2
- package/src/components/toggle/toggle.component.ts +2 -1
- package/src/components/translations/translations.component.ts +5 -1
- package/src/zinc.ts +1 -0
- package/docs/superpowers/plans/2026-08-03-theme-editor.md +0 -1536
- package/docs/superpowers/specs/2026-08-03-theme-editor-design.md +0 -327
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
--inspector-col: 0px;
|
|
51
51
|
|
|
52
52
|
.inspector {
|
|
53
|
-
padding: 0;
|
|
54
53
|
border-left: none;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
@@ -63,8 +62,10 @@
|
|
|
63
62
|
--palette-col: 240px;
|
|
64
63
|
}
|
|
65
64
|
|
|
65
|
+
// 300, not 280: below that the inspector's toggle rows wrap their switch
|
|
66
|
+
// under the label and the field rhythm breaks down.
|
|
66
67
|
.builder:not(.builder--inspector-collapsed) {
|
|
67
|
-
--inspector-col:
|
|
68
|
+
--inspector-col: 300px;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
@@ -249,21 +250,212 @@ zn-page-palette-item {
|
|
|
249
250
|
rgb(var(--zn-body));
|
|
250
251
|
}
|
|
251
252
|
|
|
253
|
+
// Right column — anatomy shared with flow-builder's inspector (icon tile +
|
|
254
|
+
// title/type head over a scrolling body), so the two builders read alike.
|
|
252
255
|
.inspector {
|
|
253
256
|
display: flex;
|
|
254
257
|
flex-direction: column;
|
|
255
|
-
gap: 12px;
|
|
256
|
-
padding: 14px;
|
|
257
258
|
border-left: 1px solid rgb(var(--zn-border-color));
|
|
258
|
-
overflow
|
|
259
|
+
overflow: hidden; // the body scrolls, not the panel — the head stays put
|
|
260
|
+
animation: inspector-in 0.18s ease;
|
|
261
|
+
|
|
262
|
+
&-head {
|
|
263
|
+
display: flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
gap: 12px;
|
|
266
|
+
flex: 0 0 auto;
|
|
267
|
+
padding: 16px;
|
|
268
|
+
border-bottom: 1px solid rgb(var(--zn-border-color));
|
|
269
|
+
|
|
270
|
+
&__icon {
|
|
271
|
+
--section-accent: rgb(var(--zn-color-primary));
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
justify-content: center;
|
|
275
|
+
flex: 0 0 auto;
|
|
276
|
+
width: 34px;
|
|
277
|
+
height: 34px;
|
|
278
|
+
border-radius: 8px;
|
|
279
|
+
color: var(--section-accent);
|
|
280
|
+
background: color-mix(in srgb, var(--section-accent) 15%, transparent);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Long section names truncate rather than pushing the close button out.
|
|
284
|
+
&__text {
|
|
285
|
+
flex: 1 1 auto;
|
|
286
|
+
min-width: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
&__title {
|
|
290
|
+
font-size: 0.875rem;
|
|
291
|
+
font-weight: 600;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&__type {
|
|
295
|
+
font-size: 0.75rem;
|
|
296
|
+
color: rgb(var(--zn-color-muted-text));
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&__title,
|
|
300
|
+
&__type {
|
|
301
|
+
overflow: hidden;
|
|
302
|
+
text-overflow: ellipsis;
|
|
303
|
+
white-space: nowrap;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Field typography and rhythm for the stamped config form. Host themes size
|
|
308
|
+
// form labels for full-width forms, which reads oversized in a ~343px panel —
|
|
309
|
+
// the --zn-input-* tokens inherit into every zinc control's shadow root, so
|
|
310
|
+
// retuning them here needs no per-control ::part() list.
|
|
311
|
+
&-body {
|
|
312
|
+
--pb-field-label-size: 0.8125rem;
|
|
313
|
+
--pb-field-note-size: 0.75rem;
|
|
314
|
+
--pb-field-gap: 22px;
|
|
315
|
+
--pb-label-gap: 6px;
|
|
316
|
+
--pb-note-gap: 5px;
|
|
317
|
+
--zn-input-label-font-size-medium: var(--pb-field-label-size);
|
|
318
|
+
--zn-input-label-font-weight: 600;
|
|
319
|
+
--zn-input-label-line-height: 1.3;
|
|
320
|
+
--zn-input-label-color: rgb(var(--zn-text));
|
|
321
|
+
--zn-input-help-text-font-size-medium: var(--pb-field-note-size);
|
|
322
|
+
--zn-input-help-text-color: rgb(var(--zn-color-muted-text));
|
|
323
|
+
--zn-toggle-margin: 0;
|
|
324
|
+
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
flex: 1;
|
|
328
|
+
min-height: 0;
|
|
329
|
+
overflow-y: auto;
|
|
330
|
+
// Extra bottom padding so the last field isn't flush against the scroll end.
|
|
331
|
+
padding: 18px 16px 24px;
|
|
332
|
+
gap: var(--pb-field-gap);
|
|
333
|
+
|
|
334
|
+
// A field's own internal spacing comes from --zn-spacing-* tokens, which
|
|
335
|
+
// zinc leaves to the host theme — undefined here, so those declarations
|
|
336
|
+
// drop out and every field collapses onto the flex gap alone. Set the
|
|
337
|
+
// rhythm explicitly instead: tight inside a field, wide between them, so
|
|
338
|
+
// a label reads as belonging to the control below it rather than floating
|
|
339
|
+
// between two.
|
|
340
|
+
::part(form-control-label) {
|
|
341
|
+
margin-bottom: var(--pb-label-gap);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
::part(form-control-input) {
|
|
345
|
+
margin: 0;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
::part(form-control-help-text) {
|
|
349
|
+
margin-top: var(--pb-note-gap);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// zn-toggle sizes its own label and description from a fixed type scale
|
|
353
|
+
// rather than the --zn-input-label-* tokens, so bring it into line through
|
|
354
|
+
// its parts — otherwise a toggle row outweighs every field around it.
|
|
355
|
+
zn-toggle::part(label) {
|
|
356
|
+
font-size: var(--pb-field-label-size);
|
|
357
|
+
font-weight: 600;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
zn-toggle::part(description) {
|
|
361
|
+
font-size: var(--pb-field-note-size);
|
|
362
|
+
margin-top: var(--pb-note-gap);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// The icon picker's trigger is a content-width button, which reads as a
|
|
366
|
+
// stranded chip in a column of full-width fields. Fill the row (the clear
|
|
367
|
+
// button, when there is a value, still takes its space beside it).
|
|
368
|
+
zn-icon-picker::part(trigger) {
|
|
369
|
+
flex: 1 1 auto;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
> *,
|
|
373
|
+
.inspector__form > * {
|
|
374
|
+
margin-block: 0;
|
|
375
|
+
}
|
|
259
376
|
|
|
377
|
+
// The stamped wrapper is a layout box, not a field — it carries the same
|
|
378
|
+
// rhythm as the body so the host's controls space identically.
|
|
379
|
+
> .inspector__form {
|
|
380
|
+
display: flex;
|
|
381
|
+
flex-direction: column;
|
|
382
|
+
gap: var(--pb-field-gap);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Its children are whole fields, so they take the field gap — not the
|
|
386
|
+
// label gap, which is the space between a label and its own control.
|
|
387
|
+
.layout-group {
|
|
388
|
+
display: flex;
|
|
389
|
+
flex-direction: column;
|
|
390
|
+
gap: var(--pb-field-gap);
|
|
391
|
+
padding-bottom: var(--pb-field-gap);
|
|
392
|
+
border-bottom: 1px solid rgb(var(--zn-border-color));
|
|
393
|
+
|
|
394
|
+
&__title {
|
|
395
|
+
font-size: var(--pb-field-label-size);
|
|
396
|
+
font-weight: 600;
|
|
397
|
+
color: rgb(var(--zn-color-muted-text));
|
|
398
|
+
text-transform: uppercase;
|
|
399
|
+
letter-spacing: 0.04em;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
&__label {
|
|
403
|
+
display: block;
|
|
404
|
+
margin-bottom: var(--pb-label-gap);
|
|
405
|
+
font-size: var(--pb-field-label-size);
|
|
406
|
+
font-weight: 600;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
&__weights {
|
|
410
|
+
display: flex;
|
|
411
|
+
gap: 6px;
|
|
412
|
+
|
|
413
|
+
zn-input {
|
|
414
|
+
flex: 1 1 0;
|
|
415
|
+
min-width: 0;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
&-hint {
|
|
422
|
+
margin: 0;
|
|
423
|
+
font-size: 0.75rem;
|
|
424
|
+
color: rgb(var(--zn-color-muted-text));
|
|
425
|
+
}
|
|
260
426
|
}
|
|
261
427
|
|
|
262
|
-
.
|
|
263
|
-
.inspector__form {
|
|
428
|
+
.inspector-close {
|
|
264
429
|
display: flex;
|
|
265
|
-
|
|
266
|
-
|
|
430
|
+
align-items: center;
|
|
431
|
+
justify-content: center;
|
|
432
|
+
flex: 0 0 auto;
|
|
433
|
+
width: 28px;
|
|
434
|
+
height: 28px;
|
|
435
|
+
padding: 0;
|
|
436
|
+
border: none;
|
|
437
|
+
border-radius: 6px;
|
|
438
|
+
color: rgb(var(--zn-color-muted-text));
|
|
439
|
+
background: transparent;
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
|
|
442
|
+
&:hover {
|
|
443
|
+
color: rgb(var(--zn-text));
|
|
444
|
+
background: rgb(var(--zn-color-tab));
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// The panel slides in from the right as a section is selected (as flow-builder).
|
|
449
|
+
@keyframes inspector-in {
|
|
450
|
+
from {
|
|
451
|
+
opacity: 0;
|
|
452
|
+
transform: translateX(8px);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
to {
|
|
456
|
+
opacity: 1;
|
|
457
|
+
transform: translateX(0);
|
|
458
|
+
}
|
|
267
459
|
}
|
|
268
460
|
|
|
269
461
|
.declarations {
|
|
@@ -349,27 +541,26 @@ zn-page-palette-item {
|
|
|
349
541
|
gap: 8px;
|
|
350
542
|
}
|
|
351
543
|
|
|
352
|
-
.
|
|
544
|
+
.cells {
|
|
353
545
|
display: grid;
|
|
354
|
-
//
|
|
355
|
-
// child card's text forces the tracks wider than the parent tile.
|
|
356
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
546
|
+
// grid-template-columns is set inline from the instance's widths.
|
|
357
547
|
gap: 8px;
|
|
358
548
|
}
|
|
359
549
|
|
|
360
|
-
.
|
|
550
|
+
.cell {
|
|
361
551
|
position: relative;
|
|
552
|
+
display: flex;
|
|
553
|
+
flex-direction: column;
|
|
362
554
|
min-height: 64px;
|
|
555
|
+
border-radius: 8px;
|
|
556
|
+
transition: border-color 0.12s ease, background 0.12s ease;
|
|
363
557
|
|
|
364
558
|
&--empty {
|
|
365
|
-
display: flex;
|
|
366
559
|
align-items: center;
|
|
367
560
|
justify-content: center;
|
|
368
561
|
border: 1px dashed rgb(var(--zn-border-color));
|
|
369
|
-
border-radius: 8px;
|
|
370
562
|
color: rgba(var(--zn-text), 0.4);
|
|
371
563
|
cursor: pointer;
|
|
372
|
-
transition: border-color 0.12s ease, background 0.12s ease;
|
|
373
564
|
|
|
374
565
|
&:hover {
|
|
375
566
|
border-color: rgb(var(--zn-color-border-active));
|
|
@@ -378,8 +569,28 @@ zn-page-palette-item {
|
|
|
378
569
|
}
|
|
379
570
|
|
|
380
571
|
&--active {
|
|
381
|
-
border
|
|
382
|
-
|
|
572
|
+
border: 1px dashed rgb(var(--zn-color-primary));
|
|
573
|
+
background: rgba(var(--zn-color-primary), 0.06);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// A nested container sits inside a cell; inset it so the nesting reads.
|
|
577
|
+
.container {
|
|
578
|
+
max-width: none;
|
|
579
|
+
padding: 4px;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.cell__card {
|
|
584
|
+
max-width: none;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.cell__strip {
|
|
588
|
+
min-height: 6px;
|
|
589
|
+
border-radius: 3px;
|
|
590
|
+
|
|
591
|
+
&--active {
|
|
592
|
+
min-height: 20px;
|
|
593
|
+
border: 2px dashed rgb(var(--zn-color-primary));
|
|
383
594
|
background: rgba(var(--zn-color-primary), 0.06);
|
|
384
595
|
}
|
|
385
596
|
}
|