@finstack-com-public/design 0.9.0 → 0.10.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 (44) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/dist/css/data-type.css +32 -0
  3. package/dist/css/data-type.md +45 -0
  4. package/dist/css/diagram.css +119 -0
  5. package/dist/css/diagram.md +32 -0
  6. package/dist/css/mark-dot.css +62 -0
  7. package/dist/css/mark-dot.md +54 -0
  8. package/dist/css/node.css +242 -0
  9. package/dist/css/node.md +108 -0
  10. package/dist/css/tokens.css +28 -0
  11. package/dist/css/xyflow.css +101 -0
  12. package/dist/css/xyflow.md +97 -0
  13. package/dist/css-text/data-type.d.ts +2 -0
  14. package/dist/css-text/data-type.js +1 -0
  15. package/dist/css-text/diagram.d.ts +2 -0
  16. package/dist/css-text/diagram.js +1 -0
  17. package/dist/css-text/kit.js +487 -0
  18. package/dist/css-text/mark-dot.d.ts +2 -0
  19. package/dist/css-text/mark-dot.js +1 -0
  20. package/dist/css-text/node.d.ts +2 -0
  21. package/dist/css-text/node.js +1 -0
  22. package/dist/css-text/tokens.js +1 -1
  23. package/dist/css-text/xyflow.d.ts +2 -0
  24. package/dist/css-text/xyflow.js +1 -0
  25. package/dist/dom/listbox.js +8 -3
  26. package/dist/dom/loader.js +4 -3
  27. package/dist/dom/menu.js +9 -4
  28. package/dist/dom/popover.js +9 -4
  29. package/dist/kit.css +487 -0
  30. package/dist/react/data.d.ts +24 -0
  31. package/dist/react/data.js +14 -0
  32. package/dist/react/diagram.d.ts +27 -0
  33. package/dist/react/diagram.js +14 -0
  34. package/dist/react/index.d.ts +1 -0
  35. package/dist/react/index.js +1 -0
  36. package/dist/tokens/color.d.ts +8 -0
  37. package/dist/tokens/color.js +13 -0
  38. package/dist/tokens/contrast-pairs.js +22 -0
  39. package/dist/tokens/index.d.ts +18 -4
  40. package/dist/tokens/index.js +2 -1
  41. package/dist/tokens/scale.d.ts +14 -0
  42. package/dist/tokens/scale.js +17 -0
  43. package/dist/tokens.json +30 -0
  44. package/package.json +7 -6
package/dist/kit.css CHANGED
@@ -123,6 +123,14 @@
123
123
  --fs-editor-lint-refusal: var(--fs-gap-ink);
124
124
  --fs-editor-tooltip-bg: var(--fs-bg-surface);
125
125
  --fs-editor-tooltip-line: var(--fs-line-strong);
126
+ --fs-diagram-bg: var(--fs-bg-plane);
127
+ --fs-diagram-dot: var(--fs-line-strong);
128
+ --fs-diagram-line: var(--fs-ink-muted);
129
+ --fs-diagram-line-inactive: var(--fs-line-strong);
130
+ --fs-diagram-line-emphasis: var(--fs-accent);
131
+ --fs-diagram-end-bg: var(--fs-bg-surface);
132
+ --fs-diagram-end-line: var(--fs-ink-muted);
133
+ --fs-diagram-end-ink: var(--fs-ink-2);
126
134
  --fs-chart-1: var(--fs-p-blue-600);
127
135
  --fs-chart-2: #0891b2;
128
136
  --fs-chart-3: #6646a8;
@@ -290,6 +298,18 @@
290
298
  --fs-gradient-brand-soft: linear-gradient(135deg, var(--fs-brand-wash-end), var(--fs-brand-wash-start));
291
299
  --fs-chart-area-alpha: 0.18;
292
300
  --fs-chart-series-alpha: 0.6;
301
+ --fs-diagram-line-width: 1.5px;
302
+ --fs-diagram-emphasis-width: 2.25px;
303
+ --fs-diagram-inactive-dash: 5 4;
304
+ --fs-diagram-flow-dash: 6 5;
305
+ --fs-diagram-flow-offset: -22;
306
+ --fs-diagram-flow-period: 900ms;
307
+ --fs-diagram-dim-node: 0.38;
308
+ --fs-diagram-dim-edge: 0.25;
309
+ --fs-diagram-end-size: 14px;
310
+ --fs-diagram-end-line-width: 1.2px;
311
+ --fs-diagram-dot-size: 1px;
312
+ --fs-diagram-grid-gap: 20px;
293
313
  --fs-text-body-size: 12px;
294
314
  --fs-text-body-line: 16px;
295
315
  --fs-control-h: 28px;
