@starci/grammar 0.9.3 → 0.9.5
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/LICENSE +21 -21
- package/README.md +1 -1
- package/dist/.build-stamp.json +4 -4
- package/dist/common/components-navigation.css +192 -0
- package/dist/common/registry.d.ts +3 -2
- package/dist/common/registry.d.ts.map +1 -1
- package/dist/common/renderers-navigation.d.ts +3 -1
- package/dist/common/renderers-navigation.d.ts.map +1 -1
- package/dist/common/renderers-navigation.js +3 -1
- package/dist/common/renderers-navigation.js.map +1 -1
- package/dist/common/styles.css +37 -23
- package/dist/core/branch/DataTable/index.d.ts +7 -2
- package/dist/core/branch/DataTable/index.d.ts.map +1 -1
- package/dist/core/branch/DataTable/index.js +9 -4
- package/dist/core/branch/DataTable/index.js.map +1 -1
- package/dist/core/branch/FlowGraph/index.d.ts +34 -0
- package/dist/core/branch/FlowGraph/index.d.ts.map +1 -0
- package/dist/core/branch/FlowGraph/index.js +83 -0
- package/dist/core/branch/FlowGraph/index.js.map +1 -0
- package/dist/core/branch/FlowGraph/layout.d.ts +17 -0
- package/dist/core/branch/FlowGraph/layout.d.ts.map +1 -0
- package/dist/core/branch/FlowGraph/layout.js +51 -0
- package/dist/core/branch/FlowGraph/layout.js.map +1 -0
- package/dist/core/branch/FlowGraph/types.d.ts +28 -0
- package/dist/core/branch/FlowGraph/types.d.ts.map +1 -0
- package/dist/core/branch/FlowGraph/types.js +2 -0
- package/dist/core/branch/FlowGraph/types.js.map +1 -0
- package/dist/core/branch/SurfaceListCard/index.d.ts +6 -0
- package/dist/core/branch/SurfaceListCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.js +10 -3
- package/dist/core/branch/SurfaceListCard/index.js.map +1 -1
- package/dist/core/composite/DescriptionList/index.d.ts +5 -0
- package/dist/core/composite/DescriptionList/index.d.ts.map +1 -1
- package/dist/core/composite/DescriptionList/index.js +6 -4
- package/dist/core/composite/DescriptionList/index.js.map +1 -1
- package/dist/core/composite/ListRow/index.d.ts +8 -1
- package/dist/core/composite/ListRow/index.d.ts.map +1 -1
- package/dist/core/composite/ListRow/index.js +5 -1
- package/dist/core/composite/ListRow/index.js.map +1 -1
- package/dist/offset-pop/components-navigation.css +14 -0
- package/package.json +6 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 StarCi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StarCi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install @starci/grammar @heroui/react react react-dom
|
|
|
17
17
|
npm install ./.claude/packages/grammar
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
The package needs Node.js 20 or newer. Its peer dependencies are React 18
|
|
20
|
+
The package needs Node.js 20 or newer. Its peer dependencies are React 18+, `@xyflow/react` 12 (for `FlowGraph`) and `@heroui/react`
|
|
21
21
|
3.2+. Load the HeroUI stylesheet once in the app, as HeroUI's own setup describes. Then import
|
|
22
22
|
exactly one Grammar family stylesheet. Each family sheet already imports Common anatomy first.
|
|
23
23
|
|
package/dist/.build-stamp.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "starci/grammar-build-stamp@1",
|
|
3
3
|
"package": "@starci/grammar",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.5",
|
|
5
5
|
"algorithm": "starci/grammar-source-digest@1",
|
|
6
|
-
"sourceDigest": "sha256:
|
|
7
|
-
"distDigest": "sha256:
|
|
8
|
-
"builtAt": "2026-10-
|
|
6
|
+
"sourceDigest": "sha256:5e06ab35c59bdb6d3b3b19ec8a4e0263df365ebbad219603304091b708a3421e",
|
|
7
|
+
"distDigest": "sha256:0e854f8925ecf978f6e1153debd167ac6d2230c0ca6e20e3071c0bc685ec66dc",
|
|
8
|
+
"builtAt": "2026-10-11T14:02:49.571Z"
|
|
9
9
|
}
|
|
@@ -1274,4 +1274,196 @@
|
|
|
1274
1274
|
forced-color-adjust: none;
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
|
+
|
|
1278
|
+
/* ---------- FlowGraph ----------
|
|
1279
|
+
* The structural base rules of React Flow, scoped to the graph so a host needs no @xyflow/react stylesheet import.
|
|
1280
|
+
* Its colours (edges, background, nodes) are replaced by grammar tokens below. */
|
|
1281
|
+
.starci-core-flow-graph {
|
|
1282
|
+
display: block;
|
|
1283
|
+
position: relative;
|
|
1284
|
+
min-width: 0;
|
|
1285
|
+
margin: 0;
|
|
1286
|
+
overflow: hidden;
|
|
1287
|
+
border: 1px solid var(--separator, CanvasText);
|
|
1288
|
+
border-radius: var(--starci-core-surface-radius, 1rem);
|
|
1289
|
+
background: var(--surface, Canvas);
|
|
1290
|
+
color: var(--foreground, CanvasText);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.starci-core-flow-graph-canvas {
|
|
1294
|
+
position: relative;
|
|
1295
|
+
inline-size: 100%;
|
|
1296
|
+
block-size: 24rem;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
.starci-core-flow-graph[data-grammar-flow-height="sm"] .starci-core-flow-graph-canvas { block-size: 16rem; }
|
|
1300
|
+
.starci-core-flow-graph[data-grammar-flow-height="lg"] .starci-core-flow-graph-canvas { block-size: 32rem; }
|
|
1301
|
+
|
|
1302
|
+
.starci-core-flow-graph-loading > .starci-core-skeleton { block-size: 100%; aspect-ratio: auto; border-radius: 0; }
|
|
1303
|
+
|
|
1304
|
+
.starci-core-flow-graph-empty {
|
|
1305
|
+
display: flex;
|
|
1306
|
+
align-items: center;
|
|
1307
|
+
justify-content: center;
|
|
1308
|
+
min-block-size: 8rem;
|
|
1309
|
+
margin: 0;
|
|
1310
|
+
padding: 1.5rem;
|
|
1311
|
+
color: var(--muted, GrayText);
|
|
1312
|
+
text-align: center;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.starci-core-flow-graph .react-flow {
|
|
1316
|
+
direction: ltr;
|
|
1317
|
+
--xy-edge-stroke: var(--separator, CanvasText);
|
|
1318
|
+
--xy-edge-stroke-width: 1.5;
|
|
1319
|
+
--xy-edge-stroke-selected: var(--separator, CanvasText);
|
|
1320
|
+
--xy-background-color: transparent;
|
|
1321
|
+
background: transparent;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
.starci-core-flow-graph .react-flow__container { position: absolute; inline-size: 100%; block-size: 100%; inset-block-start: 0; inset-inline-start: 0; }
|
|
1325
|
+
.starci-core-flow-graph .react-flow__pane { z-index: 1; touch-action: none; }
|
|
1326
|
+
.starci-core-flow-graph[data-grammar-flow-interactive="true"] .react-flow__pane.draggable { cursor: grab; }
|
|
1327
|
+
.starci-core-flow-graph[data-grammar-flow-interactive="true"] .react-flow__pane.dragging { cursor: grabbing; }
|
|
1328
|
+
.starci-core-flow-graph .react-flow__viewport { transform-origin: 0 0; z-index: 2; pointer-events: none; }
|
|
1329
|
+
.starci-core-flow-graph .react-flow__renderer { z-index: 4; }
|
|
1330
|
+
.starci-core-flow-graph .react-flow__background { pointer-events: none; z-index: -1; }
|
|
1331
|
+
.starci-core-flow-graph .react-flow__edges { position: absolute; }
|
|
1332
|
+
.starci-core-flow-graph .react-flow__edges svg { position: absolute; overflow: visible; pointer-events: none; }
|
|
1333
|
+
.starci-core-flow-graph .react-flow__edge-path { fill: none; stroke: var(--xy-edge-stroke); stroke-width: var(--xy-edge-stroke-width); stroke-linecap: round; }
|
|
1334
|
+
.starci-core-flow-graph .starci-core-flow-graph-edge-placeholder .react-flow__edge-path { stroke-dasharray: 4 5; }
|
|
1335
|
+
.starci-core-flow-graph .react-flow__nodes { pointer-events: none; transform-origin: 0 0; }
|
|
1336
|
+
.starci-core-flow-graph .react-flow__node {
|
|
1337
|
+
position: absolute;
|
|
1338
|
+
box-sizing: border-box;
|
|
1339
|
+
transform-origin: 0 0;
|
|
1340
|
+
pointer-events: all;
|
|
1341
|
+
user-select: none;
|
|
1342
|
+
cursor: default;
|
|
1343
|
+
outline: none;
|
|
1344
|
+
}
|
|
1345
|
+
.starci-core-flow-graph .react-flow__node.selectable { cursor: pointer; }
|
|
1346
|
+
.starci-core-flow-graph .react-flow__panel { position: absolute; z-index: 5; margin: 0.75rem; }
|
|
1347
|
+
.starci-core-flow-graph .react-flow__panel.bottom { inset-block-end: 0; }
|
|
1348
|
+
.starci-core-flow-graph .react-flow__panel.left { inset-inline-start: 0; }
|
|
1349
|
+
.starci-core-flow-graph .react-flow__panel.right { inset-inline-end: 0; }
|
|
1350
|
+
.starci-core-flow-graph .react-flow__panel.top { inset-block-start: 0; }
|
|
1351
|
+
|
|
1352
|
+
/* The edge ends meet at the node centre: the handle is a hidden point in the middle of the card. */
|
|
1353
|
+
.starci-core-flow-graph .starci-core-flow-graph-handle {
|
|
1354
|
+
position: absolute;
|
|
1355
|
+
inset-block-start: 50%;
|
|
1356
|
+
inset-inline-start: 50%;
|
|
1357
|
+
min-inline-size: 1px;
|
|
1358
|
+
min-block-size: 1px;
|
|
1359
|
+
inline-size: 1px;
|
|
1360
|
+
block-size: 1px;
|
|
1361
|
+
border: 0;
|
|
1362
|
+
opacity: 0;
|
|
1363
|
+
pointer-events: none;
|
|
1364
|
+
transform: none;
|
|
1365
|
+
background: transparent;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
.starci-core-flow-graph-node {
|
|
1369
|
+
--starci-flow-tint: var(--default-soft, transparent);
|
|
1370
|
+
--starci-flow-ink: var(--foreground, CanvasText);
|
|
1371
|
+
position: relative;
|
|
1372
|
+
display: inline-flex;
|
|
1373
|
+
align-items: center;
|
|
1374
|
+
gap: 0.5rem;
|
|
1375
|
+
max-inline-size: 14rem;
|
|
1376
|
+
padding: 0.375rem 0.875rem;
|
|
1377
|
+
border: 1px solid var(--separator, CanvasText);
|
|
1378
|
+
border-radius: 999px;
|
|
1379
|
+
background-color: var(--surface, Canvas);
|
|
1380
|
+
background-image: linear-gradient(var(--starci-flow-tint), var(--starci-flow-tint));
|
|
1381
|
+
color: var(--starci-flow-ink);
|
|
1382
|
+
font-size: 0.875rem;
|
|
1383
|
+
line-height: 1.25;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.starci-core-flow-graph-node[data-size="sm"] { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
|
|
1387
|
+
.starci-core-flow-graph-node[data-size="lg"] { padding: 0.625rem 1.25rem; font-size: 1rem; font-weight: 600; }
|
|
1388
|
+
.starci-core-flow-graph-node[data-tone="accent"] { --starci-flow-tint: var(--accent-soft, transparent); --starci-flow-ink: var(--accent-soft-foreground, CanvasText); }
|
|
1389
|
+
.starci-core-flow-graph-node[data-tone="success"] { --starci-flow-tint: var(--success-soft, transparent); --starci-flow-ink: var(--success-soft-foreground, CanvasText); }
|
|
1390
|
+
.starci-core-flow-graph-node[data-tone="warning"] { --starci-flow-tint: var(--warning-soft, transparent); --starci-flow-ink: var(--warning-soft-foreground, CanvasText); }
|
|
1391
|
+
.starci-core-flow-graph-node[data-tone="danger"] { --starci-flow-tint: var(--danger-soft, transparent); --starci-flow-ink: var(--danger-soft-foreground, CanvasText); }
|
|
1392
|
+
.starci-core-flow-graph-node[data-tone="muted"] { --starci-flow-tint: transparent; --starci-flow-ink: var(--muted, GrayText); }
|
|
1393
|
+
.starci-core-flow-graph-node[data-placeholder="true"] { border-style: dashed; }
|
|
1394
|
+
|
|
1395
|
+
.starci-core-flow-graph-copy {
|
|
1396
|
+
display: flex;
|
|
1397
|
+
min-width: 0;
|
|
1398
|
+
flex-direction: column;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.starci-core-flow-graph-label {
|
|
1402
|
+
overflow: hidden;
|
|
1403
|
+
text-overflow: ellipsis;
|
|
1404
|
+
white-space: nowrap;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
.starci-core-flow-graph-description {
|
|
1408
|
+
overflow: hidden;
|
|
1409
|
+
color: var(--muted, GrayText);
|
|
1410
|
+
font-size: 0.75rem;
|
|
1411
|
+
text-overflow: ellipsis;
|
|
1412
|
+
white-space: nowrap;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
.starci-core-flow-graph-count {
|
|
1416
|
+
flex: 0 0 auto;
|
|
1417
|
+
min-inline-size: 1.25rem;
|
|
1418
|
+
padding: 0 0.375rem;
|
|
1419
|
+
border-radius: 999px;
|
|
1420
|
+
background: var(--surface, Canvas);
|
|
1421
|
+
color: var(--foreground, CanvasText);
|
|
1422
|
+
font-size: 0.6875rem;
|
|
1423
|
+
font-variant-numeric: tabular-nums;
|
|
1424
|
+
line-height: 1.25rem;
|
|
1425
|
+
text-align: center;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/* Selection and keyboard focus draw the package focus ring on the card, not on the React Flow wrapper. */
|
|
1429
|
+
.starci-core-flow-graph-node[data-grammar-selected="true"],
|
|
1430
|
+
.starci-core-flow-graph .react-flow__node:focus-visible > .starci-core-flow-graph-node {
|
|
1431
|
+
outline: 2px solid var(--focus, var(--starci-core-focus, Highlight));
|
|
1432
|
+
outline-offset: 2px;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.starci-core-flow-graph-controls {
|
|
1436
|
+
display: flex;
|
|
1437
|
+
flex-direction: column;
|
|
1438
|
+
overflow: hidden;
|
|
1439
|
+
border: 1px solid var(--separator, CanvasText);
|
|
1440
|
+
border-radius: 0.75rem;
|
|
1441
|
+
background: var(--surface, Canvas);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
.starci-core-flow-graph-controls .react-flow__controls-button {
|
|
1445
|
+
display: flex;
|
|
1446
|
+
align-items: center;
|
|
1447
|
+
justify-content: center;
|
|
1448
|
+
inline-size: 2rem;
|
|
1449
|
+
block-size: 2rem;
|
|
1450
|
+
padding: 0.375rem;
|
|
1451
|
+
border: 0;
|
|
1452
|
+
background: transparent;
|
|
1453
|
+
color: var(--foreground, CanvasText);
|
|
1454
|
+
cursor: pointer;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.starci-core-flow-graph-controls .react-flow__controls-button + .react-flow__controls-button { border-block-start: 1px solid var(--separator, CanvasText); }
|
|
1458
|
+
.starci-core-flow-graph-controls .react-flow__controls-button svg { inline-size: 100%; max-inline-size: 0.75rem; max-block-size: 0.75rem; fill: currentColor; }
|
|
1459
|
+
.starci-core-flow-graph-controls .react-flow__controls-button:focus-visible { outline: 2px solid var(--focus, var(--starci-core-focus, Highlight)); outline-offset: -2px; }
|
|
1460
|
+
.starci-core-flow-graph-controls .react-flow__controls-button:disabled { opacity: 0.4; cursor: default; }
|
|
1461
|
+
|
|
1462
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1463
|
+
.starci-core-flow-graph .react-flow__edge.animated path { animation: none; }
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
@media (forced-colors: active) {
|
|
1467
|
+
.starci-core-flow-graph-node[data-grammar-selected="true"] { outline-color: Highlight; forced-color-adjust: none; }
|
|
1468
|
+
}
|
|
1277
1469
|
}
|
|
@@ -14,9 +14,10 @@ export declare const COMMON_GRAMMAR_COMPONENTS: Readonly<{
|
|
|
14
14
|
readonly BottomNav: ({ label, items, currentId, onSelect, position, visibility, className }: import("./renderers-navigation.js").BottomNavProps) => import("react").JSX.Element;
|
|
15
15
|
readonly Breadcrumbs: ({ label, items, separator, onAction, className }: import("./renderers-navigation.js").BreadcrumbsProps) => import("react").JSX.Element;
|
|
16
16
|
readonly Calendar: ({ label, value, defaultValue, onChange, minValue, maxValue, isDateUnavailable, isDisabled, isReadOnly, previousLabel, nextLabel, className, }: import("./renderers-navigation.js").CalendarProps) => import("react").JSX.Element;
|
|
17
|
-
readonly DataTable: <Row extends import("./renderers-navigation.js").DataTableRow>({ label, columns, rows, renderCell, sort, onSortChange, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading, loadingContent, emptyContent, stickyHeader, maxBlockSize, onRowAction, className, }: import("./renderers-navigation.js").DataTableProps<Row>) => import("react").JSX.Element;
|
|
17
|
+
readonly DataTable: <Row extends import("./renderers-navigation.js").DataTableRow>({ label, columns, rows, renderCell, sort, onSortChange, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading, loadingContent, loadingRows, emptyContent, stickyHeader, maxBlockSize, onRowAction, className, }: import("./renderers-navigation.js").DataTableProps<Row>) => import("react").JSX.Element;
|
|
18
18
|
readonly DescriptionList: (props: import("./renderers-navigation.js").DescriptionListProps) => import("react").JSX.Element;
|
|
19
19
|
readonly Disclosure: ({ title, children, isExpanded, defaultExpanded, onExpandedChange, isDisabled, headingLevel, className, }: import("./renderers-navigation.js").DisclosureProps) => import("react").JSX.Element;
|
|
20
|
+
readonly FlowGraph: ({ label, nodes, edges, selectedId, onSelect, height, isInteractive, showControls, layout, emptyLabel, isLoading, className, }: import("./renderers-navigation.js").FlowGraphProps) => import("react").JSX.Element;
|
|
20
21
|
readonly Footer: ({ label, brand, groups, legal, externalHint, children, className }: import("./renderers-navigation.js").FooterProps) => import("react").JSX.Element;
|
|
21
22
|
readonly Image: ({ src, alt, aspect, fit, fallback, loading, srcSet, sizes, width, height, onLoadStateChange, plate, className, ...assetSlot }: import("./renderers-navigation.js").ImageProps) => import("react").JSX.Element;
|
|
22
23
|
readonly Link: ({ children, href, kind, isCurrent, visited, externalHint, externalIcon, isDisabled, onFollow, className, }: import("./renderers-navigation.js").LinkProps) => import("react").JSX.Element;
|
|
@@ -89,7 +90,7 @@ export declare const COMMON_GRAMMAR_COMPONENTS: Readonly<{
|
|
|
89
90
|
readonly LeadingNumber: (props: import("./renderers.js").LeadingNumberProps) => import("react").JSX.Element;
|
|
90
91
|
readonly List: (props: import("./renderers.js").ListProps) => import("react").JSX.Element;
|
|
91
92
|
readonly ListItem: (props: import("./renderers.js").ListItemProps) => import("react").JSX.Element;
|
|
92
|
-
readonly ListRow: ({ title, description, leading, badges, actions, children, state, verdict }: import("./renderers.js").ListRowProps) => import("react").JSX.Element;
|
|
93
|
+
readonly ListRow: ({ title, description, leading, badges, actions, children, state, verdict, isSkeleton }: import("./renderers.js").ListRowProps) => import("react").JSX.Element;
|
|
93
94
|
readonly MarkdownArticle: (props: import("./renderers.js").MarkdownArticleProps) => import("react").JSX.Element;
|
|
94
95
|
readonly MarkdownTableFrame: (props: import("./renderers.js").MarkdownTableFrameProps) => import("react").JSX.Element;
|
|
95
96
|
readonly MediaFrame: ({ children, caption, aspect, fit, treatment, className, ...assetSlot }: import("./renderers.js").MediaFrameProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/common/registry.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAEvE,MAAM,MAAM,wBAAwB,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,CAAA;AAClE,KAAK,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAA;AACpE,KAAK,sBAAsB,CAAC,MAAM,SAAS,uBAAuB,IAAI;IAClE,QAAQ,EAAE,IAAI,IAAI,MAAM,MAAM,CAAC,CAAC,EAAE,wBAAwB,CAAC,cAAc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ran
|
|
|
2
2
|
export { Calendar, type CalendarProps } from "../core/branch/Calendar/index.js";
|
|
3
3
|
export { DataTable, type DataTableColumn, type DataTableProps, type DataTableRow, type DataTableSort } from "../core/branch/DataTable/index.js";
|
|
4
4
|
export { Disclosure, type DisclosureProps } from "../core/branch/Disclosure/index.js";
|
|
5
|
+
export { FlowGraph, radialPositions, type FlowGraphEdge, type FlowGraphHeight, type FlowGraphLayout, type FlowGraphNode, type FlowGraphNodeSize, type FlowGraphProps, type FlowGraphTone } from "../core/branch/FlowGraph/index.js";
|
|
5
6
|
export { ListBox, type ListBoxItem, type ListBoxProps } from "../core/branch/ListBox/index.js";
|
|
6
7
|
export { AvatarGroup, type AvatarGroupItem, type AvatarGroupProps } from "../core/composite/AvatarGroup/index.js";
|
|
7
8
|
export { Breadcrumbs, type BreadcrumbItem, type BreadcrumbsProps } from "../core/composite/Breadcrumbs/index.js";
|
|
@@ -25,9 +26,10 @@ export declare const COMMON_NAVIGATION_COMPONENTS: Readonly<{
|
|
|
25
26
|
readonly BottomNav: ({ label, items, currentId, onSelect, position, visibility, className }: import("./renderers-navigation.js").BottomNavProps) => import("react").JSX.Element;
|
|
26
27
|
readonly Breadcrumbs: ({ label, items, separator, onAction, className }: import("./renderers-navigation.js").BreadcrumbsProps) => import("react").JSX.Element;
|
|
27
28
|
readonly Calendar: ({ label, value, defaultValue, onChange, minValue, maxValue, isDateUnavailable, isDisabled, isReadOnly, previousLabel, nextLabel, className, }: import("./renderers-navigation.js").CalendarProps) => import("react").JSX.Element;
|
|
28
|
-
readonly DataTable: <Row extends import("./renderers-navigation.js").DataTableRow>({ label, columns, rows, renderCell, sort, onSortChange, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading, loadingContent, emptyContent, stickyHeader, maxBlockSize, onRowAction, className, }: import("./renderers-navigation.js").DataTableProps<Row>) => import("react").JSX.Element;
|
|
29
|
+
readonly DataTable: <Row extends import("./renderers-navigation.js").DataTableRow>({ label, columns, rows, renderCell, sort, onSortChange, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading, loadingContent, loadingRows, emptyContent, stickyHeader, maxBlockSize, onRowAction, className, }: import("./renderers-navigation.js").DataTableProps<Row>) => import("react").JSX.Element;
|
|
29
30
|
readonly DescriptionList: (props: import("./renderers-navigation.js").DescriptionListProps) => import("react").JSX.Element;
|
|
30
31
|
readonly Disclosure: ({ title, children, isExpanded, defaultExpanded, onExpandedChange, isDisabled, headingLevel, className, }: import("./renderers-navigation.js").DisclosureProps) => import("react").JSX.Element;
|
|
32
|
+
readonly FlowGraph: ({ label, nodes, edges, selectedId, onSelect, height, isInteractive, showControls, layout, emptyLabel, isLoading, className, }: import("./renderers-navigation.js").FlowGraphProps) => import("react").JSX.Element;
|
|
31
33
|
readonly Footer: ({ label, brand, groups, legal, externalHint, children, className }: import("./renderers-navigation.js").FooterProps) => import("react").JSX.Element;
|
|
32
34
|
readonly Image: ({ src, alt, aspect, fit, fallback, loading, srcSet, sizes, width, height, onLoadStateChange, plate, className, ...assetSlot }: import("./renderers-navigation.js").ImageProps) => import("react").JSX.Element;
|
|
33
35
|
readonly Link: ({ children, href, kind, isCurrent, visited, externalHint, externalIcon, isDisabled, onFollow, className, }: import("./renderers-navigation.js").LinkProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderers-navigation.d.ts","sourceRoot":"","sources":["../../src/common/renderers-navigation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderers-navigation.d.ts","sourceRoot":"","sources":["../../src/common/renderers-navigation.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACtG,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe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OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACrH,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAC/F,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAC7G,OAAO,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAA;AACrI,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,iCAAiC,CAAA;AACrF,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAE5E,gFAAgF;AAChF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAA"}
|
|
@@ -4,6 +4,7 @@ import { Accordion } from "../core/branch/Accordion/index.js";
|
|
|
4
4
|
import { Calendar } from "../core/branch/Calendar/index.js";
|
|
5
5
|
import { DataTable } from "../core/branch/DataTable/index.js";
|
|
6
6
|
import { Disclosure } from "../core/branch/Disclosure/index.js";
|
|
7
|
+
import { FlowGraph } from "../core/branch/FlowGraph/index.js";
|
|
7
8
|
import { ListBox } from "../core/branch/ListBox/index.js";
|
|
8
9
|
import { AvatarGroup } from "../core/composite/AvatarGroup/index.js";
|
|
9
10
|
import { Breadcrumbs } from "../core/composite/Breadcrumbs/index.js";
|
|
@@ -23,6 +24,7 @@ export { Accordion } from "../core/branch/Accordion/index.js";
|
|
|
23
24
|
export { Calendar } from "../core/branch/Calendar/index.js";
|
|
24
25
|
export { DataTable } from "../core/branch/DataTable/index.js";
|
|
25
26
|
export { Disclosure } from "../core/branch/Disclosure/index.js";
|
|
27
|
+
export { FlowGraph, radialPositions } from "../core/branch/FlowGraph/index.js";
|
|
26
28
|
export { ListBox } from "../core/branch/ListBox/index.js";
|
|
27
29
|
export { AvatarGroup } from "../core/composite/AvatarGroup/index.js";
|
|
28
30
|
export { Breadcrumbs } from "../core/composite/Breadcrumbs/index.js";
|
|
@@ -41,6 +43,6 @@ export { Rating } from "../core/primitive/Rating/index.js";
|
|
|
41
43
|
/** Every navigation-group renderer, spread into `COMMON_GRAMMAR_COMPONENTS`. */
|
|
42
44
|
export const COMMON_NAVIGATION_COMPONENTS = Object.freeze({
|
|
43
45
|
Accordion, Avatar, AvatarGroup, BottomNav, Breadcrumbs, Calendar, DataTable, DescriptionList,
|
|
44
|
-
Disclosure, Footer, Image, Link, ListBox, Pagination, Rating, Stepper, TagGroup, Timeline, TopBar,
|
|
46
|
+
Disclosure, FlowGraph, Footer, Image, Link, ListBox, Pagination, Rating, Stepper, TagGroup, Timeline, TopBar,
|
|
45
47
|
});
|
|
46
48
|
//# sourceMappingURL=renderers-navigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderers-navigation.js","sourceRoot":"","sources":["../../src/common/renderers-navigation.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,8EAA8E;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAA;AAClE,O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AAyC,MAAM,qCAAqC,CAAA;AACrG,OAAO,EAAE,SAAS,EAA2C,MAAM,wCAAwC,CAAA;AAC3G,OAAO,EAAE,MAAM,EAA2D,MAAM,qCAAqC,CAAA;AACrH,OAAO,EAAE,MAAM,EAAqC,MAAM,qCAAqC,CAAA;AAC/F,OAAO,EAAE,MAAM,EAAE,cAAc,EAAqC,MAAM,mCAAmC,CAAA;AAC7G,OAAO,EAAE,KAAK,EAA+E,MAAM,kCAAkC,CAAA;AACrI,OAAO,EAAE,IAAI,EAAiC,MAAM,iCAAiC,CAAA;AACrF,OAAO,EAAE,MAAM,EAAoB,MAAM,mCAAmC,CAAA;AAE5E,gFAAgF;AAChF,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC;IACtD,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe;IAC5F,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM;CACtG,CAAC,CAAA"}
|
package/dist/common/styles.css
CHANGED
|
@@ -1275,7 +1275,8 @@
|
|
|
1275
1275
|
.starci-core-list-row-copy {
|
|
1276
1276
|
display: flex;
|
|
1277
1277
|
min-width: 0;
|
|
1278
|
-
flex:
|
|
1278
|
+
/* Collapsed (flex) row: the copy keeps at least 12rem before the actions wrap under it (0.9.4). */
|
|
1279
|
+
flex: 1 1 12rem;
|
|
1279
1280
|
flex-direction: column;
|
|
1280
1281
|
gap: var(--starci-core-copy-gap, 0.25rem);
|
|
1281
1282
|
}
|
|
@@ -1311,12 +1312,19 @@
|
|
|
1311
1312
|
|
|
1312
1313
|
.starci-core-list-row-actions {
|
|
1313
1314
|
display: flex;
|
|
1314
|
-
|
|
1315
|
+
/* Stays at the end of the copy line while leading + 12rem copy + actions fit; wraps only when they do not (0.9.4). */
|
|
1316
|
+
flex: 0 1 auto;
|
|
1315
1317
|
flex-wrap: wrap;
|
|
1316
1318
|
align-items: center;
|
|
1317
1319
|
gap: var(--grammar-inline-gap, 0.5rem);
|
|
1318
1320
|
}
|
|
1319
1321
|
|
|
1322
|
+
/* Skeleton row (knowledge STATE-8): the copy lines take a share of the row, the action keeps a button footprint. */
|
|
1323
|
+
.starci-core-list-row[data-grammar-skeleton="true"] .starci-core-list-row-name { flex: 0 1 55%; }
|
|
1324
|
+
.starci-core-list-row[data-grammar-skeleton="true"] .starci-core-list-row-description { inline-size: 85%; }
|
|
1325
|
+
.starci-core-list-row-skeleton-action { display: block; inline-size: 4.5rem; block-size: 2rem; }
|
|
1326
|
+
.starci-core-list-row-skeleton-action > .starci-core-skeleton { block-size: 100%; aspect-ratio: auto; border-radius: 0.5rem; }
|
|
1327
|
+
|
|
1320
1328
|
.starci-core-list-row-detail {
|
|
1321
1329
|
display: flex;
|
|
1322
1330
|
min-width: 0;
|
|
@@ -2740,11 +2748,6 @@
|
|
|
2740
2748
|
}
|
|
2741
2749
|
|
|
2742
2750
|
/* Region, List, ListItem: semantic page structure that draws nothing of its own. */
|
|
2743
|
-
.starci-core-region {
|
|
2744
|
-
display: block;
|
|
2745
|
-
min-width: 0;
|
|
2746
|
-
}
|
|
2747
|
-
|
|
2748
2751
|
.starci-core-region[data-grammar-region-spacing="spaced"] {
|
|
2749
2752
|
padding-block-end: 2rem;
|
|
2750
2753
|
}
|
|
@@ -2765,22 +2768,6 @@
|
|
|
2765
2768
|
overflow-x: auto;
|
|
2766
2769
|
}
|
|
2767
2770
|
|
|
2768
|
-
.starci-core-semantic-list {
|
|
2769
|
-
display: flex;
|
|
2770
|
-
flex-direction: column;
|
|
2771
|
-
gap: 0;
|
|
2772
|
-
margin: 0;
|
|
2773
|
-
padding: 0;
|
|
2774
|
-
list-style: none;
|
|
2775
|
-
}
|
|
2776
|
-
|
|
2777
|
-
.starci-core-semantic-list-item {
|
|
2778
|
-
display: block;
|
|
2779
|
-
min-width: 0;
|
|
2780
|
-
margin: 0;
|
|
2781
|
-
padding: 0;
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
2771
|
/* The unlabelled hairline (0.6.0): BOUNDARY-1, one pixel of --separator across its container, no margin. */
|
|
2785
2772
|
.starci-core-divider-bare {
|
|
2786
2773
|
display: block;
|
|
@@ -3536,3 +3523,30 @@
|
|
|
3536
3523
|
.starci-core-mention-description { font-size: 0.75rem; color: var(--muted, GrayText); }
|
|
3537
3524
|
}
|
|
3538
3525
|
|
|
3526
|
+
/*
|
|
3527
|
+
* Element resets of the semantic structure primitives (0.9.4). They live in Tailwind's `base` layer, which a host declares before
|
|
3528
|
+
* `utilities`, so a className the app passes for layout (`flex`, `gap-3`, `py-3`, `grid`) wins over them; without one, the default
|
|
3529
|
+
* shape is unchanged. A host without Tailwind simply gets a `base` layer.
|
|
3530
|
+
*/
|
|
3531
|
+
@layer base {
|
|
3532
|
+
.starci-core-semantic-list {
|
|
3533
|
+
display: flex;
|
|
3534
|
+
flex-direction: column;
|
|
3535
|
+
gap: 0;
|
|
3536
|
+
margin: 0;
|
|
3537
|
+
padding: 0;
|
|
3538
|
+
list-style: none;
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
.starci-core-semantic-list-item {
|
|
3542
|
+
display: block;
|
|
3543
|
+
min-width: 0;
|
|
3544
|
+
margin: 0;
|
|
3545
|
+
padding: 0;
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
.starci-core-region {
|
|
3549
|
+
display: block;
|
|
3550
|
+
min-width: 0;
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
@@ -30,8 +30,13 @@ export type DataTableProps<Row extends DataTableRow> = {
|
|
|
30
30
|
/** App-owned accessible names of the selection checkboxes in multiple mode. */
|
|
31
31
|
readonly selectAllLabel?: string;
|
|
32
32
|
readonly selectRowLabel?: (row: Row) => string;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Marks the table busy and replaces the rows (knowledge STATE-8). With no `loadingContent` the real column headers stay
|
|
35
|
+
* and the body draws `loadingRows` skeleton rows; `loadingContent` replaces the body with that content instead.
|
|
36
|
+
*/
|
|
34
37
|
readonly isLoading?: boolean;
|
|
38
|
+
/** Skeleton rows drawn while loading without `loadingContent` (default 3, 1 to 12). */
|
|
39
|
+
readonly loadingRows?: number;
|
|
35
40
|
readonly loadingContent?: ReactNode;
|
|
36
41
|
/** Shown when there are no rows and the table is not loading. */
|
|
37
42
|
readonly emptyContent: ReactNode;
|
|
@@ -48,5 +53,5 @@ export type DataTableProps<Row extends DataTableRow> = {
|
|
|
48
53
|
* horizontal scroll so a wide table never widens a 360px page.
|
|
49
54
|
* Contract: scroll LAYOUT-3, grid FOCUS-2 CONTROL-STATE-3, row FOCUS-1, empty STATE-3.
|
|
50
55
|
*/
|
|
51
|
-
export declare const DataTable: <Row extends DataTableRow>({ label, columns, rows, renderCell, sort, onSortChange, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading, loadingContent, emptyContent, stickyHeader, maxBlockSize, onRowAction, className, }: DataTableProps<Row>) => import("react").JSX.Element;
|
|
56
|
+
export declare const DataTable: <Row extends DataTableRow>({ label, columns, rows, renderCell, sort, onSortChange, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading, loadingContent, loadingRows, emptyContent, stickyHeader, maxBlockSize, onRowAction, className, }: DataTableProps<Row>) => import("react").JSX.Element;
|
|
52
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/DataTable/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/DataTable/index.tsx"],"names":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IACpD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;IAC3D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,KAAK,KAAK,IAAI,CAAA;IACzE,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAA;IAC9C;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,uFAAuF;IACvF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAA;IACnC,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAA;IAChC,mFAAmF;IACnF,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AA8BD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,GAAG,SAAS,YAAY,EAAE,wQAqBjD,cAAc,CAAC,GAAG,CAAC,gCAsGrB,CAAA"}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Checkbox as HeroCheckbox, Table as HeroTable } from "@heroui/react";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
+
import { Skeleton } from "../../primitive/Skeleton/index.js";
|
|
5
6
|
import { navigationClassName } from "../../navigationClassNames.js";
|
|
7
|
+
/** The row primitive filters aria-hidden out of its props, so the skeleton rows take it by ref (knowledge STATE-8). */
|
|
8
|
+
const hideFromAssistiveTechnology = (node) => node?.setAttribute("aria-hidden", "true");
|
|
6
9
|
const SELECTION_COLUMN = "starci-data-table-selection";
|
|
7
10
|
const toSortDescriptor = (sort) => ({ column: sort.columnId, direction: sort.direction });
|
|
8
11
|
const toIds = (selection) => selection === "all" ? "all" : [...selection].map(String);
|
|
@@ -20,17 +23,19 @@ const SelectionCheckbox = ({ label }) => (_jsx(HeroCheckbox, { className: "starc
|
|
|
20
23
|
* horizontal scroll so a wide table never widens a 360px page.
|
|
21
24
|
* Contract: scroll LAYOUT-3, grid FOCUS-2 CONTROL-STATE-3, row FOCUS-1, empty STATE-3.
|
|
22
25
|
*/
|
|
23
|
-
export const DataTable = ({ label, columns, rows, renderCell, sort, onSortChange, selectionMode = "none", selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading = false, loadingContent, emptyContent, stickyHeader = false, maxBlockSize, onRowAction, className, }) => {
|
|
26
|
+
export const DataTable = ({ label, columns, rows, renderCell, sort, onSortChange, selectionMode = "none", selectedIds, defaultSelectedIds, onSelectionChange, selectAllLabel, selectRowLabel, isLoading = false, loadingContent, loadingRows = 3, emptyContent, stickyHeader = false, maxBlockSize, onRowAction, className, }) => {
|
|
24
27
|
const rowHeaderId = columns.find((column) => column.isRowHeader)?.id ?? columns[0]?.id;
|
|
25
28
|
const multiple = selectionMode === "multiple";
|
|
26
29
|
// Selection is always held here so every row can expose its own `data-grammar-selected`.
|
|
27
30
|
const [uncontrolledSelection, setUncontrolledSelection] = useState(defaultSelectedIds ?? []);
|
|
28
31
|
const selection = selectedIds ?? uncontrolledSelection;
|
|
29
32
|
const isRowSelected = (id) => selection === "all" || selection.includes(id);
|
|
33
|
+
const isSkeleton = isLoading && loadingContent === undefined;
|
|
34
|
+
const skeletonRows = isSkeleton ? Array.from({ length: Math.min(12, Math.max(1, Math.floor(Number.isFinite(loadingRows) ? loadingRows : 3))) }, (_, index) => ({ id: `starci-skeleton-${index}` })) : [];
|
|
30
35
|
const visibleRows = isLoading ? [] : rows;
|
|
31
36
|
const state = isLoading ? "loading" : rows.length === 0 ? "empty" : "ready";
|
|
32
37
|
const scrollStyle = maxBlockSize === undefined ? undefined : { "--starci-core-data-table-max-block-size": maxBlockSize };
|
|
33
|
-
return (_jsx(HeroTable, { "aria-busy": isLoading || undefined, className: navigationClassName("starci-core-data-table", className), "data-component": "DataTable", "data-tier": "branch", "data-grammar-table-state": state, "data-grammar-table-sticky": stickyHeader ? "true" : "false", "data-grammar-table-bounded": maxBlockSize === undefined ? "false" : "true", children: _jsx(HeroTable.ScrollContainer, { className: "starci-core-data-table-scroll", "data-contract": "LAYOUT-3", "data-grammar-table-scroll": "true", style: scrollStyle, children: _jsxs(HeroTable.Content, { "aria-label": label, className: "starci-core-data-table-content", "data-contract": "FOCUS-2 CONTROL-STATE-3", selectionMode: selectionMode, ...(sort === undefined ? {} : { sortDescriptor: toSortDescriptor(sort) }), ...(onSortChange === undefined ? {} : {
|
|
38
|
+
return (_jsx(HeroTable, { "aria-busy": isLoading || undefined, className: navigationClassName("starci-core-data-table", className), "data-component": "DataTable", "data-tier": "branch", "data-grammar-table-state": state, "data-grammar-table-sticky": stickyHeader ? "true" : "false", "data-grammar-table-bounded": maxBlockSize === undefined ? "false" : "true", children: _jsx(HeroTable.ScrollContainer, { className: "starci-core-data-table-scroll", "data-contract": "LAYOUT-3", "data-grammar-table-scroll": "true", style: scrollStyle, children: _jsxs(HeroTable.Content, { "aria-label": label, className: "starci-core-data-table-content", "data-contract": "FOCUS-2 CONTROL-STATE-3", selectionMode: isSkeleton ? "none" : selectionMode, ...(sort === undefined ? {} : { sortDescriptor: toSortDescriptor(sort) }), ...(onSortChange === undefined ? {} : {
|
|
34
39
|
onSortChange: (descriptor) => onSortChange({ columnId: String(descriptor.column), direction: descriptor.direction }),
|
|
35
40
|
}), selectedKeys: toSelection(selection), onSelectionChange: (next) => {
|
|
36
41
|
const ids = toIds(next);
|
|
@@ -39,8 +44,8 @@ export const DataTable = ({ label, columns, rows, renderCell, sort, onSortChange
|
|
|
39
44
|
onSelectionChange?.(ids);
|
|
40
45
|
}, ...(onRowAction === undefined ? {} : { onRowAction: (key) => onRowAction(String(key)) }), children: [_jsxs(HeroTable.Header, { className: "starci-core-data-table-header", children: [multiple ? (_jsx(HeroTable.Column, { className: "starci-core-data-table-column", "data-grammar-table-selection": "true", id: SELECTION_COLUMN, children: _jsx(SelectionCheckbox, { label: selectAllLabel }) })) : null, columns.map((column) => (_jsx(HeroTable.Column, { id: column.id, allowsSorting: column.allowsSorting === true, className: "starci-core-data-table-column", "data-grammar-table-align": column.align ?? "start", isRowHeader: column.id === rowHeaderId, textValue: column.label, children: ({ sortDirection }) => column.allowsSorting === true
|
|
41
46
|
? _jsx(HeroTable.SortableColumnHeader, { className: "starci-core-data-table-sort", ...(sortDirection === undefined ? {} : { sortDirection }), children: column.label })
|
|
42
|
-
: column.label }, column.id)))] }),
|
|
47
|
+
: column.label }, column.id)))] }), _jsxs(HeroTable.Body, { className: "starci-core-data-table-body", renderEmptyState: () => isLoading
|
|
43
48
|
? _jsx("div", { className: "starci-core-data-table-placeholder", "data-grammar-table-loading": "true", role: "status", children: loadingContent })
|
|
44
|
-
: _jsx("div", { className: "starci-core-data-table-placeholder", "data-contract": "STATE-3", "data-grammar-table-empty": "true", children: emptyContent }), children: visibleRows.map((row) => (_jsxs(HeroTable.Row, { id: row.id, className: "starci-core-data-table-row", "data-contract": "FOCUS-1", "data-grammar-table-row": "true", "data-grammar-selected": selectionMode !== "none" && isRowSelected(row.id) ? "true" : "false", children: [multiple ? (_jsx(HeroTable.Cell, { className: "starci-core-data-table-cell", "data-grammar-table-selection": "true", children: _jsx(SelectionCheckbox, { label: selectRowLabel?.(row) }) })) : null, columns.map((column) => (_jsx(HeroTable.Cell, { className: "starci-core-data-table-cell", "data-grammar-table-align": column.align ?? "start", children: renderCell(row, column.id) }, column.id)))] }, row.id))) })] }) }) }));
|
|
49
|
+
: _jsx("div", { className: "starci-core-data-table-placeholder", "data-contract": "STATE-3", "data-grammar-table-empty": "true", children: emptyContent }), children: [skeletonRows.map((row) => (_jsxs(HeroTable.Row, { id: row.id, ref: hideFromAssistiveTechnology, className: "starci-core-data-table-row", "data-grammar-table-row": "true", "data-grammar-skeleton": "true", "data-grammar-selected": "false", children: [multiple ? _jsx(HeroTable.Cell, { className: "starci-core-data-table-cell", "data-grammar-table-selection": "true", children: null }) : null, columns.map((column) => (_jsx(HeroTable.Cell, { className: "starci-core-data-table-cell", "data-grammar-table-align": column.align ?? "start", children: _jsx(Skeleton, { shape: "text" }) }, column.id)))] }, row.id))), visibleRows.map((row) => (_jsxs(HeroTable.Row, { id: row.id, className: "starci-core-data-table-row", "data-contract": "FOCUS-1", "data-grammar-table-row": "true", "data-grammar-selected": selectionMode !== "none" && isRowSelected(row.id) ? "true" : "false", children: [multiple ? (_jsx(HeroTable.Cell, { className: "starci-core-data-table-cell", "data-grammar-table-selection": "true", children: _jsx(SelectionCheckbox, { label: selectRowLabel?.(row) }) })) : null, columns.map((column) => (_jsx(HeroTable.Cell, { className: "starci-core-data-table-cell", "data-grammar-table-align": column.align ?? "start", children: renderCell(row, column.id) }, column.id)))] }, row.id)))] })] }) }) }));
|
|
45
50
|
};
|
|
46
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/DataTable/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,KAAK,IAAI,SAAS,EAAuC,MAAM,eAAe,CAAA;AACjH,OAAO,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch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iB,SAAS,EAAC,6BAA6B,8BAA2B,MAAM,CAAC,KAAK,IAAI,OAAO,YAAE,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,GAAG,IAA/H,MAAM,CAAC,EAAE,CAAuI,CACxK,CAAC,KAJc,GAAG,CAAC,EAAE,CAKV,CACnB,CAAC,EACD,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACtB,MAAC,SAAS,CAAC,GAAG,IAEV,EAAE,EAAE,GAAG,CAAC,EAAE,EACV,SAAS,EAAC,4BAA4B,mBACxB,SAAS,4BACA,MAAM,2BACN,aAAa,KAAK,MAAM,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,aAE1F,QAAQ,CAAC,CAAC,CAAC,CACJ,KAAC,SAAS,CAAC,IAAI,IAAC,SAAS,EAAC,6BAA6B,kCAA8B,MAAM,YACvF,KAAC,iBAAiB,IAAC,KAAK,EAAE,cAAc,EAAE,CAAC,GAAG,CAAC,GAAI,GACtC,CACpB,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACrB,KAAC,SAAS,CAAC,IAAI,IAAiB,SAAS,EAAC,6BAA6B,8BAA2B,MAAM,CAAC,KAAK,IAAI,OAAO,YACpH,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC,IADV,MAAM,CAAC,EAAE,CAEb,CACpB,CAAC,KAhBD,GAAG,CAAC,EAAE,CAiBC,CACnB,CAAC,IACW,IACD,GACI,GACpB,CACf,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { FlowGraphEdge, FlowGraphHeight, FlowGraphLayout, FlowGraphNode } from "./types.js";
|
|
2
|
+
export { radialPositions } from "./layout.js";
|
|
3
|
+
export type { FlowGraphEdge, FlowGraphHeight, FlowGraphLayout, FlowGraphNode, FlowGraphNodeSize, FlowGraphTone } from "./types.js";
|
|
4
|
+
export type FlowGraphProps = {
|
|
5
|
+
/** Names the graph for assistive technology, e.g. "Second brain". */
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly nodes: ReadonlyArray<FlowGraphNode>;
|
|
8
|
+
readonly edges: ReadonlyArray<FlowGraphEdge>;
|
|
9
|
+
/** The selected node. Pass it (with `onSelect`) to control selection; leave it out and the graph keeps its own. */
|
|
10
|
+
readonly selectedId?: string | null;
|
|
11
|
+
/** Fires with the node id on click, Enter or Space, and with `null` when the empty canvas is clicked or Escape is pressed. */
|
|
12
|
+
readonly onSelect?: (id: string | null) => void;
|
|
13
|
+
/** Fixed canvas height: 16rem, 24rem or 32rem. */
|
|
14
|
+
readonly height?: FlowGraphHeight;
|
|
15
|
+
/** Pan and zoom. `false` draws a static picture. */
|
|
16
|
+
readonly isInteractive?: boolean;
|
|
17
|
+
/** Zoom buttons. Defaults to on while the graph is interactive. */
|
|
18
|
+
readonly showControls?: boolean;
|
|
19
|
+
/** `radial` places the nodes itself; `manual` uses each node's `position`. */
|
|
20
|
+
readonly layout?: FlowGraphLayout;
|
|
21
|
+
/** Shown instead of the canvas when there are no nodes. */
|
|
22
|
+
readonly emptyLabel?: string;
|
|
23
|
+
/** Unresolved graph (knowledge STATE-8): the frame at its height with a Skeleton block, no React Flow mounted, `aria-busy`. */
|
|
24
|
+
readonly isLoading?: boolean;
|
|
25
|
+
readonly className?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A node-and-edge map drawn with React Flow (`@xyflow/react`, a peer dependency) in grammar tokens. The radial layout
|
|
29
|
+
* puts the root in the centre with its children on a ring and their children on an outer ring around them. Nodes are
|
|
30
|
+
* keyboard focusable (Tab) and selectable with Enter or Space; a visually hidden list repeats the nodes for screen readers.
|
|
31
|
+
* Contract: focus FOCUS-2, selection CONTROL-STATE-3, empty STATE-3.
|
|
32
|
+
*/
|
|
33
|
+
export declare const FlowGraph: ({ label, nodes, edges, selectedId, onSelect, height, isInteractive, showControls, layout, emptyLabel, isLoading, className, }: FlowGraphProps) => import("react").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|