@kanzo-tech/ui 0.9.0 → 0.11.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.
- package/README.md +1 -1
- package/dist/charts/chart-marks.d.ts +1 -2
- package/dist/charts/chart-marks.d.ts.map +1 -1
- package/dist/charts/chart-marks.js.map +1 -1
- package/dist/charts/chart-stat.d.ts +12 -10
- package/dist/charts/chart-stat.d.ts.map +1 -1
- package/dist/charts/chart-stat.js +21 -16
- package/dist/charts/chart-stat.js.map +1 -1
- package/dist/guard-corpus.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +312 -295
- package/dist/index.js.map +1 -1
- package/dist/layouts/empty.d.ts +54 -0
- package/dist/layouts/empty.d.ts.map +1 -0
- package/dist/layouts/empty.js +99 -0
- package/dist/layouts/empty.js.map +1 -0
- package/dist/layouts/gated.d.ts +24 -0
- package/dist/layouts/gated.d.ts.map +1 -0
- package/dist/layouts/gated.js +46 -0
- package/dist/layouts/gated.js.map +1 -0
- package/dist/layouts/section.d.ts +30 -5
- package/dist/layouts/section.d.ts.map +1 -1
- package/dist/layouts/section.js +71 -53
- package/dist/layouts/section.js.map +1 -1
- package/dist/simples/field.d.ts +7 -1
- package/dist/simples/field.d.ts.map +1 -1
- package/dist/simples/field.js +55 -47
- package/dist/simples/field.js.map +1 -1
- package/dist/simples/floating-panel.js +1 -1
- package/dist/simples/floating-panel.js.map +1 -1
- package/dist/simples/stat.d.ts +45 -0
- package/dist/simples/stat.d.ts.map +1 -0
- package/dist/simples/stat.js +155 -0
- package/dist/simples/stat.js.map +1 -0
- package/dist/table/actions-column.d.ts +20 -0
- package/dist/table/actions-column.d.ts.map +1 -0
- package/dist/table/actions-column.js +38 -0
- package/dist/table/actions-column.js.map +1 -0
- package/dist/table/data-table-content.d.ts.map +1 -1
- package/dist/table/data-table-content.js +31 -20
- package/dist/table/data-table-content.js.map +1 -1
- package/dist/table.d.ts +2 -0
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +13 -11
- package/dist/table.js.map +1 -1
- package/package.json +6 -6
- package/dist/simples/stat-tile.d.ts +0 -31
- package/dist/simples/stat-tile.d.ts.map +0 -1
- package/dist/simples/stat-tile.js +0 -64
- package/dist/simples/stat-tile.js.map +0 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ entry:
|
|
|
40
40
|
| `@kanzo-tech/ui` | none beyond React and `lucide-react` |
|
|
41
41
|
| `@kanzo-tech/ui/editor` | `@codemirror/*` |
|
|
42
42
|
| `@kanzo-tech/ui/table` | `@tanstack/react-table` |
|
|
43
|
-
| `@kanzo-tech/ui/analytics` | `@uwdata/vgplot`, `@uwdata/mosaic
|
|
43
|
+
| `@kanzo-tech/ui/analytics` | `@uwdata/vgplot`, `@uwdata/mosaic-*` |
|
|
44
44
|
|
|
45
45
|
## Theming
|
|
46
46
|
|
|
@@ -19,8 +19,7 @@ import { ChartDescriptor } from './chart-spec.js';
|
|
|
19
19
|
*
|
|
20
20
|
* So the trap is real and it belongs to a CONSUMER who writes a chart in a Server Component: the
|
|
21
21
|
* marks vanish and the plot renders empty, with no error anywhere. Nothing catches that today —
|
|
22
|
-
* `client-boundary.test.ts` matches shape and this file's shape is pure,
|
|
23
|
-
* built bytes against source, and the docs RSC build only exercises the client path our own
|
|
22
|
+
* `client-boundary.test.ts` matches shape and this file's shape is pure, and the docs RSC build only exercises the client path our own
|
|
24
23
|
* examples take. Fixing it properly means either the directive plus an exception in that guard for
|
|
25
24
|
* descriptor modules, or a check that a `chartDescriptor` element type survives the boundary. Both
|
|
26
25
|
* are decisions rather than edits, so this says what is true instead of pretending it is handled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-marks.d.ts","sourceRoot":"","sources":["../../src/charts/chart-marks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAEL,KAA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,eAAO,MAAM,QAAQ,gCAIpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-marks.js","sources":["../../src/charts/chart-marks.tsx"],"sourcesContent":["import type { Selection } from \"@uwdata/mosaic-core\";\nimport { isColorToken, isColorValue } from \"./chart-config.js\";\nimport {\n chartDescriptor,\n type ChartDescriptor,\n type ChartMarkDirective,\n type ChartMarkSource,\n type ChartSpecContext,\n} from \"./chart-spec.js\";\n\n/**\n * The mark vocabulary. Every component here renders `null` — `ChartRoot` reads the `__chart`\n * static off the element type and compiles it.\n *\n * This file carries no `\"use client\"`, and the docblock claimed the opposite for as long as it\n * existed: \"load-bearing even though nothing here uses a hook\". The rule the repo actually\n * enforces is in `client-boundary.test.ts` — a file declares the directive **iff it is itself\n * stateful** — and nothing here is, so the guard would reject it. The claim and the code were\n * never both true.\n *\n * What the claim got right is the mechanism, and it is worth keeping: a descriptor rendered on the\n * server DOES collapse to `null` before `ChartRoot` sees the element, because the `__chart` static\n * lives on the element *type* and a Server Component is invoked before serialisation. What it got\n * wrong is what prevents it. Not a directive here — the consumer. Every chart is written inside a\n * client component, necessarily: `MosaicProvider` is one, and there is no coordinator without it.\n * All 38 chart examples in `docs/examples` open with `\"use client\"`.\n *\n * So the trap is real and it belongs to a CONSUMER who writes a chart in a Server Component: the\n * marks vanish and the plot renders empty, with no error anywhere. Nothing catches that today —\n * `client-boundary.test.ts` matches shape and this file's shape is pure, `pnpm smoke` compares\n * built bytes against source, and the docs RSC build only exercises the client path our own\n * examples take. Fixing it properly means either the directive plus an exception in that guard for\n * descriptor modules, or a check that a `chartDescriptor` element type survives the boundary. Both\n * are decisions rather than edits, so this says what is true instead of pretending it is handled.\n */\n\nexport interface ChartMarkProps {\n /**\n * The selection this mark filters by. Defaults to `ChartRoot`'s; `null` draws the full relation\n * — the dimmed background layer of a crossfilter pair.\n */\n filterBy?: Selection | null;\n /**\n * A different relation for this mark alone. The root's `table` is the default, which is right\n * until a plot needs two — a node-link view draws nodes from one relation and edges from\n * another, and both still filter by the same selection.\n */\n table?: string;\n /** Literal rows instead of the root's table. */\n data?: readonly unknown[];\n /** Positions a rule/tick without a table: `at={0}` is the zero line. */\n at?: unknown;\n /** Observable Plot's per-mark hover tooltip. */\n tip?: boolean;\n x?: unknown;\n y?: unknown;\n z?: unknown;\n r?: unknown;\n /** Facet the plot horizontally by this column — one panel per distinct value. */\n fx?: unknown;\n /** Facet the plot vertically by this column. */\n fy?: unknown;\n /** A column name, or a colour — `var(--chart-1)` / `--primary` tokens are resolved for Plot. */\n fill?: unknown;\n /** A column name, or a colour; tokens are resolved the same way. */\n stroke?: unknown;\n opacity?: unknown;\n fillOpacity?: unknown;\n strokeOpacity?: unknown;\n strokeWidth?: unknown;\n sort?: unknown;\n reverse?: boolean;\n limit?: number;\n inset?: number;\n /** Any other vgplot / Observable Plot mark option. */\n [option: string]: unknown;\n}\n\n/** Only these two channels can hold a colour; everything else keeps its column name. */\nconst COLOR_CHANNELS = [\"fill\", \"stroke\"] as const;\n\n/**\n * Marks that stack, and therefore need a series key.\n *\n * In Observable Plot `z` defaults to `fill`, so a stacked bar coloured by a column just works.\n * Through Mosaic it does not: the fill arrives as `{ value, scale: \"color\" }`, `maybeZ` cannot\n * pull a series name out of that object, and `stackY` silently stacks every row on the previous\n * one — a chart that renders, looks plausible and is wrong, which is worse than one that throws.\n * So we restore Plot's own default: a column-valued `fill`/`stroke` becomes `z` unless the caller\n * set one. `z={null}` opts out (Plot's own way of saying \"do not group\").\n */\nconst STACKING_MARKS = new Set([\n \"barY\", \"barX\", \"areaY\", \"areaX\", \"area\", \"rectY\", \"rectX\", \"rect\", \"waffleY\", \"waffleX\",\n]);\n\nfunction markSource(props: ChartMarkProps, ctx: ChartSpecContext, decorator: boolean): ChartMarkSource {\n if (decorator) return null;\n if (props.data !== undefined) return { kind: \"values\", values: props.data };\n if (props.at !== undefined) return { kind: \"values\", values: Array.isArray(props.at) ? props.at : [props.at] };\n const table = props.table ?? ctx.table;\n if (table === undefined) return { kind: \"values\", values: [{}] };\n return {\n kind: \"table\",\n table,\n filterBy: props.filterBy === undefined ? ctx.filterBy : props.filterBy,\n };\n}\n\nfunction markDirective(mark: string, props: ChartMarkProps, ctx: ChartSpecContext, decorator: boolean): ChartMarkDirective {\n const channels: Record<string, unknown> = { ...props };\n // `filterBy` / `data` / `at` are our sugar; they choose the source, they are never mark options.\n delete channels.filterBy;\n delete channels.data;\n delete channels.at;\n delete channels.table;\n // Read the series key before the colour channels are resolved to `rgb(...)` strings.\n if (STACKING_MARKS.has(mark) && !(\"z\" in channels)) {\n const series = [channels.fill, channels.stroke].find(\n (v) => typeof v === \"string\" && !isColorValue(v),\n );\n if (series !== undefined) channels.z = series;\n }\n for (const channel of COLOR_CHANNELS) {\n const value = channels[channel];\n // `fill=\"host\"` is the *column* host; only a token reference is a colour we must resolve.\n if (typeof value === \"string\" && isColorToken(value)) channels[channel] = ctx.resolveColor(value);\n }\n return { kind: \"mark\", mark, source: markSource(props, ctx, decorator), options: channels };\n}\n\nfunction mark(displayName: string, type: string, decorator = false): ChartDescriptor<ChartMarkProps> {\n return chartDescriptor<ChartMarkProps>(displayName, (props, ctx) => markDirective(type, props, ctx, decorator));\n}\n\nexport const ChartBarY = mark(\"ChartBarY\", \"barY\");\nexport const ChartBarX = mark(\"ChartBarX\", \"barX\");\nexport const ChartWaffleY = mark(\"ChartWaffleY\", \"waffleY\");\nexport const ChartWaffleX = mark(\"ChartWaffleX\", \"waffleX\");\n\nexport const ChartLine = mark(\"ChartLine\", \"line\");\nexport const ChartLineY = mark(\"ChartLineY\", \"lineY\");\nexport const ChartLineX = mark(\"ChartLineX\", \"lineX\");\nexport const ChartArea = mark(\"ChartArea\", \"area\");\nexport const ChartAreaY = mark(\"ChartAreaY\", \"areaY\");\nexport const ChartAreaX = mark(\"ChartAreaX\", \"areaX\");\n\nexport const ChartDot = mark(\"ChartDot\", \"dot\");\nexport const ChartDotX = mark(\"ChartDotX\", \"dotX\");\nexport const ChartDotY = mark(\"ChartDotY\", \"dotY\");\nexport const ChartCircle = mark(\"ChartCircle\", \"circle\");\nexport const ChartHexagon = mark(\"ChartHexagon\", \"hexagon\");\nexport const ChartImage = mark(\"ChartImage\", \"image\");\n\nexport const ChartRect = mark(\"ChartRect\", \"rect\");\nexport const ChartRectY = mark(\"ChartRectY\", \"rectY\");\nexport const ChartRectX = mark(\"ChartRectX\", \"rectX\");\nexport const ChartCell = mark(\"ChartCell\", \"cell\");\nexport const ChartCellX = mark(\"ChartCellX\", \"cellX\");\nexport const ChartCellY = mark(\"ChartCellY\", \"cellY\");\n\nexport const ChartRuleY = mark(\"ChartRuleY\", \"ruleY\");\nexport const ChartRuleX = mark(\"ChartRuleX\", \"ruleX\");\nexport const ChartTickX = mark(\"ChartTickX\", \"tickX\");\nexport const ChartTickY = mark(\"ChartTickY\", \"tickY\");\nexport const ChartText = mark(\"ChartText\", \"text\");\nexport const ChartTextX = mark(\"ChartTextX\", \"textX\");\nexport const ChartTextY = mark(\"ChartTextY\", \"textY\");\n\nexport const ChartVector = mark(\"ChartVector\", \"vector\");\n// vgplot 0.29.2 builds this one with the mark type `vectoX`, which Observable Plot has no\n// function for. Wrapped for symmetry; use `<ChartVector>` until upstream fixes the typo.\nexport const ChartVectorX = mark(\"ChartVectorX\", \"vectorX\");\nexport const ChartVectorY = mark(\"ChartVectorY\", \"vectorY\");\nexport const ChartSpike = mark(\"ChartSpike\", \"spike\");\nexport const ChartArrow = mark(\"ChartArrow\", \"arrow\");\nexport const ChartLink = mark(\"ChartLink\", \"link\");\n\nexport const ChartHeatmap = mark(\"ChartHeatmap\", \"heatmap\");\nexport const ChartRaster = mark(\"ChartRaster\", \"raster\");\nexport const ChartRasterTile = mark(\"ChartRasterTile\", \"rasterTile\");\nexport const ChartContour = mark(\"ChartContour\", \"contour\");\nexport const ChartDenseLine = mark(\"ChartDenseLine\", \"denseLine\");\nexport const ChartDensity = mark(\"ChartDensity\", \"density\");\nexport const ChartDensityY = mark(\"ChartDensityY\", \"densityY\");\nexport const ChartDensityX = mark(\"ChartDensityX\", \"densityX\");\nexport const ChartHexbin = mark(\"ChartHexbin\", \"hexbin\");\nexport const ChartRegressionY = mark(\"ChartRegressionY\", \"regressionY\");\nexport const ChartErrorbarY = mark(\"ChartErrorbarY\", \"errorbarY\");\nexport const ChartErrorbarX = mark(\"ChartErrorbarX\", \"errorbarX\");\n\nexport const ChartVoronoi = mark(\"ChartVoronoi\", \"voronoi\");\nexport const ChartVoronoiMesh = mark(\"ChartVoronoiMesh\", \"voronoiMesh\");\nexport const ChartDelaunayLink = mark(\"ChartDelaunayLink\", \"delaunayLink\");\nexport const ChartDelaunayMesh = mark(\"ChartDelaunayMesh\", \"delaunayMesh\");\nexport const ChartHull = mark(\"ChartHull\", \"hull\");\nexport const ChartGeo = mark(\"ChartGeo\", \"geo\");\n\n// Decorators: they draw the frame, not the data, so vgplot gives them options and no source.\nexport const ChartFrame = mark(\"ChartFrame\", \"frame\", true);\nexport const ChartGridX = mark(\"ChartGridX\", \"gridX\", true);\nexport const ChartGridY = mark(\"ChartGridY\", \"gridY\", true);\nexport const ChartHexgrid = mark(\"ChartHexgrid\", \"hexgrid\", true);\nexport const ChartSphere = mark(\"ChartSphere\", \"sphere\", true);\nexport const ChartGraticule = mark(\"ChartGraticule\", \"graticule\", true);\n\nexport interface ChartRawProps {\n /** A `vg.*` directive, or several — `vg.axisFx({ anchor: \"top\" })`. */\n spec: unknown;\n}\n\n/**\n * The escape hatch. The wrappers above cover vgplot's mark vocabulary, but not its ~250 attributes\n * nor the `axisX`/`axisFy` decorator marks the axis descriptors deliberately compile away from.\n * Anything unwrapped goes in here, in source order, with the same interactor-binding semantics as\n * a wrapped mark:\n *\n * ```tsx\n * <ChartRaw spec={vg.axisFy({ anchor: \"right\", tickRotate: 45 })} />\n * ```\n */\nexport const ChartRaw = chartDescriptor<ChartRawProps>(\"ChartRaw\", (props) =>\n Array.isArray(props.spec)\n ? props.spec.map((value: unknown) => ({ kind: \"raw\" as const, value }))\n : { kind: \"raw\", value: props.spec },\n);\n"],"names":["COLOR_CHANNELS","STACKING_MARKS","markSource","props","ctx","decorator","table","markDirective","mark","channels","series","v","isColorValue","channel","value","isColorToken","displayName","type","chartDescriptor","ChartBarY","ChartBarX","ChartWaffleY","ChartWaffleX","ChartLine","ChartLineY","ChartLineX","ChartArea","ChartAreaY","ChartAreaX","ChartDot","ChartDotX","ChartDotY","ChartCircle","ChartHexagon","ChartImage","ChartRect","ChartRectY","ChartRectX","ChartCell","ChartCellX","ChartCellY","ChartRuleY","ChartRuleX","ChartTickX","ChartTickY","ChartText","ChartTextX","ChartTextY","ChartVector","ChartVectorX","ChartVectorY","ChartSpike","ChartArrow","ChartLink","ChartHeatmap","ChartRaster","ChartRasterTile","ChartContour","ChartDenseLine","ChartDensity","ChartDensityY","ChartDensityX","ChartHexbin","ChartRegressionY","ChartErrorbarY","ChartErrorbarX","ChartVoronoi","ChartVoronoiMesh","ChartDelaunayLink","ChartDelaunayMesh","ChartHull","ChartGeo","ChartFrame","ChartGridX","ChartGridY","ChartHexgrid","ChartSphere","ChartGraticule","ChartRaw"],"mappings":";;AA+EA,MAAMA,IAAiB,CAAC,QAAQ,QAAQ,GAYlCC,wBAAqB,IAAI;AAAA,EAC7B;AAAA,EAAQ;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAW;AACjF,CAAC;AAED,SAASC,EAAWC,GAAuBC,GAAuBC,GAAqC;AACrG,MAAIA,EAAW,QAAO;AACtB,MAAIF,EAAM,SAAS,OAAW,QAAO,EAAE,MAAM,UAAU,QAAQA,EAAM,KAAA;AACrE,MAAIA,EAAM,OAAO,eAAkB,EAAE,MAAM,UAAU,QAAQ,MAAM,QAAQA,EAAM,EAAE,IAAIA,EAAM,KAAK,CAACA,EAAM,EAAE,EAAA;AAC3G,QAAMG,IAAQH,EAAM,SAASC,EAAI;AACjC,SAAI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oD,KAAgBpD,EAAK,iBAAiB,UAAU,GAChDqD,KAAgBrD,EAAK,iBAAiB,UAAU,GAChDsD,KAActD,EAAK,eAAe,QAAQ,GAC1CuD,KAAmBvD,EAAK,oBAAoB,aAAa,GACzDwD,KAAiBxD,EAAK,kBAAkB,WAAW,GACnDyD,KAAiBzD,EAAK,kBAAkB,WAAW,GAEnD0D,KAAe1D,EAAK,gBAAgB,SAAS,GAC7C2D,KAAmB3D,EAAK,oBAAoB,aAAa,GACzD4D,KAAoB5D,EAAK,qBAAqB,cAAc,GAC5D6D,KAAoB7D,EAAK,qBAAqB,cAAc,GAC5D8D,KAAY9D,EAAK,aAAa,MAAM,GACpC+D,KAAW/D,EAAK,YAAY,KAAK,GAGjCgE,KAAahE,EAAK,cAAc,SAAS,EAAI,GAC7CiE,KAAajE,EAAK,cAAc,SAAS,EAAI,GAC7CkE,KAAalE,EAAK,cAAc,SAAS,EAAI,GAC7CmE,KAAenE,EAAK,gBAAgB,WAAW,EAAI,GACnDoE,KAAcpE,EAAK,eAAe,UAAU,EAAI,GAChDqE,KAAiBrE,EAAK,kBAAkB,aAAa,EAAI,GAiBzDsE,KAAW5D;AAAA,EAA+B;AAAA,EAAY,CAACf,MAClE,MAAM,QAAQA,EAAM,IAAI,IACpBA,EAAM,KAAK,IAAI,CAACW,OAAoB,EAAE,MAAM,OAAgB,OAAAA,EAAA,EAAQ,IACpE,EAAE,MAAM,OAAO,OAAOX,EAAM,KAAA;AAClC;"}
|
|
1
|
+
{"version":3,"file":"chart-marks.js","sources":["../../src/charts/chart-marks.tsx"],"sourcesContent":["import type { Selection } from \"@uwdata/mosaic-core\";\nimport { isColorToken, isColorValue } from \"./chart-config.js\";\nimport {\n chartDescriptor,\n type ChartDescriptor,\n type ChartMarkDirective,\n type ChartMarkSource,\n type ChartSpecContext,\n} from \"./chart-spec.js\";\n\n/**\n * The mark vocabulary. Every component here renders `null` — `ChartRoot` reads the `__chart`\n * static off the element type and compiles it.\n *\n * This file carries no `\"use client\"`, and the docblock claimed the opposite for as long as it\n * existed: \"load-bearing even though nothing here uses a hook\". The rule the repo actually\n * enforces is in `client-boundary.test.ts` — a file declares the directive **iff it is itself\n * stateful** — and nothing here is, so the guard would reject it. The claim and the code were\n * never both true.\n *\n * What the claim got right is the mechanism, and it is worth keeping: a descriptor rendered on the\n * server DOES collapse to `null` before `ChartRoot` sees the element, because the `__chart` static\n * lives on the element *type* and a Server Component is invoked before serialisation. What it got\n * wrong is what prevents it. Not a directive here — the consumer. Every chart is written inside a\n * client component, necessarily: `MosaicProvider` is one, and there is no coordinator without it.\n * All 38 chart examples in `docs/examples` open with `\"use client\"`.\n *\n * So the trap is real and it belongs to a CONSUMER who writes a chart in a Server Component: the\n * marks vanish and the plot renders empty, with no error anywhere. Nothing catches that today —\n * `client-boundary.test.ts` matches shape and this file's shape is pure, and the docs RSC build only exercises the client path our own\n * examples take. Fixing it properly means either the directive plus an exception in that guard for\n * descriptor modules, or a check that a `chartDescriptor` element type survives the boundary. Both\n * are decisions rather than edits, so this says what is true instead of pretending it is handled.\n */\n\nexport interface ChartMarkProps {\n /**\n * The selection this mark filters by. Defaults to `ChartRoot`'s; `null` draws the full relation\n * — the dimmed background layer of a crossfilter pair.\n */\n filterBy?: Selection | null;\n /**\n * A different relation for this mark alone. The root's `table` is the default, which is right\n * until a plot needs two — a node-link view draws nodes from one relation and edges from\n * another, and both still filter by the same selection.\n */\n table?: string;\n /** Literal rows instead of the root's table. */\n data?: readonly unknown[];\n /** Positions a rule/tick without a table: `at={0}` is the zero line. */\n at?: unknown;\n /** Observable Plot's per-mark hover tooltip. */\n tip?: boolean;\n x?: unknown;\n y?: unknown;\n z?: unknown;\n r?: unknown;\n /** Facet the plot horizontally by this column — one panel per distinct value. */\n fx?: unknown;\n /** Facet the plot vertically by this column. */\n fy?: unknown;\n /** A column name, or a colour — `var(--chart-1)` / `--primary` tokens are resolved for Plot. */\n fill?: unknown;\n /** A column name, or a colour; tokens are resolved the same way. */\n stroke?: unknown;\n opacity?: unknown;\n fillOpacity?: unknown;\n strokeOpacity?: unknown;\n strokeWidth?: unknown;\n sort?: unknown;\n reverse?: boolean;\n limit?: number;\n inset?: number;\n /** Any other vgplot / Observable Plot mark option. */\n [option: string]: unknown;\n}\n\n/** Only these two channels can hold a colour; everything else keeps its column name. */\nconst COLOR_CHANNELS = [\"fill\", \"stroke\"] as const;\n\n/**\n * Marks that stack, and therefore need a series key.\n *\n * In Observable Plot `z` defaults to `fill`, so a stacked bar coloured by a column just works.\n * Through Mosaic it does not: the fill arrives as `{ value, scale: \"color\" }`, `maybeZ` cannot\n * pull a series name out of that object, and `stackY` silently stacks every row on the previous\n * one — a chart that renders, looks plausible and is wrong, which is worse than one that throws.\n * So we restore Plot's own default: a column-valued `fill`/`stroke` becomes `z` unless the caller\n * set one. `z={null}` opts out (Plot's own way of saying \"do not group\").\n */\nconst STACKING_MARKS = new Set([\n \"barY\", \"barX\", \"areaY\", \"areaX\", \"area\", \"rectY\", \"rectX\", \"rect\", \"waffleY\", \"waffleX\",\n]);\n\nfunction markSource(props: ChartMarkProps, ctx: ChartSpecContext, decorator: boolean): ChartMarkSource {\n if (decorator) return null;\n if (props.data !== undefined) return { kind: \"values\", values: props.data };\n if (props.at !== undefined) return { kind: \"values\", values: Array.isArray(props.at) ? props.at : [props.at] };\n const table = props.table ?? ctx.table;\n if (table === undefined) return { kind: \"values\", values: [{}] };\n return {\n kind: \"table\",\n table,\n filterBy: props.filterBy === undefined ? ctx.filterBy : props.filterBy,\n };\n}\n\nfunction markDirective(mark: string, props: ChartMarkProps, ctx: ChartSpecContext, decorator: boolean): ChartMarkDirective {\n const channels: Record<string, unknown> = { ...props };\n // `filterBy` / `data` / `at` are our sugar; they choose the source, they are never mark options.\n delete channels.filterBy;\n delete channels.data;\n delete channels.at;\n delete channels.table;\n // Read the series key before the colour channels are resolved to `rgb(...)` strings.\n if (STACKING_MARKS.has(mark) && !(\"z\" in channels)) {\n const series = [channels.fill, channels.stroke].find(\n (v) => typeof v === \"string\" && !isColorValue(v),\n );\n if (series !== undefined) channels.z = series;\n }\n for (const channel of COLOR_CHANNELS) {\n const value = channels[channel];\n // `fill=\"host\"` is the *column* host; only a token reference is a colour we must resolve.\n if (typeof value === \"string\" && isColorToken(value)) channels[channel] = ctx.resolveColor(value);\n }\n return { kind: \"mark\", mark, source: markSource(props, ctx, decorator), options: channels };\n}\n\nfunction mark(displayName: string, type: string, decorator = false): ChartDescriptor<ChartMarkProps> {\n return chartDescriptor<ChartMarkProps>(displayName, (props, ctx) => markDirective(type, props, ctx, decorator));\n}\n\nexport const ChartBarY = mark(\"ChartBarY\", \"barY\");\nexport const ChartBarX = mark(\"ChartBarX\", \"barX\");\nexport const ChartWaffleY = mark(\"ChartWaffleY\", \"waffleY\");\nexport const ChartWaffleX = mark(\"ChartWaffleX\", \"waffleX\");\n\nexport const ChartLine = mark(\"ChartLine\", \"line\");\nexport const ChartLineY = mark(\"ChartLineY\", \"lineY\");\nexport const ChartLineX = mark(\"ChartLineX\", \"lineX\");\nexport const ChartArea = mark(\"ChartArea\", \"area\");\nexport const ChartAreaY = mark(\"ChartAreaY\", \"areaY\");\nexport const ChartAreaX = mark(\"ChartAreaX\", \"areaX\");\n\nexport const ChartDot = mark(\"ChartDot\", \"dot\");\nexport const ChartDotX = mark(\"ChartDotX\", \"dotX\");\nexport const ChartDotY = mark(\"ChartDotY\", \"dotY\");\nexport const ChartCircle = mark(\"ChartCircle\", \"circle\");\nexport const ChartHexagon = mark(\"ChartHexagon\", \"hexagon\");\nexport const ChartImage = mark(\"ChartImage\", \"image\");\n\nexport const ChartRect = mark(\"ChartRect\", \"rect\");\nexport const ChartRectY = mark(\"ChartRectY\", \"rectY\");\nexport const ChartRectX = mark(\"ChartRectX\", \"rectX\");\nexport const ChartCell = mark(\"ChartCell\", \"cell\");\nexport const ChartCellX = mark(\"ChartCellX\", \"cellX\");\nexport const ChartCellY = mark(\"ChartCellY\", \"cellY\");\n\nexport const ChartRuleY = mark(\"ChartRuleY\", \"ruleY\");\nexport const ChartRuleX = mark(\"ChartRuleX\", \"ruleX\");\nexport const ChartTickX = mark(\"ChartTickX\", \"tickX\");\nexport const ChartTickY = mark(\"ChartTickY\", \"tickY\");\nexport const ChartText = mark(\"ChartText\", \"text\");\nexport const ChartTextX = mark(\"ChartTextX\", \"textX\");\nexport const ChartTextY = mark(\"ChartTextY\", \"textY\");\n\nexport const ChartVector = mark(\"ChartVector\", \"vector\");\n// vgplot 0.29.2 builds this one with the mark type `vectoX`, which Observable Plot has no\n// function for. Wrapped for symmetry; use `<ChartVector>` until upstream fixes the typo.\nexport const ChartVectorX = mark(\"ChartVectorX\", \"vectorX\");\nexport const ChartVectorY = mark(\"ChartVectorY\", \"vectorY\");\nexport const ChartSpike = mark(\"ChartSpike\", \"spike\");\nexport const ChartArrow = mark(\"ChartArrow\", \"arrow\");\nexport const ChartLink = mark(\"ChartLink\", \"link\");\n\nexport const ChartHeatmap = mark(\"ChartHeatmap\", \"heatmap\");\nexport const ChartRaster = mark(\"ChartRaster\", \"raster\");\nexport const ChartRasterTile = mark(\"ChartRasterTile\", \"rasterTile\");\nexport const ChartContour = mark(\"ChartContour\", \"contour\");\nexport const ChartDenseLine = mark(\"ChartDenseLine\", \"denseLine\");\nexport const ChartDensity = mark(\"ChartDensity\", \"density\");\nexport const ChartDensityY = mark(\"ChartDensityY\", \"densityY\");\nexport const ChartDensityX = mark(\"ChartDensityX\", \"densityX\");\nexport const ChartHexbin = mark(\"ChartHexbin\", \"hexbin\");\nexport const ChartRegressionY = mark(\"ChartRegressionY\", \"regressionY\");\nexport const ChartErrorbarY = mark(\"ChartErrorbarY\", \"errorbarY\");\nexport const ChartErrorbarX = mark(\"ChartErrorbarX\", \"errorbarX\");\n\nexport const ChartVoronoi = mark(\"ChartVoronoi\", \"voronoi\");\nexport const ChartVoronoiMesh = mark(\"ChartVoronoiMesh\", \"voronoiMesh\");\nexport const ChartDelaunayLink = mark(\"ChartDelaunayLink\", \"delaunayLink\");\nexport const ChartDelaunayMesh = mark(\"ChartDelaunayMesh\", \"delaunayMesh\");\nexport const ChartHull = mark(\"ChartHull\", \"hull\");\nexport const ChartGeo = mark(\"ChartGeo\", \"geo\");\n\n// Decorators: they draw the frame, not the data, so vgplot gives them options and no source.\nexport const ChartFrame = mark(\"ChartFrame\", \"frame\", true);\nexport const ChartGridX = mark(\"ChartGridX\", \"gridX\", true);\nexport const ChartGridY = mark(\"ChartGridY\", \"gridY\", true);\nexport const ChartHexgrid = mark(\"ChartHexgrid\", \"hexgrid\", true);\nexport const ChartSphere = mark(\"ChartSphere\", \"sphere\", true);\nexport const ChartGraticule = mark(\"ChartGraticule\", \"graticule\", true);\n\nexport interface ChartRawProps {\n /** A `vg.*` directive, or several — `vg.axisFx({ anchor: \"top\" })`. */\n spec: unknown;\n}\n\n/**\n * The escape hatch. The wrappers above cover vgplot's mark vocabulary, but not its ~250 attributes\n * nor the `axisX`/`axisFy` decorator marks the axis descriptors deliberately compile away from.\n * Anything unwrapped goes in here, in source order, with the same interactor-binding semantics as\n * a wrapped mark:\n *\n * ```tsx\n * <ChartRaw spec={vg.axisFy({ anchor: \"right\", tickRotate: 45 })} />\n * ```\n */\nexport const ChartRaw = chartDescriptor<ChartRawProps>(\"ChartRaw\", (props) =>\n Array.isArray(props.spec)\n ? props.spec.map((value: unknown) => ({ kind: \"raw\" as const, value }))\n : { kind: \"raw\", value: props.spec },\n);\n"],"names":["COLOR_CHANNELS","STACKING_MARKS","markSource","props","ctx","decorator","table","markDirective","mark","channels","series","v","isColorValue","channel","value","isColorToken","displayName","type","chartDescriptor","ChartBarY","ChartBarX","ChartWaffleY","ChartWaffleX","ChartLine","ChartLineY","ChartLineX","ChartArea","ChartAreaY","ChartAreaX","ChartDot","ChartDotX","ChartDotY","ChartCircle","ChartHexagon","ChartImage","ChartRect","ChartRectY","ChartRectX","ChartCell","ChartCellX","ChartCellY","ChartRuleY","ChartRuleX","ChartTickX","ChartTickY","ChartText","ChartTextX","ChartTextY","ChartVector","ChartVectorX","ChartVectorY","ChartSpike","ChartArrow","ChartLink","ChartHeatmap","ChartRaster","ChartRasterTile","ChartContour","ChartDenseLine","ChartDensity","ChartDensityY","ChartDensityX","ChartHexbin","ChartRegressionY","ChartErrorbarY","ChartErrorbarX","ChartVoronoi","ChartVoronoiMesh","ChartDelaunayLink","ChartDelaunayMesh","ChartHull","ChartGeo","ChartFrame","ChartGridX","ChartGridY","ChartHexgrid","ChartSphere","ChartGraticule","ChartRaw"],"mappings":";;AA8EA,MAAMA,IAAiB,CAAC,QAAQ,QAAQ,GAYlCC,wBAAqB,IAAI;AAAA,EAC7B;AAAA,EAAQ;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAW;AACjF,CAAC;AAED,SAASC,EAAWC,GAAuBC,GAAuBC,GAAqC;AACrG,MAAIA,EAAW,QAAO;AACtB,MAAIF,EAAM,SAAS,OAAW,QAAO,EAAE,MAAM,UAAU,QAAQA,EAAM,KAAA;AACrE,MAAIA,EAAM,OAAO,eAAkB,EAAE,MAAM,UAAU,QAAQ,MAAM,QAAQA,EAAM,EAAE,IAAIA,EAAM,KAAK,CAACA,EAAM,EAAE,EAAA;AAC3G,QAAMG,IAAQH,EAAM,SAASC,EAAI;AACjC,SAAIE,MAAU,SAAkB,EAAE,MAAM,UAAU,QAAQ,CAAC,CAAA,CAAE,EAAA,IACtD;AAAA,IACL,MAAM;AAAA,IACN,OAAAA;AAAA,IACA,UAAUH,EAAM,aAAa,SAAYC,EAAI,WAAWD,EAAM;AAAA,EAAA;AAElE;AAEA,SAASI,EAAcC,GAAcL,GAAuBC,GAAuBC,GAAwC;AACzH,QAAMI,IAAoC,EAAE,GAAGN,EAAA;AAO/C,MALA,OAAOM,EAAS,UAChB,OAAOA,EAAS,MAChB,OAAOA,EAAS,IAChB,OAAOA,EAAS,OAEZR,EAAe,IAAIO,CAAI,KAAK,EAAE,OAAOC,IA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,aAAa,MAAM,GACpC+D,KAAW/D,EAAK,YAAY,KAAK,GAGjCgE,KAAahE,EAAK,cAAc,SAAS,EAAI,GAC7CiE,KAAajE,EAAK,cAAc,SAAS,EAAI,GAC7CkE,KAAalE,EAAK,cAAc,SAAS,EAAI,GAC7CmE,KAAenE,EAAK,gBAAgB,WAAW,EAAI,GACnDoE,KAAcpE,EAAK,eAAe,UAAU,EAAI,GAChDqE,KAAiBrE,EAAK,kBAAkB,aAAa,EAAI,GAiBzDsE,KAAW5D;AAAA,EAA+B;AAAA,EAAY,CAACf,MAClE,MAAM,QAAQA,EAAM,IAAI,IACpBA,EAAM,KAAK,IAAI,CAACW,OAAoB,EAAE,MAAM,OAAgB,OAAAA,EAAA,EAAQ,IACpE,EAAE,MAAM,OAAO,OAAOX,EAAM,KAAA;AAClC;"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { ExprValue } from '@uwdata/mosaic-sql';
|
|
2
|
-
import {
|
|
3
|
-
import { StatTileProps } from '../simples/stat-tile.js';
|
|
2
|
+
import { StatValueProps } from '../simples/stat.js';
|
|
4
3
|
/**
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `StatValue` with the figure read from the relation, under the same crossfilter as the plots. The
|
|
5
|
+
* connected half of the pair, which is the engine rule: the `Stat*` parts take a number and live in
|
|
6
|
+
* the root barrel, this one queries for it and lives here. It sits inside a `StatRoot` like the
|
|
7
|
+
* value it replaces, so the label, the delta and the link stay the host's.
|
|
8
8
|
*/
|
|
9
|
-
export interface ChartStatProps extends Omit<
|
|
9
|
+
export interface ChartStatProps extends Omit<StatValueProps, "children" | "loading"> {
|
|
10
10
|
/** The relation. Defaults to the enclosing `ChartRoot`'s table. */
|
|
11
11
|
table?: string;
|
|
12
12
|
/** The aggregate to show — `count()`, `avg("latency")`, any `mosaic-sql` expression. */
|
|
13
13
|
value: ExprValue;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Formats the number for display. By default a count under ten thousand reads in full and
|
|
16
|
+
* anything larger compacts — `4,233`, `12.9K` — so a four-digit figure is never abbreviated
|
|
17
|
+
* into ambiguity.
|
|
18
|
+
*/
|
|
15
19
|
format?: (value: number) => string;
|
|
16
|
-
/** Shown while the first query is in flight. */
|
|
17
|
-
fallback?: ReactNode;
|
|
18
20
|
}
|
|
19
|
-
export declare function ChartStat(props: ChartStatProps):
|
|
21
|
+
export declare function ChartStat(props: ChartStatProps): import("react").JSX.Element;
|
|
20
22
|
export declare namespace ChartStat {
|
|
21
23
|
var displayName: string;
|
|
22
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-stat.d.ts","sourceRoot":"","sources":["../../src/charts/chart-stat.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chart-stat.d.ts","sourceRoot":"","sources":["../../src/charts/chart-stat.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpE;;;;;GAKG;AAEH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC;IAClF,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,KAAK,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BA6B9C;yBA7Be,SAAS"}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useChartContextOptional as
|
|
7
|
-
import { useChartQuery as
|
|
8
|
-
function
|
|
9
|
-
const { table:
|
|
10
|
-
query: (
|
|
11
|
-
deps: [t,
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { FormatNumber as p } from "@ark-ui/react/format";
|
|
4
|
+
import { Query as c } from "@uwdata/mosaic-sql";
|
|
5
|
+
import { StatValue as f } from "../simples/stat.js";
|
|
6
|
+
import { useChartContextOptional as d } from "./chart-root.js";
|
|
7
|
+
import { useChartQuery as h } from "./use-chart-query.js";
|
|
8
|
+
function b(i) {
|
|
9
|
+
const { table: l, value: e, format: m, ...s } = i, a = d(), t = l ?? (a == null ? void 0 : a.table), { row: r } = h({
|
|
10
|
+
query: (u) => t ? c.from(t).select({ value: e }).where(u) : null,
|
|
11
|
+
deps: [t, e]
|
|
12
12
|
});
|
|
13
13
|
if (!t)
|
|
14
14
|
throw new Error("ChartStat needs a `table`, or a <ChartRoot table> around it.");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const o = Number((r == null ? void 0 : r.value) ?? 0);
|
|
16
|
+
return /* @__PURE__ */ n(f, { loading: r === void 0, ...s, children: m ? m(o) : /* @__PURE__ */ n(
|
|
17
|
+
p,
|
|
18
|
+
{
|
|
19
|
+
maximumFractionDigits: 1,
|
|
20
|
+
notation: Math.abs(o) >= 1e4 ? "compact" : "standard",
|
|
21
|
+
value: o
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
19
24
|
}
|
|
20
|
-
|
|
25
|
+
b.displayName = "ChartStat";
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
b as ChartStat
|
|
23
28
|
};
|
|
24
29
|
//# sourceMappingURL=chart-stat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-stat.js","sources":["../../src/charts/chart-stat.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"file":"chart-stat.js","sources":["../../src/charts/chart-stat.tsx"],"sourcesContent":["\"use client\";\n\nimport { FormatNumber } from \"@ark-ui/react/format\";\nimport type { ExprValue } from \"@uwdata/mosaic-sql\";\nimport { Query } from \"@uwdata/mosaic-sql\";\nimport { StatValue, type StatValueProps } from \"../simples/stat.js\";\nimport { useChartContextOptional } from \"./chart-root.js\";\nimport { useChartQuery } from \"./use-chart-query.js\";\n\n/**\n * `StatValue` with the figure read from the relation, under the same crossfilter as the plots. The\n * connected half of the pair, which is the engine rule: the `Stat*` parts take a number and live in\n * the root barrel, this one queries for it and lives here. It sits inside a `StatRoot` like the\n * value it replaces, so the label, the delta and the link stay the host's.\n */\n\nexport interface ChartStatProps extends Omit<StatValueProps, \"children\" | \"loading\"> {\n /** The relation. Defaults to the enclosing `ChartRoot`'s table. */\n table?: string;\n /** The aggregate to show — `count()`, `avg(\"latency\")`, any `mosaic-sql` expression. */\n value: ExprValue;\n /**\n * Formats the number for display. By default a count under ten thousand reads in full and\n * anything larger compacts — `4,233`, `12.9K` — so a four-digit figure is never abbreviated\n * into ambiguity.\n */\n format?: (value: number) => string;\n}\n\nexport function ChartStat(props: ChartStatProps) {\n const { table, value, format, ...rest } = props;\n const chart = useChartContextOptional();\n const relation = table ?? chart?.table;\n\n const { row } = useChartQuery({\n query: (filter) =>\n relation ? Query.from(relation).select({ value }).where(filter) : null,\n deps: [relation, value],\n });\n\n if (!relation) {\n throw new Error(\"ChartStat needs a `table`, or a <ChartRoot table> around it.\");\n }\n\n const raw = Number(row?.value ?? 0);\n return (\n <StatValue loading={row === undefined} {...rest}>\n {format ? (\n format(raw)\n ) : (\n <FormatNumber\n maximumFractionDigits={1}\n notation={Math.abs(raw) >= 10_000 ? \"compact\" : \"standard\"}\n value={raw}\n />\n )}\n </StatValue>\n );\n}\n\n// The chart context is optional: a tile sits in a dashboard grid, outside any plot.\nChartStat.displayName = \"ChartStat\";\n"],"names":["ChartStat"],"mappings":";;;;;;;AA6BO;AACL;AAI8B;AAEwC;AAC9C;AAGxB;AACE;AAGF;AACA;AAKM;AAAC;AAAA;AACwB;AACyB;AACzC;AAAA;AAKjB;AAGAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-corpus.d.ts","sourceRoot":"","sources":["../src/guard-corpus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guard-corpus.d.ts","sourceRoot":"","sources":["../src/guard-corpus.ts"],"names":[],"mappings":"AAwEA,eAAO,MAAM,IAAI,QAA4B,CAAC;AAE9C,MAAM,WAAW,IAAI;IACnB,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAOD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EA6B7B,CAAC;AA0BL,8FAA8F;AAC9F,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI1C;AAED,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUpD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,UAAU,SAAY,GAAG,MAAM,EAAE,CAY5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,IAAI,MAAM,EAAE,CAYnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAKjF;AASD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export * from './simples/skeleton.js';
|
|
|
80
80
|
export * from './simples/skip-nav.js';
|
|
81
81
|
export * from './simples/slider.js';
|
|
82
82
|
export * from './simples/spinner.js';
|
|
83
|
-
export * from './simples/stat
|
|
83
|
+
export * from './simples/stat.js';
|
|
84
84
|
export * from './simples/suggestions.js';
|
|
85
85
|
export * from './simples/swatch.js';
|
|
86
86
|
export * from './simples/status.js';
|
|
@@ -106,6 +106,10 @@ export { ShellRoot, ShellHeader, ShellBody, ShellAside, ShellMain, ShellFooter,
|
|
|
106
106
|
export type { ShellAsideProps } from './layouts/shell.js';
|
|
107
107
|
export { SectionRoot, SectionHeader, SectionIcon, SectionTitleGroup, SectionTitle, SectionDescription, SectionActions, SectionBody, SectionFooter, } from './layouts/section.js';
|
|
108
108
|
export type { SectionRootProps, SectionHeaderProps, SectionTitleProps, SectionBodyProps, } from './layouts/section.js';
|
|
109
|
+
export { EmptyRoot, EmptyHeader, EmptyIndicator, EmptyTitle, EmptyDescription, EmptyContent, } from './layouts/empty.js';
|
|
110
|
+
export type { EmptyIndicatorProps } from './layouts/empty.js';
|
|
111
|
+
export { GatedRoot, GatedContent, GatedBadge } from './layouts/gated.js';
|
|
112
|
+
export type { GatedBadgeProps } from './layouts/gated.js';
|
|
109
113
|
export * from './composites/sidebar.js';
|
|
110
114
|
export { SidebarIdentity, SidebarIdentityAvatar, SidebarIdentityDescription, SidebarIdentityIcon, SidebarIdentityLabel, SidebarIdentityText, } from './composites/SidebarIdentity.js';
|
|
111
115
|
export type { SidebarIdentityProps } from './composites/SidebarIdentity.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAaA,YAAY,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,EACb,cAAc,EAGd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGxG,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EACV,uB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