@@ -821,6 +841,14 @@
821
841
  --fs-editor-lint-refusal: var(--fs-gap-ink);
822
842
  --fs-editor-tooltip-bg: var(--fs-bg-surface);
823
843
  --fs-editor-tooltip-line: var(--fs-line-strong);
844
+ --fs-diagram-bg: var(--fs-bg-plane);
845
+ --fs-diagram-dot: var(--fs-line-strong);
846
+ --fs-diagram-line: var(--fs-ink-muted);
847
+ --fs-diagram-line-inactive: var(--fs-line-strong);
848
+ --fs-diagram-line-emphasis: var(--fs-accent);
849
+ --fs-diagram-end-bg: var(--fs-bg-surface);
850
+ --fs-diagram-end-line: var(--fs-ink-muted);
851
+ --fs-diagram-end-ink: var(--fs-ink-2);
824
852
  --fs-chart-1: var(--fs-p-blue-500);
825
853
  --fs-chart-2: var(--fs-p-cyan-400);
826
854
  --fs-chart-3: #b49df8;
@@ -2257,6 +2285,39 @@
2257
2285
  }
2258
2286
  }
2259
2287
 
2288
+ /* Data-type badge: a column's data type as one icon in a small frame (spec 02 F, T93). Usage: data-type.md. */
2289
+ @layer fs.components {
2290
+ /* A frame for one icon. The product picks the icon; the kit draws the frame. It is a glyph like an icon: the size does not follow density. */
2291
+ .fs-data-type {
2292
+ --fs-data-type-w: 22px;
2293
+ --fs-data-type-h: 16px;
2294
+ display: inline-flex;
2295
+ flex: none;
2296
+ align-items: center;
2297
+ justify-content: center;
2298
+ box-sizing: border-box;
2299
+ width: var(--fs-data-type-w);
2300
+ height: var(--fs-data-type-h);
2301
+ vertical-align: middle;
2302
+ color: var(--fs-ink-2);
2303
+ background: var(--fs-bg-sunken);
2304
+ /* A badge (D37), but a small square-cornered chip, not a pill: the 4 px control corner. */
2305
+ border-radius: var(--fs-radius-sm);
2306
+ }
2307
+ .fs-data-type > .fs-icon {
2308
+ width: 12px;
2309
+ height: 12px;
2310
+ }
2311
+
2312
+ /* The sunken fill is dropped in forced colours, so the frame is drawn as an edge. */
2313
+ @media (forced-colors: active) {
2314
+ .fs-data-type {
2315
+ color: CanvasText;
2316
+ border: var(--fs-line-width) solid CanvasText;
2317
+ }
2318
+ }
2319
+ }
2320
+
2260
2321
  /* Diagnostic marks over text (spec 02 F): BI's formula overlay (D80), Grizzbi's pointed errors.
2261
2322
  Usage: diag.md. */
2262
2323
  @layer fs.components {
@@ -2288,6 +2349,126 @@
2288
2349
  }
2289
2350
  }
2290
2351
 
