@bysages/core 0.1.0 → 0.1.2
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/index.mjs +185 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -925,6 +925,7 @@ const aiCss = `
|
|
|
925
925
|
and its switches) are slots — absent when empty, so the bare vessel
|
|
926
926
|
stays one quiet line. The halo answers the vessel, not the control. */
|
|
927
927
|
[data-scope="ai"][data-part="prompt"] {
|
|
928
|
+
box-sizing: border-box;
|
|
928
929
|
display: flex;
|
|
929
930
|
flex-direction: column;
|
|
930
931
|
align-items: stretch;
|
|
@@ -2868,6 +2869,7 @@ const clipboardCss = labelCss("clipboard") + `
|
|
|
2868
2869
|
//#region src/styles/components/collapsible.ts
|
|
2869
2870
|
const collapsibleCss = `
|
|
2870
2871
|
[data-scope="collapsible"][data-part="root"] {
|
|
2872
|
+
box-sizing: border-box;
|
|
2871
2873
|
display: flex;
|
|
2872
2874
|
flex-direction: column;
|
|
2873
2875
|
/* Fill the parent at rest too: an auto width would refit to the
|
|
@@ -10920,8 +10922,13 @@ const tabsCss = `
|
|
|
10920
10922
|
border-radius: var(--bs-radius-sm);
|
|
10921
10923
|
}
|
|
10922
10924
|
|
|
10925
|
+
/* The weight keeps the selected tab legible when the color cue collapses:
|
|
10926
|
+
* the high-contrast tier (civic pairs with it) promotes tertiary text to
|
|
10927
|
+
* primary strength, so ink alone can't carry the state — the breadcrumb's
|
|
10928
|
+
* current page makes the same move. */
|
|
10923
10929
|
[data-scope="tabs"][data-part="trigger"][data-selected] {
|
|
10924
10930
|
color: var(--bs-color-text-primary);
|
|
10931
|
+
font-weight: var(--bs-font-weight-semibold);
|
|
10925
10932
|
}
|
|
10926
10933
|
|
|
10927
10934
|
[data-scope="tabs"][data-part="trigger"][data-disabled] {
|
|
@@ -12190,7 +12197,184 @@ const componentStyles = {
|
|
|
12190
12197
|
"button-group": buttonGroupCss,
|
|
12191
12198
|
"split-button": splitButtonCss,
|
|
12192
12199
|
"float-button": floatButtonCss,
|
|
12193
|
-
layout: layoutCss
|
|
12200
|
+
layout: layoutCss,
|
|
12201
|
+
workflow: `
|
|
12202
|
+
[data-scope="workflow"][data-part="canvas"] {
|
|
12203
|
+
position: relative;
|
|
12204
|
+
inline-size: 100%;
|
|
12205
|
+
block-size: 100%;
|
|
12206
|
+
overflow: hidden;
|
|
12207
|
+
background-color: var(--bs-color-surface-1);
|
|
12208
|
+
background-image: radial-gradient(var(--bs-color-border) 1px, transparent 1px);
|
|
12209
|
+
background-size: var(--bs-space-4) var(--bs-space-4);
|
|
12210
|
+
background-position: calc(var(--bs-space-2) * -1) calc(var(--bs-space-2) * -1);
|
|
12211
|
+
border-radius: var(--bs-radius-lg);
|
|
12212
|
+
container-type: inline-size;
|
|
12213
|
+
}
|
|
12214
|
+
|
|
12215
|
+
/* The node host fills the cell's bounding box; the inward padding keeps
|
|
12216
|
+
* the handles (centered on the box edge) clear of the card. The handle
|
|
12217
|
+
* size is the adapter's geometry — it arrives as a variable so this
|
|
12218
|
+
* padding can never drift away from it. */
|
|
12219
|
+
[data-scope="workflow"][data-part="node"] {
|
|
12220
|
+
box-sizing: border-box;
|
|
12221
|
+
inline-size: 100%;
|
|
12222
|
+
block-size: 100%;
|
|
12223
|
+
padding: var(--bs-workflow-handle, var(--bs-space-3));
|
|
12224
|
+
}
|
|
12225
|
+
|
|
12226
|
+
/* The vessel: round, resting on paper, one hairline. State rules below
|
|
12227
|
+
* intentionally win over hover — a running node keeps its pigment. */
|
|
12228
|
+
[data-scope="workflow"][data-part="node"] > .workflow-node-card {
|
|
12229
|
+
inline-size: 100%;
|
|
12230
|
+
min-block-size: 100%;
|
|
12231
|
+
box-sizing: border-box;
|
|
12232
|
+
display: flex;
|
|
12233
|
+
flex-direction: column;
|
|
12234
|
+
justify-content: center;
|
|
12235
|
+
gap: var(--bs-space-2);
|
|
12236
|
+
padding: var(--bs-space-2) var(--bs-space-3);
|
|
12237
|
+
background: var(--bs-color-surface-2);
|
|
12238
|
+
border: 1px solid var(--bs-color-border);
|
|
12239
|
+
border-radius: var(--bs-radius-lg);
|
|
12240
|
+
box-shadow: var(--bs-shadow-xs);
|
|
12241
|
+
font-family: var(--bs-font-sans);
|
|
12242
|
+
font-size: var(--bs-font-size-sm);
|
|
12243
|
+
color: var(--bs-color-text-primary);
|
|
12244
|
+
transition:
|
|
12245
|
+
border-color var(--bs-duration-fast) var(--bs-ease-out),
|
|
12246
|
+
box-shadow var(--bs-duration-base) var(--bs-ease-out);
|
|
12247
|
+
}
|
|
12248
|
+
|
|
12249
|
+
[data-scope="workflow"][data-part="node"] > .workflow-node-card:hover {
|
|
12250
|
+
border-color: var(--bs-color-border-strong);
|
|
12251
|
+
}
|
|
12252
|
+
|
|
12253
|
+
/* Selected rides primary, and the running/success/error states win
|
|
12254
|
+
* over it — a node mid-flight keeps its pigment. The selected rule
|
|
12255
|
+
* must also out-rank hover (same specificity, later in the sheet).
|
|
12256
|
+
* The x6-*-selected classes are X6's own stamp on the selected views. */
|
|
12257
|
+
[data-scope="workflow"] .x6-node-selected .workflow-node-card,
|
|
12258
|
+
[data-scope="workflow"] .x6-node-selected .workflow-node-card:hover {
|
|
12259
|
+
border-color: var(--bs-color-primary);
|
|
12260
|
+
box-shadow: var(--bs-shadow-xs), 0 0 0 1px var(--bs-color-primary-subtle);
|
|
12261
|
+
}
|
|
12262
|
+
|
|
12263
|
+
/* The seal: a square-cut handle. Geometry rides the SVG attributes; the
|
|
12264
|
+
* pigments ride the tokens. The cut is a true right angle at every scene
|
|
12265
|
+
* — a seal is square whatever radius the vessels wear. */
|
|
12266
|
+
[data-scope="workflow"] [data-part="handle"] {
|
|
12267
|
+
fill: var(--bs-color-surface-2);
|
|
12268
|
+
stroke: var(--bs-color-border-strong);
|
|
12269
|
+
stroke-width: 1;
|
|
12270
|
+
rx: 0;
|
|
12271
|
+
ry: 0;
|
|
12272
|
+
cursor: crosshair;
|
|
12273
|
+
transition: stroke var(--bs-duration-fast) var(--bs-ease-out);
|
|
12274
|
+
}
|
|
12275
|
+
|
|
12276
|
+
[data-scope="workflow"] [data-part="handle"][data-dir="in"] {
|
|
12277
|
+
fill: var(--bs-color-surface-3);
|
|
12278
|
+
}
|
|
12279
|
+
|
|
12280
|
+
[data-scope="workflow"] [data-part="handle"]:hover {
|
|
12281
|
+
stroke: var(--bs-color-primary);
|
|
12282
|
+
}
|
|
12283
|
+
|
|
12284
|
+
/* The ink line. The arrowhead inherits the stroke through
|
|
12285
|
+
* context-stroke, so one class carries every state. */
|
|
12286
|
+
[data-scope="workflow"] .workflow-edge-line {
|
|
12287
|
+
fill: none;
|
|
12288
|
+
stroke: var(--bs-color-border-strong);
|
|
12289
|
+
stroke-width: 2;
|
|
12290
|
+
stroke-linecap: round;
|
|
12291
|
+
transition: stroke var(--bs-duration-base) var(--bs-ease-out);
|
|
12292
|
+
}
|
|
12293
|
+
|
|
12294
|
+
/* The :hover twins match the plain hover rule's specificity, so the
|
|
12295
|
+
* state pigment wins the cascade at the same (0,4,0) rank by order —
|
|
12296
|
+
* hovering a mid-flight node never repaints it back to a hairline. */
|
|
12297
|
+
[data-scope="workflow"] .workflow-node-card[data-state="running"],
|
|
12298
|
+
[data-scope="workflow"] .workflow-node-card[data-state="running"]:hover {
|
|
12299
|
+
border-color: var(--bs-color-primary);
|
|
12300
|
+
animation: workflow-breathe var(--bs-duration-slow) var(--bs-ease-in-out) infinite alternate;
|
|
12301
|
+
}
|
|
12302
|
+
|
|
12303
|
+
[data-scope="workflow"] .workflow-node-card[data-state="success"],
|
|
12304
|
+
[data-scope="workflow"] .workflow-node-card[data-state="success"]:hover {
|
|
12305
|
+
border-color: var(--bs-color-success);
|
|
12306
|
+
}
|
|
12307
|
+
|
|
12308
|
+
[data-scope="workflow"] .workflow-node-card[data-state="error"],
|
|
12309
|
+
[data-scope="workflow"] .workflow-node-card[data-state="error"]:hover {
|
|
12310
|
+
border-color: var(--bs-color-danger);
|
|
12311
|
+
}
|
|
12312
|
+
|
|
12313
|
+
[data-scope="workflow"] .x6-edge-selected .workflow-edge-line {
|
|
12314
|
+
stroke: var(--bs-color-primary);
|
|
12315
|
+
}
|
|
12316
|
+
|
|
12317
|
+
[data-scope="workflow"] .workflow-edge-line[data-state="running"] {
|
|
12318
|
+
stroke: var(--bs-color-primary);
|
|
12319
|
+
stroke-dasharray: 6 4;
|
|
12320
|
+
animation: workflow-flow var(--bs-duration-slow) linear infinite;
|
|
12321
|
+
}
|
|
12322
|
+
|
|
12323
|
+
[data-scope="workflow"] .workflow-edge-line[data-state="success"] {
|
|
12324
|
+
stroke: var(--bs-color-success);
|
|
12325
|
+
}
|
|
12326
|
+
|
|
12327
|
+
[data-scope="workflow"] .workflow-edge-line[data-state="error"] {
|
|
12328
|
+
stroke: var(--bs-color-danger);
|
|
12329
|
+
}
|
|
12330
|
+
|
|
12331
|
+
@keyframes workflow-breathe {
|
|
12332
|
+
from {
|
|
12333
|
+
box-shadow: var(--bs-shadow-xs);
|
|
12334
|
+
}
|
|
12335
|
+
to {
|
|
12336
|
+
box-shadow: 0 0 0 var(--bs-space-2) var(--bs-color-primary-subtle);
|
|
12337
|
+
}
|
|
12338
|
+
}
|
|
12339
|
+
|
|
12340
|
+
@keyframes workflow-flow {
|
|
12341
|
+
to {
|
|
12342
|
+
stroke-dashoffset: -10;
|
|
12343
|
+
}
|
|
12344
|
+
}
|
|
12345
|
+
|
|
12346
|
+
/* X6's selection widgets rest inside the canvas — retint them from the
|
|
12347
|
+
* hard-coded defaults to the paper-and-ink pigments. */
|
|
12348
|
+
[data-scope="workflow"] .x6-widget-selection-box {
|
|
12349
|
+
border: 1px dashed var(--bs-color-primary);
|
|
12350
|
+
box-shadow: none;
|
|
12351
|
+
}
|
|
12352
|
+
|
|
12353
|
+
[data-scope="workflow"] .x6-widget-selection-rubberband {
|
|
12354
|
+
background-color: var(--bs-color-primary-subtle);
|
|
12355
|
+
border: 1px solid var(--bs-color-primary);
|
|
12356
|
+
}
|
|
12357
|
+
|
|
12358
|
+
/* The minimap lives outside the canvas container (the host hands us its
|
|
12359
|
+
* box), so it carries its own part on the container. */
|
|
12360
|
+
[data-scope="workflow"][data-part="minimap"] .x6-widget-minimap {
|
|
12361
|
+
background-color: var(--bs-color-surface-1);
|
|
12362
|
+
border: 1px solid var(--bs-color-border);
|
|
12363
|
+
border-radius: var(--bs-radius-md);
|
|
12364
|
+
}
|
|
12365
|
+
|
|
12366
|
+
[data-scope="workflow"][data-part="minimap"] .x6-widget-minimap-viewport {
|
|
12367
|
+
border: 1px solid var(--bs-color-primary);
|
|
12368
|
+
background-color: color-mix(in oklab, var(--bs-color-primary) 12%, transparent);
|
|
12369
|
+
}
|
|
12370
|
+
|
|
12371
|
+
@media (prefers-reduced-motion: reduce) {
|
|
12372
|
+
[data-scope="workflow"] .workflow-node-card,
|
|
12373
|
+
[data-scope="workflow"] .workflow-edge-line {
|
|
12374
|
+
animation: none;
|
|
12375
|
+
}
|
|
12376
|
+
}
|
|
12377
|
+
`
|
|
12194
12378
|
};
|
|
12195
12379
|
//#endregion
|
|
12196
12380
|
//#region src/styles.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bysages/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Shared core of By Sages Elements — theme engine, per-component styles, and the lighting engine, all token-driven",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@bysages/tokens": "0.1.
|
|
43
|
+
"@bysages/tokens": "0.1.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"dev": "basis build --stub",
|