2352
+ /* Diagram looks: the plane, the line, the cardinality end and the filter arrow (spec 02 J, T94). Usage: diagram.md. The kit styles a diagram and never draws one. */
2353
+ @layer fs.components {
2354
+ /* The plane: the surround with a dot grid. The product places and sizes it; xyflow's own stylesheet moves it. */
2355
+ .fs-diagram {
2356
+ background-color: var(--fs-diagram-bg);
2357
+ background-image: radial-gradient(
2358
+ var(--fs-diagram-dot) var(--fs-diagram-dot-size),
2359
+ transparent calc(var(--fs-diagram-dot-size) + 0.2px)
2360
+ );
2361
+ background-size: var(--fs-diagram-grid-gap) var(--fs-diagram-grid-gap);
2362
+ }
2363
+
2364
+ /* A line, drawn as an SVG path. */
2365
+ .fs-diagram-edge {
2366
+ fill: none;
2367
+ stroke: var(--fs-diagram-line);
2368
+ stroke-width: var(--fs-diagram-line-width);
2369
+ transition: stroke var(--fs-dur);
2370
+ }
2371
+ .fs-diagram-edge--inactive {
2372
+ stroke: var(--fs-diagram-line-inactive);
2373
+ stroke-dasharray: var(--fs-diagram-inactive-dash);
2374
+ }
2375
+ /* Hover, selected, lit: the product sets --emphasis on the parts of a line it lights; a path's own hover does it too. */
2376
+ .fs-diagram-edge--emphasis,
2377
+ .fs-diagram-edge:hover,
2378
+ .fs-diagram-edge--flow {
2379
+ stroke: var(--fs-diagram-line-emphasis);
2380
+ stroke-width: var(--fs-diagram-emphasis-width);
2381
+ }
2382
+ .fs-diagram-edge--dim {
2383
+ opacity: var(--fs-diagram-dim-edge);
2384
+ }
2385
+ /* The way a filter goes: dashes moving along the line. --back runs them the other way. */
2386
+ .fs-diagram-edge--flow {
2387
+ stroke-dasharray: var(--fs-diagram-flow-dash);
2388
+ animation: fs-diagram-flow var(--fs-diagram-flow-period) linear infinite;
2389
+ }
2390
+ .fs-diagram-edge--flow.fs-diagram-edge--back {
2391
+ animation-direction: reverse;
2392
+ }
2393
+ @keyframes fs-diagram-flow {
2394
+ to {
2395
+ stroke-dashoffset: var(--fs-diagram-flow-offset);
2396
+ }
2397
+ }
2398
+ /* Reduced motion: the line is solid and still. */
2399
+ @media (prefers-reduced-motion: reduce) {
2400
+ .fs-diagram-edge--flow {
2401
+ animation: none;
2402
+ stroke-dasharray: none;
2403
+ }
2404
+ }
2405
+
2406
+ /* The "1" / "*" end: an SVG group of a circle and a text. The product places it and sets the circle's r to half --fs-diagram-end-size (core's r is 7). Give the text dy="0.36em": half the cap height at any size, so "1" and "*" sit centred. */
2407
+ .fs-diagram-end > circle {
2408
+ fill: var(--fs-diagram-end-bg);
2409
+ stroke: var(--fs-diagram-end-line);
2410
+ stroke-width: var(--fs-diagram-end-line-width);
2411
+ }
2412
+ .fs-diagram-end > text {
2413
+ fill: var(--fs-diagram-end-ink);
2414
+ font-family: var(--fs-font-sans);
2415
+ font-size: var(--fs-text-xs-size);
2416
+ font-weight: var(--fs-weight-semibold);
2417
+ text-anchor: middle;
2418
+ }
2419
+ .fs-diagram-end--emphasis > circle {
2420
+ stroke: var(--fs-diagram-line-emphasis);
2421
+ }
2422
+ .fs-diagram-end--dim {
2423
+ opacity: var(--fs-diagram-dim-edge);
2424
+ }
2425
+
2426
+ /* The filter-direction triangle: an SVG path. */
2427
+ .fs-diagram-arrow {
2428
+ fill: var(--fs-diagram-line);
2429
+ }
2430
+ .fs-diagram-arrow--inactive {
2431
+ fill: var(--fs-diagram-line-inactive);
2432
+ }
2433
+ .fs-diagram-arrow--emphasis {
2434
+ fill: var(--fs-diagram-line-emphasis);
2435
+ }
2436
+ .fs-diagram-arrow--dim {
2437
+ opacity: var(--fs-diagram-dim-edge);
2438
+ }
2439
+
2440
+ /* Forced colours: system colours; the dash still tells inactive from active. */
2441
+ @media (forced-colors: active) {
2442
+ .fs-diagram {
2443
+ background-image: none;
2444
+ }
2445
+ .fs-diagram-edge {
2446
+ stroke: CanvasText;
2447
+ }
2448
+ .fs-diagram-edge--emphasis,
2449
+ .fs-diagram-edge:hover,
2450
+ .fs-diagram-edge--flow {
2451
+ stroke: Highlight;
2452
+ }
2453
+ .fs-diagram-end > circle {
2454
+ fill: Canvas;
2455
+ stroke: CanvasText;
2456
+ }
2457
+ .fs-diagram-end--emphasis > circle {
2458
+ stroke: Highlight;
2459
+ }
2460
+ .fs-diagram-end > text {
2461
+ fill: CanvasText;
2462
+ }
2463
+ .fs-diagram-arrow {
2464
+ fill: CanvasText;
2465
+ }
2466
+ .fs-diagram-arrow--emphasis {
2467
+ fill: Highlight;
2468
+ }
2469
+ }
2470
+ }
2471
+
2291
2472
  /* Dialog on the native <dialog> (spec 02 D). Usage: dialog.md. Behaviour: createDialog. */
2292
2473
  @layer fs.components {
2293
2474
  .fs-dialog {
@@ -3950,6 +4131,69 @@
3950
4131
  }
3951
4132
  }
3952
4133
 
4134
+ /* Mark dot and mark count: the conversion marks' dot, alone or with a number (spec 02 F, T92). Usage: mark-dot.md. */
4135
+ @layer fs.components {
4136
+ /* A glyph, like an icon: the 7 px does not follow density. */
4137
+ .fs-mark-dot {
4138
+ --fs-mark-dot-size: 7px;
4139
+ display: inline-block;
4140
+ flex: none;
4141
+ box-sizing: border-box;
4142
+ width: var(--fs-mark-dot-size);
4143
+ height: var(--fs-mark-dot-size);
4144
+ vertical-align: middle;
4145
+ background: var(--fs-mark-dot-fill, var(--fs-mark-none-fill));
4146
+ border-radius: 50%;
4147
+ }
4148
+ .fs-mark-dot--exact {
4149
+ --fs-mark-dot-fill: var(--fs-mark-exact-fill);
4150
+ }
4151
+ .fs-mark-dot--approx {
4152
+ --fs-mark-dot-fill: var(--fs-mark-approx-fill);
4153
+ }
4154
+ /* Not converted is hollow: a ring in the gap ink, so colour is not the only sign. */
4155
+ .fs-mark-dot--none {
4156
+ background: transparent;
4157
+ border: 1.5px solid var(--fs-mark-none-ink);
4158
+ }
4159
+
4160
+ /* A dot and a tabular number, in the mark's ink. */
4161
+ .fs-mark-count {
4162
+ display: inline-flex;
4163
+ align-items: center;
4164
+ gap: 3px;
4165
+ font-variant-numeric: tabular-nums;
4166
+ letter-spacing: 0;
4167
+ white-space: nowrap;
4168
+ color: var(--fs-mark-count-ink, var(--fs-ink-2));
4169
+ }
4170
+ .fs-mark-count--exact {
4171
+ --fs-mark-count-ink: var(--fs-mark-exact-ink);
4172
+ }
4173
+ .fs-mark-count--approx {
4174
+ --fs-mark-count-ink: var(--fs-mark-approx-ink);
4175
+ }
4176
+ .fs-mark-count--none {
4177
+ --fs-mark-count-ink: var(--fs-mark-none-ink);
4178
+ }
4179
+
4180
+ /* Forced colours drops the fills: exact stays solid, approximate is half filled, none stays a ring. */
4181
+ @media (forced-colors: active) {
4182
+ .fs-mark-dot {
4183
+ border: 1.5px solid CanvasText;
4184
+ }
4185
+ .fs-mark-dot--exact {
4186
+ background: CanvasText;
4187
+ }
4188
+ .fs-mark-dot--approx {
4189
+ background: linear-gradient(90deg, CanvasText 50%, transparent 50%);
4190
+ }
4191
+ .fs-mark-dot--none {
4192
+ background: transparent;
4193
+ }
4194
+ }
4195
+ }
4196
+
3953
4197
  /* Menu, context menu (spec 02 C) and completion list (spec 02 H). Usage: menu.md.
3954
4198
  Behaviour: createMenu, createListbox. */
3955
4199
  @layer fs.components {
@@ -4136,6 +4380,249 @@
4136
4380
  }
4137
4381
  }
4138
4382
 
4383
+ /* Node frame: a box for a diagram, with a header, rows and a folding section (spec 02 J, T96). Usage: node.md. The kit draws no ports. */
4384
+ @layer fs.components {
4385
+ .fs-node {
4386
+ --fs-node-edge: var(--fs-line-strong);
4387
+ box-sizing: border-box;
4388
+ width: var(--fs-node-width, 248px);
4389
+ font-size: var(--fs-text-xs-size);
4390
+ line-height: var(--fs-text-xs-line);
4391
+ color: var(--fs-ink);
4392
+ background: var(--fs-bg-surface);
4393
+ /* D37: corners 0 and no shadow. */
4394
+ border: var(--fs-line-width) solid var(--fs-node-edge);
4395
+ border-radius: 0;
4396
+ transition: border-color var(--fs-dur);
4397
+ }
4398
+
4399
+ /* The header is the drag handle: it can be a div or a button. */
4400
+ .fs-node__header {
4401
+ position: relative;
4402
+ display: flex;
4403
+ align-items: center;
4404
+ gap: var(--fs-space-2);
4405
+ box-sizing: border-box;
4406
+ width: 100%;
4407
+ margin: 0;
4408
+ padding: 8px 10px;
4409
+ border: 0;
4410
+ border-bottom: var(--fs-line-width) solid var(--fs-line);
4411
+ border-radius: 0;
4412
+ background: var(--fs-bg-chrome);
4413
+ color: inherit;
4414
+ font: inherit;
4415
+ text-align: left;
4416
+ cursor: grab;
4417
+ }
4418
+ .fs-node__icon {
4419
+ flex: none;
4420
+ color: var(--fs-ink-2);
4421
+ }
4422
+ .fs-node__name {
4423
+ flex: 1 1 auto;
4424
+ min-width: 0;
4425
+ overflow: hidden;
4426
+ font-weight: var(--fs-weight-semibold);
4427
+ text-overflow: ellipsis;
4428
+ white-space: nowrap;
4429
+ }
4430
+ .fs-node__meta {
4431
+ flex: none;
4432
+ color: var(--fs-ink-muted);
4433
+ white-space: nowrap;
4434
+ font-variant-numeric: tabular-nums;
4435
+ }
4436
+
4437
+ /* Any children: rows, a section, a "more" line, or the product's own. */
4438
+ .fs-node__body {
4439
+ display: grid;
4440
+ padding: 3px 0;
4441
+ }
4442
+ .fs-node__body:empty {
4443
+ display: none;
4444
+ }
4445
+
4446
+ .fs-node__row {
4447
+ position: relative;
4448
+ display: flex;
4449
+ align-items: center;
4450
+ gap: 7px;
4451
+ box-sizing: border-box;
4452
+ width: 100%;
4453
+ min-height: 24px;
4454
+ margin: 0;
4455
+ padding: 2px 10px;
4456
+ border: 0;
4457
+ border-radius: 0;
4458
+ background: none;
4459
+ color: inherit;
4460
+ font: inherit;
4461
+ text-align: left;
4462
+ }
4463
+ .fs-node__row-name {
4464
+ flex: 1 1 auto;
4465
+ min-width: 0;
4466
+ overflow: hidden;
4467
+ text-overflow: ellipsis;
4468
+ white-space: nowrap;
4469
+ }
4470
+ .fs-node__tag {
4471
+ display: inline-flex;
4472
+ flex: none;
4473
+ align-items: center;
4474
+ color: var(--fs-ink-muted);
4475
+ }
4476
+ /* The word of a gap row ("Not converted"): the word is the cue, the hatch is its backdrop. */
4477
+ .fs-node__gap {
4478
+ flex: none;
4479
+ font-weight: var(--fs-weight-semibold);
4480
+ color: var(--fs-gap-ink);
4481
+ white-space: nowrap;
4482
+ }
4483
+ .fs-node__more {
4484
+ padding: 2px 10px 6px 39px;
4485
+ font-size: var(--fs-text-xs-size);
4486
+ color: var(--fs-ink-muted);
4487
+ }
4488
+
4489
+ /* A row the product makes interactive: a button, or anything with a tabindex. */
4490
+ .fs-node__row:is(button, [tabindex]) {
4491
+ cursor: pointer;
4492
+ }
4493
+ .fs-node__header:focus-visible,
4494
+ .fs-node__row:focus-visible,
4495
+ .fs-node__section-head:focus-visible {
4496
+ outline: var(--fs-ring-width) solid var(--fs-ring);
4497
+ outline-offset: calc(-1 * var(--fs-ring-width));
4498
+ }
4499
+ @media (hover: hover) {
4500
+ .fs-node__row:hover {
4501
+ background-color: var(--fs-bg-hover);
4502
+ }
4503
+ }
4504
+ .fs-node__row.fs-is-selected {
4505
+ background-color: var(--fs-bg-selected);
4506
+ }
4507
+ /* Lit: an accent wash and a 3 px accent left edge. */
4508
+ .fs-node__row.fs-is-lit {
4509
+ background-color: var(--fs-accent-wash);
4510
+ box-shadow: inset 3px 0 0 var(--fs-accent);
4511
+ }
4512
+ .fs-node__row.fs-is-hidden .fs-node__row-name {
4513
+ color: var(--fs-ink-muted);
4514
+ }
4515
+ .fs-node__row.fs-is-key .fs-node__row-name {
4516
+ font-weight: var(--fs-weight-semibold);
4517
+ }
4518
+ .fs-node__row.fs-is-gap {
4519
+ background-image: var(--fs-gap-hatch-sm);
4520
+ }
4521
+
4522
+ /* The folding section, on .fs-disclosure (the chevron, the open state and the ring are its). */
4523
+ .fs-node__section {
4524
+ border-top: var(--fs-line-width) solid var(--fs-line);
4525
+ }
4526
+ .fs-node__section-head {
4527
+ min-height: 24px;
4528
+ padding: 2px 10px;
4529
+ border-radius: 0;
4530
+ font-weight: var(--fs-weight-semibold);
4531
+ letter-spacing: var(--fs-tracking-caps);
4532
+ text-transform: uppercase;
4533
+ color: var(--fs-ink-2);
4534
+ }
4535
+ .fs-node__section-head::before {
4536
+ width: 12px;
4537
+ height: 12px;
4538
+ }
4539
+ /* The slot for T92's mark counts, pushed right. */
4540
+ .fs-node__counts {
4541
+ display: flex;
4542
+ gap: 6px;
4543
+ margin-left: auto;
4544
+ letter-spacing: 0;
4545
+ text-transform: none;
4546
+ }
4547
+ .fs-node__section > .fs-disclosure__body {
4548
+ display: grid;
4549
+ padding: 3px 0;
4550
+ }
4551
+
4552
+ /* Node states. Selected is an outline, outside the edge, so it never moves the layout. */
4553
+ .fs-node.fs-is-selected {
4554
+ outline: 2px solid var(--fs-accent);
4555
+ outline-offset: 2px;
4556
+ }
4557
+ /* Lit and match: the edge turns accent and the header takes the wash, so it is not colour on the edge alone. */
4558
+ .fs-node--lit,
4559
+ .fs-node--match {
4560
+ --fs-node-edge: var(--fs-accent);
4561
+ }
4562
+ .fs-node--lit > .fs-node__header,
4563
+ .fs-node--match > .fs-node__header {
4564
+ background-color: var(--fs-accent-wash);
4565
+ }
4566
+ /* Dim: the one deliberate contrast exception for a node (spec 06 §2). */
4567
+ .fs-node--dim {
4568
+ opacity: var(--fs-diagram-dim-node);
4569
+ }
4570
+ /* Fail (two filter paths): a dashed gap edge, and the gap hatch on the header. */
4571
+ .fs-node--fail {
4572
+ --fs-node-edge: var(--fs-gap-ink);
4573
+ border-style: dashed;
4574
+ }
4575
+ .fs-node--fail > .fs-node__header {
4576
+ background-image: var(--fs-gap-hatch-sm);
4577
+ }
4578
+ /* No data: a hatched header, and the product's "No data" in the meta, which turns bold and darker. */
4579
+ .fs-node--nodata > .fs-node__header {
4580
+ background-image: repeating-linear-gradient(135deg, var(--fs-bg-sunken) 0 6px, transparent 6px 12px);
4581
+ }
4582
+ .fs-node--nodata .fs-node__meta {
4583
+ color: var(--fs-ink-2);
4584
+ font-weight: var(--fs-weight-semibold);
4585
+ }
4586
+ /* Measures only: a dashed edge. */
4587
+ .fs-node--measures-only {
4588
+ border-style: dashed;
4589
+ }
4590
+
4591
+ /* Forced colours: system colours; dashes, the outline and the left edge still show. */
4592
+ @media (forced-colors: active) {
4593
+ .fs-node {
4594
+ border-color: CanvasText;
4595
+ }
4596
+ .fs-node.fs-is-selected {
4597
+ outline-color: Highlight;
4598
+ }
4599
+ .fs-node--lit,
4600
+ .fs-node--match {
4601
+ border-color: Highlight;
4602
+ }
4603
+ /* Forced colours removes box-shadow, so the lit row's left edge is a border; the padding gives the 3 px back. */
4604
+ .fs-node__row.fs-is-lit {
4605
+ border-inline-start: 3px solid Highlight;
4606
+ padding-inline-start: 7px;
4607
+ }
4608
+ .fs-node__row.fs-is-selected {
4609
+ outline: 1px solid Highlight;
4610
+ outline-offset: -1px;
4611
+ }
4612
+ /* Forced colours erase a hatch: a dashed system-colour border takes its place (06 §7, as gap.css does). The row's
4613
+ border is inside its box-sizing, so the row keeps its height; the header's replaces its bottom hairline. */
4614
+ .fs-node__row.fs-is-gap {
4615
+ background-image: none;
4616
+ border: var(--fs-line-width) dashed CanvasText;
4617
+ }
4618
+ .fs-node--fail > .fs-node__header,
4619
+ .fs-node--nodata > .fs-node__header {
4620
+ background-image: none;
4621
+ border-bottom: var(--fs-line-width) dashed CanvasText;
4622
+ }
4623
+ }
4624
+ }
4625
+
4139
4626
  /* Notice and callout (spec 02 E). Usage: notice.md. */
4140
4627
  @layer fs.components {
4141
4628
  .fs-notice {
@@ -1,4 +1,5 @@
1
1
  import { type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
2
+ import type { ConversionMark } from './feedback.tsx';
2
3
  import { type HeadingLevel } from './overlays.tsx';
3
4
  /** The ring recipe as a static class, for a selected visual or object on a canvas. */
4
5
  export declare const outlineSelected = "fs-outline-selected";
@@ -185,3 +186,26 @@ export interface GapBarProps extends HTMLAttributes<HTMLDivElement> {
185
186
  }
186
187
  /** The fallback strip over a visual drawn as a table. */
187
188
  export declare const GapBar: import("react").ForwardRefExoticComponent<GapBarProps & import("react").RefAttributes<HTMLDivElement>>;
189
+ export interface MarkDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
190
+ /** Not converted is a hollow ring, so colour is not the only sign. */
191
+ mark: ConversionMark;
192
+ }
193
+ /** The 7 px conversion dot (T92). Decoration (`aria-hidden`): put the word beside it, visually hidden. */
194
+ export declare const MarkDot: import("react").ForwardRefExoticComponent<MarkDotProps & import("react").RefAttributes<HTMLSpanElement>>;
195
+ export interface MarkCountProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
196
+ mark: ConversionMark;
197
+ /** The number, formatted. Shown, but hidden from assistive technology. */
198
+ count: ReactNode;
199
+ /** The whole phrase for assistive technology ("4 exact,", "1 not converted"): a comma ends every one but the last. Required. */
200
+ label: string;
201
+ }
202
+ /** A dot and a tabular number. Put a group of them in a `.fs-cluster` with `role="group"` and a name. */
203
+ export declare const MarkCount: import("react").ForwardRefExoticComponent<MarkCountProps & import("react").RefAttributes<HTMLSpanElement>>;
204
+ export interface DataTypeBadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
205
+ /** The icon slot: one 12 px icon, usually `<Icon name="…" />`. The product picks it; the kit ships the frame. */
206
+ icon: ReactNode;
207
+ /** The type word ("Whole number"), said in a visually hidden span beside the badge. Required. */
208
+ label: string;
209
+ }
210
+ /** A column's data type as one icon in a 22 × 16 frame (T93). Not `TypeRole` icons, which are for object types. */
211
+ export declare const DataTypeBadge: import("react").ForwardRefExoticComponent<DataTypeBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -95,3 +95,17 @@ export const GapCell = forwardRef(function GapCell({ word, numeric, className, .
95
95
  export const GapBar = forwardRef(function GapBar({ text, action, className, ...rest }, ref) {
96
96
  return (_jsxs("div", { ref: ref, className: cx('fs-gap-bar', className), ...rest, children: [_jsx("span", { className: "fs-gap-bar__text", children: text }), action] }));
97
97
  });
98
+ /* ----------------------------------------------------------------- Mark dot, mark count */
99
+ const markClass = { exact: 'exact', approximate: 'approx', 'not-converted': 'none' };
100
+ /** The 7 px conversion dot (T92). Decoration (`aria-hidden`): put the word beside it, visually hidden. */
101
+ export const MarkDot = forwardRef(function MarkDot({ mark, className, ...rest }, ref) {
102
+ return (_jsx("span", { ref: ref, "aria-hidden": "true", className: cx('fs-mark-dot', `fs-mark-dot--${markClass[mark]}`, className), ...rest }));
103
+ });
104
+ /** A dot and a tabular number. Put a group of them in a `.fs-cluster` with `role="group"` and a name. */
105
+ export const MarkCount = forwardRef(function MarkCount({ mark, count, label, className, ...rest }, ref) {
106
+ return (_jsxs("span", { ref: ref, className: cx('fs-mark-count', `fs-mark-count--${markClass[mark]}`, className), ...rest, children: [_jsx("span", { "aria-hidden": "true", className: cx('fs-mark-dot', `fs-mark-dot--${markClass[mark]}`) }), _jsx("span", { "aria-hidden": "true", children: count }), _jsx("span", { className: "fs-visually-hidden", children: label })] }));
107
+ });
108
+ /** A column's data type as one icon in a 22 × 16 frame (T93). Not `TypeRole` icons, which are for object types. */
109
+ export const DataTypeBadge = forwardRef(function DataTypeBadge({ icon, label, className, ...rest }, ref) {
110
+ return (_jsxs(_Fragment, { children: [_jsx("span", { ref: ref, "aria-hidden": "true", className: cx('fs-data-type', className), ...rest, children: icon }), _jsx("span", { className: "fs-visually-hidden", children: label })] }));
111
+ });
@@ -0,0 +1,27 @@
1
+ import { type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
2
+ export interface DiagramNodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
3
+ /** The header's content: usually `fs-node__icon`, `fs-node__name` and `fs-node__meta`. The header is the drag handle. */
4
+ header: ReactNode;
5
+ /** The header's element. A `button` (with `type="button"`) is core's: it selects the table and is the drag handle. Default `div`. */
6
+ headerAs?: 'div' | 'button';
7
+ /** Passed to the header, for a drag-handle class, a role, `aria-pressed` or a handler. */
8
+ headerProps?: HTMLAttributes<HTMLElement> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'>;
9
+ /** Any children: rows, a section, or the product's own markup. Left out, there is no body. */
10
+ children?: ReactNode;
11
+ /** A 2 px accent outline. */
12
+ selected?: boolean;
13
+ /** The edge and the header take the accent. */
14
+ lit?: boolean;
15
+ /** Matched by a search (looks like `lit`). */
16
+ match?: boolean;
17
+ /** Opacity from `--fs-diagram-dim-node`. */
18
+ dim?: boolean;
19
+ /** Two filter paths (a dashed gap edge). */
20
+ fail?: boolean;
21
+ /** A hatched header: put "No data" in the meta. */
22
+ noData?: boolean;
23
+ /** A dashed edge. */
24
+ measuresOnly?: boolean;
25
+ }
26
+ /** The node frame (T96). Width comes from `--fs-node-width` (default 248 px). The kit styles no handles. */
27
+ export declare const DiagramNode: import("react").ForwardRefExoticComponent<DiagramNodeProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // React wrappers for spec 02 J: diagram. The kit styles a diagram and never draws one, so there is no xyflow here:
3
+ // `DiagramNode` is a frame the product puts inside its own node component (and gives its own handles).
4
+ import { createElement, forwardRef } from 'react';
5
+ import { cx } from "./util.js";
6
+ /** The node frame (T96). Width comes from `--fs-node-width` (default 248 px). The kit styles no handles. */
7
+ export const DiagramNode = forwardRef(function DiagramNode({ header, headerAs = 'div', headerProps, children, selected, lit, match, dim, fail, noData, measuresOnly, className, ...rest }, ref) {
8
+ const { className: headerClass, ...headerRest } = headerProps ?? {};
9
+ return (_jsxs("div", { ref: ref, className: cx('fs-node', selected && 'fs-is-selected', lit && 'fs-node--lit', match && 'fs-node--match', dim && 'fs-node--dim', fail && 'fs-node--fail', noData && 'fs-node--nodata', measuresOnly && 'fs-node--measures-only', className), ...rest, children: [createElement(headerAs, {
10
+ ...(headerAs === 'button' ? { type: 'button' } : {}),
11
+ className: cx('fs-node__header', headerClass),
12
+ ...headerRest,
13
+ }, header), children !== undefined && children !== null && children !== false && (_jsx("div", { className: "fs-node__body", children: children }))] }));
14
+ });
@@ -1,5 +1,6 @@
1
1
  export * from './actions.tsx';
2
2
  export * from './data.tsx';
3
+ export * from './diagram.tsx';
3
4
  export * from './editor.tsx';
4
5
  export * from './feedback.tsx';
5
6
  export * from './icon.tsx';
@@ -2,6 +2,7 @@
2
2
  // One module per spec 02 section; each is also importable on its own (`/react/actions`, …).
3
3
  export * from "./actions.js";
4
4
  export * from "./data.js";
5
+ export * from "./diagram.js";
5
6
  export * from "./editor.js";
6
7
  export * from "./feedback.js";
7
8
  export * from "./icon.js";
@@ -16,6 +16,14 @@ export declare const colorRoles: {
16
16
  'chart-zero': Schemed;
17
17
  'chart-good': Schemed;
18
18
  'chart-bad': Schemed;
19
+ 'diagram-bg': Schemed;
20
+ 'diagram-dot': Schemed;
21
+ 'diagram-line': Schemed;
22
+ 'diagram-line-inactive': Schemed;
23
+ 'diagram-line-emphasis': Schemed;
24
+ 'diagram-end-bg': Schemed;
25
+ 'diagram-end-line': Schemed;
26
+ 'diagram-end-ink': Schemed;
19
27
  'editor-gutter-bg': Schemed;
20
28
  'editor-gutter-ink': Schemed;
21
29
  'editor-gutter-line': Schemed;
@@ -115,6 +115,18 @@ const types = {
115
115
  'type-model': s('#7445b8', '#b79bea'),
116
116
  'type-access': s('#546e7a', '#9fb3bd'),
117
117
  };
118
+ // The diagram's inks and plane (spec 01 §3.12). Aliases of existing roles, so a re-theme moves them.
119
+ // Core's model-view.css used these roles as literals (ink-muted line, line-strong inactive, accent lit).
120
+ const diagram = {
121
+ 'diagram-bg': both(r('bg-plane')),
122
+ 'diagram-dot': both(r('line-strong')),
123
+ 'diagram-line': both(r('ink-muted')),
124
+ 'diagram-line-inactive': both(r('line-strong')),
125
+ 'diagram-line-emphasis': both(r('accent')),
126
+ 'diagram-end-bg': both(r('bg-surface')),
127
+ 'diagram-end-line': both(r('ink-muted')),
128
+ 'diagram-end-ink': both(r('ink-2')),
129
+ };
118
130
  const values = {
119
131
  'computed-bg': s(p('grey-100'), '#152a5a'),
120
132
  'computed-line': s('#7a88a6', '#6f81ad'),
@@ -167,6 +179,7 @@ export const colorRoles = {
167
179
  ...types,
168
180
  ...values,
169
181
  ...editor,
182
+ ...diagram,
170
183
  ...chart,
171
184
  };
172
185
  export const toneNames = ['neutral', 'info', 'positive', 'caution', 'warning', 'danger', 'gap'];