@silverpoint/react 0.2.0 → 0.3.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/dist/activity-grid.js +3 -2
- package/dist/area-chart.js +3 -2
- package/dist/bar-chart.js +3 -2
- package/dist/base-C6zY78Va.d.ts +8 -0
- package/dist/bubble-chart.js +3 -2
- package/dist/bullet-chart.js +3 -2
- package/dist/candlestick-chart.js +3 -2
- package/dist/chord-ring.js +3 -2
- package/dist/chunk-2JWLXUY5.js +16 -0
- package/dist/chunk-2JWLXUY5.js.map +1 -0
- package/dist/{chunk-74ONV2GE.js → chunk-3BREGZ7C.js} +2 -2
- package/dist/{chunk-J5OOZDFF.js → chunk-3U3Z5U6H.js} +2 -2
- package/dist/chunk-3WUPWJP2.js +17 -0
- package/dist/chunk-3WUPWJP2.js.map +1 -0
- package/dist/chunk-43AIURD6.js +21 -0
- package/dist/chunk-43AIURD6.js.map +1 -0
- package/dist/chunk-5FKONGCL.js +16 -0
- package/dist/chunk-5FKONGCL.js.map +1 -0
- package/dist/chunk-67FND3TB.js +26 -0
- package/dist/chunk-67FND3TB.js.map +1 -0
- package/dist/{chunk-X2ACXB2U.js → chunk-6EFRIK7Q.js} +2 -2
- package/dist/{chunk-6KPX5HYV.js → chunk-6M4REUJE.js} +2 -2
- package/dist/chunk-6NXL245Z.js +16 -0
- package/dist/chunk-6NXL245Z.js.map +1 -0
- package/dist/{chunk-WOKDS6AK.js → chunk-6S6VKQ3E.js} +2 -2
- package/dist/{chunk-DTBEXYYC.js → chunk-AEU6UHVG.js} +2 -2
- package/dist/chunk-ART7CMBL.js +16 -0
- package/dist/chunk-ART7CMBL.js.map +1 -0
- package/dist/{chunk-A42AKCPS.js → chunk-C3NHZ4N5.js} +2 -2
- package/dist/chunk-CWFUPKSS.js +20 -0
- package/dist/chunk-CWFUPKSS.js.map +1 -0
- package/dist/chunk-DO4VUIUU.js +61 -0
- package/dist/chunk-DO4VUIUU.js.map +1 -0
- package/dist/{chunk-2NQ4DXLT.js → chunk-ESFN6FJY.js} +2 -2
- package/dist/{chunk-WNX4XCL6.js → chunk-FBJLA3P7.js} +11 -45
- package/dist/chunk-FBJLA3P7.js.map +1 -0
- package/dist/{chunk-NW2SQ6QW.js → chunk-FHX2HWN3.js} +2 -2
- package/dist/{chunk-KDQHOND7.js → chunk-FZ46YSJA.js} +2 -2
- package/dist/chunk-G7C4CH54.js +17 -0
- package/dist/chunk-G7C4CH54.js.map +1 -0
- package/dist/{chunk-GYUTG5R2.js → chunk-GSJYA76X.js} +2 -2
- package/dist/{chunk-TKQ2PQDW.js → chunk-GUKXFITX.js} +2 -2
- package/dist/{chunk-TAQOBBF7.js → chunk-I72JGA6Q.js} +2 -2
- package/dist/{chunk-H4NCK6RE.js → chunk-J3E6IUUQ.js} +2 -2
- package/dist/{chunk-4LS7B7CK.js → chunk-JPTK2AAT.js} +2 -2
- package/dist/{chunk-WHZ4ALRI.js → chunk-JWCVL7VE.js} +2 -2
- package/dist/{chunk-XWSCKTPG.js → chunk-KVOBNPDN.js} +2 -2
- package/dist/chunk-LSA5XU52.js +18 -0
- package/dist/chunk-LSA5XU52.js.map +1 -0
- package/dist/chunk-M56MDRNT.js +17 -0
- package/dist/chunk-M56MDRNT.js.map +1 -0
- package/dist/{chunk-FZMY6NWJ.js → chunk-MC7N4KQA.js} +2 -2
- package/dist/{chunk-UXVYCPFL.js → chunk-MYKZWY2E.js} +2 -2
- package/dist/{chunk-GBTH55AM.js → chunk-NA6K372D.js} +2 -2
- package/dist/{chunk-E5LIZKJT.js → chunk-NWK6VBCJ.js} +2 -2
- package/dist/{chunk-WICFKWEZ.js → chunk-NWRCFNYB.js} +2 -2
- package/dist/{chunk-CERHTEML.js → chunk-OAH7AEGE.js} +2 -2
- package/dist/chunk-OP2WE7MA.js +31 -0
- package/dist/chunk-OP2WE7MA.js.map +1 -0
- package/dist/{chunk-OFDVE64G.js → chunk-PRVJKYEQ.js} +2 -2
- package/dist/chunk-QRYI7BEO.js +21 -0
- package/dist/chunk-QRYI7BEO.js.map +1 -0
- package/dist/{chunk-P53KSCPE.js → chunk-RAATAHXZ.js} +2 -2
- package/dist/{chunk-FQHAHZBR.js → chunk-RIGQTEKW.js} +2 -2
- package/dist/{chunk-NHUVAE4Z.js → chunk-RMIIFPXA.js} +2 -2
- package/dist/chunk-SQ6GWXDK.js +48 -0
- package/dist/chunk-SQ6GWXDK.js.map +1 -0
- package/dist/chunk-TH6Q4E7C.js +21 -0
- package/dist/chunk-TH6Q4E7C.js.map +1 -0
- package/dist/{chunk-H3UH7F5S.js → chunk-TSQWTDBK.js} +2 -2
- package/dist/{chunk-7KED5KUU.js → chunk-U3LT444G.js} +2 -2
- package/dist/{chunk-JRAHTS5O.js → chunk-UOOHQAJU.js} +2 -2
- package/dist/{chunk-VISNFHPM.js → chunk-VKNGQ4NW.js} +2 -2
- package/dist/{chunk-ZKLVP4JE.js → chunk-WFO6BICV.js} +2 -2
- package/dist/chunk-WMU6O6KZ.js +21 -0
- package/dist/chunk-WMU6O6KZ.js.map +1 -0
- package/dist/chunk-WZZA2IGN.js +44 -0
- package/dist/chunk-WZZA2IGN.js.map +1 -0
- package/dist/{chunk-PWFDYIXV.js → chunk-X2F56RYM.js} +2 -2
- package/dist/chunk-ZBSCLF56.js +33 -0
- package/dist/chunk-ZBSCLF56.js.map +1 -0
- package/dist/chunk-ZOB6BH7H.js +21 -0
- package/dist/chunk-ZOB6BH7H.js.map +1 -0
- package/dist/composed-chart.js +3 -2
- package/dist/coxcomb-chart.js +3 -2
- package/dist/donut-chart.js +3 -2
- package/dist/funnel-chart.js +3 -2
- package/dist/gauge-arc.js +3 -2
- package/dist/heatmap-chart.js +3 -2
- package/dist/index.js +36 -35
- package/dist/index.js.map +1 -1
- package/dist/kpi-card.js +3 -2
- package/dist/line-chart.js +3 -2
- package/dist/meter-chart.js +3 -2
- package/dist/orbit-chart.js +3 -2
- package/dist/polar-bar-chart.js +3 -2
- package/dist/pyramid-chart.js +3 -2
- package/dist/radar-chart.js +3 -2
- package/dist/radial-arc-group.js +3 -2
- package/dist/radial-rings.js +3 -2
- package/dist/range-band-chart.js +3 -2
- package/dist/sankey-chart.js +3 -2
- package/dist/scatter-chart.js +3 -2
- package/dist/server/ui/alert.d.ts +17 -0
- package/dist/server/ui/alert.js +13 -0
- package/dist/server/ui/alert.js.map +1 -0
- package/dist/server/ui/badge.d.ts +15 -0
- package/dist/server/ui/badge.js +14 -0
- package/dist/server/ui/badge.js.map +1 -0
- package/dist/server/ui/card.d.ts +18 -0
- package/dist/server/ui/card.js +14 -0
- package/dist/server/ui/card.js.map +1 -0
- package/dist/server/ui/divider.d.ts +12 -0
- package/dist/server/ui/divider.js +13 -0
- package/dist/server/ui/divider.js.map +1 -0
- package/dist/server/ui/progress.d.ts +14 -0
- package/dist/server/ui/progress.js +13 -0
- package/dist/server/ui/progress.js.map +1 -0
- package/dist/server/ui/skeleton.d.ts +14 -0
- package/dist/server/ui/skeleton.js +13 -0
- package/dist/server/ui/skeleton.js.map +1 -0
- package/dist/server/ui/steps.d.ts +14 -0
- package/dist/server/ui/steps.js +13 -0
- package/dist/server/ui/steps.js.map +1 -0
- package/dist/server/ui/tag.d.ts +17 -0
- package/dist/server/ui/tag.js +14 -0
- package/dist/server/ui/tag.js.map +1 -0
- package/dist/sparkline-rows.js +3 -2
- package/dist/stacked-bar-chart.js +3 -2
- package/dist/step-chart.js +3 -2
- package/dist/stream-chart.js +3 -2
- package/dist/treemap-chart.js +3 -2
- package/dist/ui/alert.d.ts +14 -0
- package/dist/ui/alert.js +10 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/badge.d.ts +12 -0
- package/dist/ui/badge.js +10 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +14 -0
- package/dist/ui/button.js +10 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +14 -0
- package/dist/ui/card.js +10 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/checkbox.d.ts +14 -0
- package/dist/ui/checkbox.js +10 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/divider.d.ts +11 -0
- package/dist/ui/divider.js +10 -0
- package/dist/ui/divider.js.map +1 -0
- package/dist/ui/input.d.ts +19 -0
- package/dist/ui/input.js +10 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/progress.d.ts +11 -0
- package/dist/ui/progress.js +10 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +16 -0
- package/dist/ui/radio-group.js +10 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/rate.d.ts +15 -0
- package/dist/ui/rate.js +10 -0
- package/dist/ui/rate.js.map +1 -0
- package/dist/ui/segmented.d.ts +16 -0
- package/dist/ui/segmented.js +10 -0
- package/dist/ui/segmented.js.map +1 -0
- package/dist/ui/skeleton.d.ts +11 -0
- package/dist/ui/skeleton.js +10 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +15 -0
- package/dist/ui/slider.js +10 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/steps.d.ts +11 -0
- package/dist/ui/steps.js +10 -0
- package/dist/ui/steps.js.map +1 -0
- package/dist/ui/switch.d.ts +14 -0
- package/dist/ui/switch.js +10 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/tabs.d.ts +25 -0
- package/dist/ui/tabs.js +12 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/tag.d.ts +14 -0
- package/dist/ui/tag.js +10 -0
- package/dist/ui/tag.js.map +1 -0
- package/dist/ui.d.ts +21 -0
- package/dist/ui.js +76 -0
- package/dist/ui.js.map +1 -0
- package/dist/volvelle-chart.js +3 -2
- package/dist/waterfall-chart.js +3 -2
- package/dist/wind-rose.js +3 -2
- package/package.json +159 -3
- package/dist/chunk-WNX4XCL6.js.map +0 -1
- /package/dist/{chunk-74ONV2GE.js.map → chunk-3BREGZ7C.js.map} +0 -0
- /package/dist/{chunk-J5OOZDFF.js.map → chunk-3U3Z5U6H.js.map} +0 -0
- /package/dist/{chunk-X2ACXB2U.js.map → chunk-6EFRIK7Q.js.map} +0 -0
- /package/dist/{chunk-6KPX5HYV.js.map → chunk-6M4REUJE.js.map} +0 -0
- /package/dist/{chunk-WOKDS6AK.js.map → chunk-6S6VKQ3E.js.map} +0 -0
- /package/dist/{chunk-DTBEXYYC.js.map → chunk-AEU6UHVG.js.map} +0 -0
- /package/dist/{chunk-A42AKCPS.js.map → chunk-C3NHZ4N5.js.map} +0 -0
- /package/dist/{chunk-2NQ4DXLT.js.map → chunk-ESFN6FJY.js.map} +0 -0
- /package/dist/{chunk-NW2SQ6QW.js.map → chunk-FHX2HWN3.js.map} +0 -0
- /package/dist/{chunk-KDQHOND7.js.map → chunk-FZ46YSJA.js.map} +0 -0
- /package/dist/{chunk-GYUTG5R2.js.map → chunk-GSJYA76X.js.map} +0 -0
- /package/dist/{chunk-TKQ2PQDW.js.map → chunk-GUKXFITX.js.map} +0 -0
- /package/dist/{chunk-TAQOBBF7.js.map → chunk-I72JGA6Q.js.map} +0 -0
- /package/dist/{chunk-H4NCK6RE.js.map → chunk-J3E6IUUQ.js.map} +0 -0
- /package/dist/{chunk-4LS7B7CK.js.map → chunk-JPTK2AAT.js.map} +0 -0
- /package/dist/{chunk-WHZ4ALRI.js.map → chunk-JWCVL7VE.js.map} +0 -0
- /package/dist/{chunk-XWSCKTPG.js.map → chunk-KVOBNPDN.js.map} +0 -0
- /package/dist/{chunk-FZMY6NWJ.js.map → chunk-MC7N4KQA.js.map} +0 -0
- /package/dist/{chunk-UXVYCPFL.js.map → chunk-MYKZWY2E.js.map} +0 -0
- /package/dist/{chunk-GBTH55AM.js.map → chunk-NA6K372D.js.map} +0 -0
- /package/dist/{chunk-E5LIZKJT.js.map → chunk-NWK6VBCJ.js.map} +0 -0
- /package/dist/{chunk-WICFKWEZ.js.map → chunk-NWRCFNYB.js.map} +0 -0
- /package/dist/{chunk-CERHTEML.js.map → chunk-OAH7AEGE.js.map} +0 -0
- /package/dist/{chunk-OFDVE64G.js.map → chunk-PRVJKYEQ.js.map} +0 -0
- /package/dist/{chunk-P53KSCPE.js.map → chunk-RAATAHXZ.js.map} +0 -0
- /package/dist/{chunk-FQHAHZBR.js.map → chunk-RIGQTEKW.js.map} +0 -0
- /package/dist/{chunk-NHUVAE4Z.js.map → chunk-RMIIFPXA.js.map} +0 -0
- /package/dist/{chunk-H3UH7F5S.js.map → chunk-TSQWTDBK.js.map} +0 -0
- /package/dist/{chunk-7KED5KUU.js.map → chunk-U3LT444G.js.map} +0 -0
- /package/dist/{chunk-JRAHTS5O.js.map → chunk-UOOHQAJU.js.map} +0 -0
- /package/dist/{chunk-VISNFHPM.js.map → chunk-VKNGQ4NW.js.map} +0 -0
- /package/dist/{chunk-ZKLVP4JE.js.map → chunk-WFO6BICV.js.map} +0 -0
- /package/dist/{chunk-PWFDYIXV.js.map → chunk-X2F56RYM.js.map} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SpSegmentedProps as SpSegmentedProps$1 } from '@silverpoint/core/ui';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpSegmentedProps extends SpSegmentedProps$1, UiCellProps {
|
|
7
|
+
/** Controlled key; an unknown one shows the first enabled segment. */
|
|
8
|
+
readonly value?: string;
|
|
9
|
+
readonly defaultValue?: string;
|
|
10
|
+
/** The key selected, not the DOM event (REQ-322). */
|
|
11
|
+
readonly onChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/** `SpSegmented`: native radios in one frame; arrows move and select through the core (REQ-315). */
|
|
14
|
+
declare function SpSegmented({ value, defaultValue, onChange, dashboardCell, ...props }: SpSegmentedProps): ReactElement;
|
|
15
|
+
|
|
16
|
+
export { SpSegmented, type SpSegmentedProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SpSkeletonProps as SpSkeletonProps$1 } from '@silverpoint/core/ui';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpSkeletonProps extends SpSkeletonProps$1, UiCellProps {
|
|
7
|
+
}
|
|
8
|
+
/** `SpSkeleton`: `aria-busy`, a hidden label, hidden toned shapes (REQ-318). */
|
|
9
|
+
declare function SpSkeleton({ dashboardCell, ...props }: SpSkeletonProps): ReactElement;
|
|
10
|
+
|
|
11
|
+
export { SpSkeleton, type SpSkeletonProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { SpSliderProps as SpSliderProps$1 } from '@silverpoint/core/ui';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpSliderProps extends SpSliderProps$1, UiCellProps {
|
|
7
|
+
readonly value?: number;
|
|
8
|
+
readonly defaultValue?: number;
|
|
9
|
+
/** The number, not the DOM event (REQ-322). */
|
|
10
|
+
readonly onChange?: (value: number) => void;
|
|
11
|
+
}
|
|
12
|
+
/** `SpSlider`: a native range over the exact drawing; its ref is the input (REQ-314, DD-025). */
|
|
13
|
+
declare const SpSlider: react.ForwardRefExoticComponent<SpSliderProps & react.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
|
|
15
|
+
export { SpSlider, type SpSliderProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SpStepsProps as SpStepsProps$1 } from '@silverpoint/core/ui';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpStepsProps extends SpStepsProps$1, UiCellProps {
|
|
7
|
+
}
|
|
8
|
+
/** `SpSteps`: reads the provider; `@silverpoint/react/server/ui/steps` renders it in a Server Component. */
|
|
9
|
+
declare function SpSteps({ dashboardCell, ...props }: SpStepsProps): ReactElement;
|
|
10
|
+
|
|
11
|
+
export { SpSteps, type SpStepsProps };
|
package/dist/ui/steps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { SpSwitchProps as SpSwitchProps$1 } from '@silverpoint/core/ui';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpSwitchProps extends SpSwitchProps$1, UiCellProps {
|
|
7
|
+
readonly checked?: boolean;
|
|
8
|
+
readonly defaultChecked?: boolean;
|
|
9
|
+
readonly onChange?: (checked: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
/** `SpSwitch`: a native checkbox with `role="switch"`; its ref is the input. */
|
|
12
|
+
declare const SpSwitch: react.ForwardRefExoticComponent<SpSwitchProps & react.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
|
|
14
|
+
export { SpSwitch, type SpSwitchProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SpTabsProps as SpTabsProps$1 } from '@silverpoint/core/ui';
|
|
2
|
+
import { ReactNode, ReactElement } from 'react';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpTabsProps extends SpTabsProps$1, UiCellProps {
|
|
7
|
+
/** Controlled key; an unknown one shows the first enabled tab. */
|
|
8
|
+
readonly value?: string;
|
|
9
|
+
readonly defaultValue?: string;
|
|
10
|
+
/** The key selected, not the DOM event (REQ-322). */
|
|
11
|
+
readonly onChange?: (value: string) => void;
|
|
12
|
+
/** `SpTabPanel` elements. */
|
|
13
|
+
readonly children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/** `SpTabs`: a tablist of native buttons, one tab stop; arrows through the core, `activation` as APG (REQ-315). */
|
|
16
|
+
declare function SpTabs({ value, defaultValue, onChange, children, dashboardCell, ...props }: SpTabsProps): ReactElement;
|
|
17
|
+
interface SpTabPanelProps {
|
|
18
|
+
/** The key of the tab that shows this panel. */
|
|
19
|
+
readonly value: string;
|
|
20
|
+
readonly children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/** `SpTabPanel`: a `tabpanel` labelled by its tab, hidden unless its tab is selected. */
|
|
23
|
+
declare function SpTabPanel({ value, children }: SpTabPanelProps): ReactElement;
|
|
24
|
+
|
|
25
|
+
export { SpTabPanel, type SpTabPanelProps, SpTabs, type SpTabsProps };
|
package/dist/ui/tabs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/ui/tag.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SpTagProps as SpTagProps$1 } from '@silverpoint/core/ui';
|
|
2
|
+
import { ReactNode, MouseEvent, ReactElement } from 'react';
|
|
3
|
+
import { U as UiCellProps } from '../base-C6zY78Va.js';
|
|
4
|
+
import '@silverpoint/core';
|
|
5
|
+
|
|
6
|
+
interface SpTagProps extends SpTagProps$1, UiCellProps {
|
|
7
|
+
readonly children?: ReactNode;
|
|
8
|
+
/** From the close button of a closable tag. */
|
|
9
|
+
readonly onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
}
|
|
11
|
+
/** `SpTag`: framed and toned; closable, a native close button (REQ-308). */
|
|
12
|
+
declare function SpTag({ children, onClose, dashboardCell, ...props }: SpTagProps): ReactElement;
|
|
13
|
+
|
|
14
|
+
export { SpTag, type SpTagProps };
|
package/dist/ui/tag.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { SpButton, SpButtonProps } from './ui/button.js';
|
|
2
|
+
export { SpInput, SpInputProps } from './ui/input.js';
|
|
3
|
+
export { SpCheckbox, SpCheckboxProps } from './ui/checkbox.js';
|
|
4
|
+
export { SpSwitch, SpSwitchProps } from './ui/switch.js';
|
|
5
|
+
export { SpCard, SpCardProps } from './ui/card.js';
|
|
6
|
+
export { SpDivider, SpDividerProps } from './ui/divider.js';
|
|
7
|
+
export { SpRadioGroup, SpRadioGroupProps } from './ui/radio-group.js';
|
|
8
|
+
export { SpSegmented, SpSegmentedProps } from './ui/segmented.js';
|
|
9
|
+
export { SpTabPanel, SpTabPanelProps, SpTabs, SpTabsProps } from './ui/tabs.js';
|
|
10
|
+
export { SpSlider, SpSliderProps } from './ui/slider.js';
|
|
11
|
+
export { SpRate, SpRateProps } from './ui/rate.js';
|
|
12
|
+
export { SpSteps, SpStepsProps } from './ui/steps.js';
|
|
13
|
+
export { SpTag, SpTagProps } from './ui/tag.js';
|
|
14
|
+
export { SpBadge, SpBadgeProps } from './ui/badge.js';
|
|
15
|
+
export { SpProgress, SpProgressProps } from './ui/progress.js';
|
|
16
|
+
export { SpAlert, SpAlertProps } from './ui/alert.js';
|
|
17
|
+
export { SpSkeleton, SpSkeletonProps } from './ui/skeleton.js';
|
|
18
|
+
export { AlertKind, StepItem, UiItem, UiSize, UiVariant } from '@silverpoint/core/ui';
|
|
19
|
+
import 'react';
|
|
20
|
+
import './base-C6zY78Va.js';
|
|
21
|
+
import '@silverpoint/core';
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
SpTag
|
|
4
|
+
} from "./chunk-LSA5XU52.js";
|
|
5
|
+
import {
|
|
6
|
+
SpBadge
|
|
7
|
+
} from "./chunk-G7C4CH54.js";
|
|
8
|
+
import {
|
|
9
|
+
SpProgress
|
|
10
|
+
} from "./chunk-2JWLXUY5.js";
|
|
11
|
+
import {
|
|
12
|
+
SpAlert
|
|
13
|
+
} from "./chunk-M56MDRNT.js";
|
|
14
|
+
import {
|
|
15
|
+
SpSkeleton
|
|
16
|
+
} from "./chunk-ART7CMBL.js";
|
|
17
|
+
import {
|
|
18
|
+
SpCard
|
|
19
|
+
} from "./chunk-3WUPWJP2.js";
|
|
20
|
+
import {
|
|
21
|
+
SpDivider
|
|
22
|
+
} from "./chunk-5FKONGCL.js";
|
|
23
|
+
import {
|
|
24
|
+
SpRadioGroup
|
|
25
|
+
} from "./chunk-ZOB6BH7H.js";
|
|
26
|
+
import {
|
|
27
|
+
SpSegmented
|
|
28
|
+
} from "./chunk-TH6Q4E7C.js";
|
|
29
|
+
import {
|
|
30
|
+
SpTabPanel,
|
|
31
|
+
SpTabs
|
|
32
|
+
} from "./chunk-OP2WE7MA.js";
|
|
33
|
+
import {
|
|
34
|
+
SpSlider
|
|
35
|
+
} from "./chunk-WMU6O6KZ.js";
|
|
36
|
+
import {
|
|
37
|
+
SpRate
|
|
38
|
+
} from "./chunk-67FND3TB.js";
|
|
39
|
+
import {
|
|
40
|
+
SpSteps
|
|
41
|
+
} from "./chunk-6NXL245Z.js";
|
|
42
|
+
import {
|
|
43
|
+
SpButton
|
|
44
|
+
} from "./chunk-CWFUPKSS.js";
|
|
45
|
+
import {
|
|
46
|
+
SpInput
|
|
47
|
+
} from "./chunk-QRYI7BEO.js";
|
|
48
|
+
import {
|
|
49
|
+
SpCheckbox
|
|
50
|
+
} from "./chunk-WZZA2IGN.js";
|
|
51
|
+
import {
|
|
52
|
+
SpSwitch
|
|
53
|
+
} from "./chunk-43AIURD6.js";
|
|
54
|
+
import "./chunk-DO4VUIUU.js";
|
|
55
|
+
import "./chunk-SQ6GWXDK.js";
|
|
56
|
+
export {
|
|
57
|
+
SpAlert,
|
|
58
|
+
SpBadge,
|
|
59
|
+
SpButton,
|
|
60
|
+
SpCard,
|
|
61
|
+
SpCheckbox,
|
|
62
|
+
SpDivider,
|
|
63
|
+
SpInput,
|
|
64
|
+
SpProgress,
|
|
65
|
+
SpRadioGroup,
|
|
66
|
+
SpRate,
|
|
67
|
+
SpSegmented,
|
|
68
|
+
SpSkeleton,
|
|
69
|
+
SpSlider,
|
|
70
|
+
SpSteps,
|
|
71
|
+
SpSwitch,
|
|
72
|
+
SpTabPanel,
|
|
73
|
+
SpTabs,
|
|
74
|
+
SpTag
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/volvelle-chart.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
VolvelleChart
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-I72JGA6Q.js";
|
|
5
|
+
import "./chunk-FBJLA3P7.js";
|
|
6
6
|
import "./chunk-4GQ5X2WK.js";
|
|
7
|
+
import "./chunk-SQ6GWXDK.js";
|
|
7
8
|
export {
|
|
8
9
|
VolvelleChart
|
|
9
10
|
};
|
package/dist/waterfall-chart.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
WaterfallChart
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-FHX2HWN3.js";
|
|
5
|
+
import "./chunk-FBJLA3P7.js";
|
|
6
6
|
import "./chunk-4GQ5X2WK.js";
|
|
7
|
+
import "./chunk-SQ6GWXDK.js";
|
|
7
8
|
export {
|
|
8
9
|
WaterfallChart
|
|
9
10
|
};
|
package/dist/wind-rose.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silverpoint/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "React adapter of silverpoint: translates core geometry into JSX, and nothing else.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -429,6 +429,162 @@
|
|
|
429
429
|
"import": "./dist/dashboard-link.js",
|
|
430
430
|
"default": "./dist/dashboard-link.js"
|
|
431
431
|
},
|
|
432
|
+
"./ui": {
|
|
433
|
+
"@silverpoint/source": "./src/ui/index.ts",
|
|
434
|
+
"types": "./dist/ui.d.ts",
|
|
435
|
+
"import": "./dist/ui.js",
|
|
436
|
+
"default": "./dist/ui.js"
|
|
437
|
+
},
|
|
438
|
+
"./ui/button": {
|
|
439
|
+
"@silverpoint/source": "./src/ui/button.tsx",
|
|
440
|
+
"types": "./dist/ui/button.d.ts",
|
|
441
|
+
"import": "./dist/ui/button.js",
|
|
442
|
+
"default": "./dist/ui/button.js"
|
|
443
|
+
},
|
|
444
|
+
"./ui/input": {
|
|
445
|
+
"@silverpoint/source": "./src/ui/input.tsx",
|
|
446
|
+
"types": "./dist/ui/input.d.ts",
|
|
447
|
+
"import": "./dist/ui/input.js",
|
|
448
|
+
"default": "./dist/ui/input.js"
|
|
449
|
+
},
|
|
450
|
+
"./ui/checkbox": {
|
|
451
|
+
"@silverpoint/source": "./src/ui/checkbox.tsx",
|
|
452
|
+
"types": "./dist/ui/checkbox.d.ts",
|
|
453
|
+
"import": "./dist/ui/checkbox.js",
|
|
454
|
+
"default": "./dist/ui/checkbox.js"
|
|
455
|
+
},
|
|
456
|
+
"./ui/switch": {
|
|
457
|
+
"@silverpoint/source": "./src/ui/switch.tsx",
|
|
458
|
+
"types": "./dist/ui/switch.d.ts",
|
|
459
|
+
"import": "./dist/ui/switch.js",
|
|
460
|
+
"default": "./dist/ui/switch.js"
|
|
461
|
+
},
|
|
462
|
+
"./ui/card": {
|
|
463
|
+
"@silverpoint/source": "./src/ui/card.tsx",
|
|
464
|
+
"types": "./dist/ui/card.d.ts",
|
|
465
|
+
"import": "./dist/ui/card.js",
|
|
466
|
+
"default": "./dist/ui/card.js"
|
|
467
|
+
},
|
|
468
|
+
"./ui/divider": {
|
|
469
|
+
"@silverpoint/source": "./src/ui/divider.tsx",
|
|
470
|
+
"types": "./dist/ui/divider.d.ts",
|
|
471
|
+
"import": "./dist/ui/divider.js",
|
|
472
|
+
"default": "./dist/ui/divider.js"
|
|
473
|
+
},
|
|
474
|
+
"./ui/radio-group": {
|
|
475
|
+
"@silverpoint/source": "./src/ui/radio-group.tsx",
|
|
476
|
+
"types": "./dist/ui/radio-group.d.ts",
|
|
477
|
+
"import": "./dist/ui/radio-group.js",
|
|
478
|
+
"default": "./dist/ui/radio-group.js"
|
|
479
|
+
},
|
|
480
|
+
"./ui/segmented": {
|
|
481
|
+
"@silverpoint/source": "./src/ui/segmented.tsx",
|
|
482
|
+
"types": "./dist/ui/segmented.d.ts",
|
|
483
|
+
"import": "./dist/ui/segmented.js",
|
|
484
|
+
"default": "./dist/ui/segmented.js"
|
|
485
|
+
},
|
|
486
|
+
"./ui/tabs": {
|
|
487
|
+
"@silverpoint/source": "./src/ui/tabs.tsx",
|
|
488
|
+
"types": "./dist/ui/tabs.d.ts",
|
|
489
|
+
"import": "./dist/ui/tabs.js",
|
|
490
|
+
"default": "./dist/ui/tabs.js"
|
|
491
|
+
},
|
|
492
|
+
"./ui/slider": {
|
|
493
|
+
"@silverpoint/source": "./src/ui/slider.tsx",
|
|
494
|
+
"types": "./dist/ui/slider.d.ts",
|
|
495
|
+
"import": "./dist/ui/slider.js",
|
|
496
|
+
"default": "./dist/ui/slider.js"
|
|
497
|
+
},
|
|
498
|
+
"./ui/rate": {
|
|
499
|
+
"@silverpoint/source": "./src/ui/rate.tsx",
|
|
500
|
+
"types": "./dist/ui/rate.d.ts",
|
|
501
|
+
"import": "./dist/ui/rate.js",
|
|
502
|
+
"default": "./dist/ui/rate.js"
|
|
503
|
+
},
|
|
504
|
+
"./ui/steps": {
|
|
505
|
+
"@silverpoint/source": "./src/ui/steps.tsx",
|
|
506
|
+
"types": "./dist/ui/steps.d.ts",
|
|
507
|
+
"import": "./dist/ui/steps.js",
|
|
508
|
+
"default": "./dist/ui/steps.js"
|
|
509
|
+
},
|
|
510
|
+
"./ui/tag": {
|
|
511
|
+
"@silverpoint/source": "./src/ui/tag.tsx",
|
|
512
|
+
"types": "./dist/ui/tag.d.ts",
|
|
513
|
+
"import": "./dist/ui/tag.js",
|
|
514
|
+
"default": "./dist/ui/tag.js"
|
|
515
|
+
},
|
|
516
|
+
"./ui/badge": {
|
|
517
|
+
"@silverpoint/source": "./src/ui/badge.tsx",
|
|
518
|
+
"types": "./dist/ui/badge.d.ts",
|
|
519
|
+
"import": "./dist/ui/badge.js",
|
|
520
|
+
"default": "./dist/ui/badge.js"
|
|
521
|
+
},
|
|
522
|
+
"./ui/progress": {
|
|
523
|
+
"@silverpoint/source": "./src/ui/progress.tsx",
|
|
524
|
+
"types": "./dist/ui/progress.d.ts",
|
|
525
|
+
"import": "./dist/ui/progress.js",
|
|
526
|
+
"default": "./dist/ui/progress.js"
|
|
527
|
+
},
|
|
528
|
+
"./ui/alert": {
|
|
529
|
+
"@silverpoint/source": "./src/ui/alert.tsx",
|
|
530
|
+
"types": "./dist/ui/alert.d.ts",
|
|
531
|
+
"import": "./dist/ui/alert.js",
|
|
532
|
+
"default": "./dist/ui/alert.js"
|
|
533
|
+
},
|
|
534
|
+
"./ui/skeleton": {
|
|
535
|
+
"@silverpoint/source": "./src/ui/skeleton.tsx",
|
|
536
|
+
"types": "./dist/ui/skeleton.d.ts",
|
|
537
|
+
"import": "./dist/ui/skeleton.js",
|
|
538
|
+
"default": "./dist/ui/skeleton.js"
|
|
539
|
+
},
|
|
540
|
+
"./server/ui/card": {
|
|
541
|
+
"@silverpoint/source": "./src/server/ui/card.tsx",
|
|
542
|
+
"types": "./dist/server/ui/card.d.ts",
|
|
543
|
+
"import": "./dist/server/ui/card.js",
|
|
544
|
+
"default": "./dist/server/ui/card.js"
|
|
545
|
+
},
|
|
546
|
+
"./server/ui/divider": {
|
|
547
|
+
"@silverpoint/source": "./src/server/ui/divider.tsx",
|
|
548
|
+
"types": "./dist/server/ui/divider.d.ts",
|
|
549
|
+
"import": "./dist/server/ui/divider.js",
|
|
550
|
+
"default": "./dist/server/ui/divider.js"
|
|
551
|
+
},
|
|
552
|
+
"./server/ui/steps": {
|
|
553
|
+
"@silverpoint/source": "./src/server/ui/steps.tsx",
|
|
554
|
+
"types": "./dist/server/ui/steps.d.ts",
|
|
555
|
+
"import": "./dist/server/ui/steps.js",
|
|
556
|
+
"default": "./dist/server/ui/steps.js"
|
|
557
|
+
},
|
|
558
|
+
"./server/ui/tag": {
|
|
559
|
+
"@silverpoint/source": "./src/server/ui/tag.tsx",
|
|
560
|
+
"types": "./dist/server/ui/tag.d.ts",
|
|
561
|
+
"import": "./dist/server/ui/tag.js",
|
|
562
|
+
"default": "./dist/server/ui/tag.js"
|
|
563
|
+
},
|
|
564
|
+
"./server/ui/badge": {
|
|
565
|
+
"@silverpoint/source": "./src/server/ui/badge.tsx",
|
|
566
|
+
"types": "./dist/server/ui/badge.d.ts",
|
|
567
|
+
"import": "./dist/server/ui/badge.js",
|
|
568
|
+
"default": "./dist/server/ui/badge.js"
|
|
569
|
+
},
|
|
570
|
+
"./server/ui/progress": {
|
|
571
|
+
"@silverpoint/source": "./src/server/ui/progress.tsx",
|
|
572
|
+
"types": "./dist/server/ui/progress.d.ts",
|
|
573
|
+
"import": "./dist/server/ui/progress.js",
|
|
574
|
+
"default": "./dist/server/ui/progress.js"
|
|
575
|
+
},
|
|
576
|
+
"./server/ui/alert": {
|
|
577
|
+
"@silverpoint/source": "./src/server/ui/alert.tsx",
|
|
578
|
+
"types": "./dist/server/ui/alert.d.ts",
|
|
579
|
+
"import": "./dist/server/ui/alert.js",
|
|
580
|
+
"default": "./dist/server/ui/alert.js"
|
|
581
|
+
},
|
|
582
|
+
"./server/ui/skeleton": {
|
|
583
|
+
"@silverpoint/source": "./src/server/ui/skeleton.tsx",
|
|
584
|
+
"types": "./dist/server/ui/skeleton.d.ts",
|
|
585
|
+
"import": "./dist/server/ui/skeleton.js",
|
|
586
|
+
"default": "./dist/server/ui/skeleton.js"
|
|
587
|
+
},
|
|
432
588
|
"./package.json": "./package.json"
|
|
433
589
|
},
|
|
434
590
|
"files": [
|
|
@@ -444,8 +600,8 @@
|
|
|
444
600
|
"provenance": true
|
|
445
601
|
},
|
|
446
602
|
"dependencies": {
|
|
447
|
-
"@silverpoint/core": "0.
|
|
448
|
-
"@silverpoint/grounds": "0.
|
|
603
|
+
"@silverpoint/core": "0.3.0",
|
|
604
|
+
"@silverpoint/grounds": "0.3.0"
|
|
449
605
|
},
|
|
450
606
|
"peerDependencies": {
|
|
451
607
|
"react": "^18.2.0 || ^19.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/create-chart.tsx","../src/chart-svg.tsx","../src/chart-frame.tsx","../src/context.ts","../src/environment.ts","../src/overlay.tsx"],"sourcesContent":["import {\n inCell,\n instanceId,\n linkFrom,\n reduceInteraction,\n type ActiveItem,\n type ChartHandle,\n type ChartRecipe,\n type CommonChartProps,\n type InteractionEvent,\n type PointerKind,\n} from '@silverpoint/core';\nimport { renderChart, toSVGString } from '@silverpoint/grounds';\nimport {\n forwardRef,\n useContext,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type ForwardRefExoticComponent,\n type KeyboardEvent,\n type PointerEvent,\n type RefAttributes,\n} from 'react';\nimport { ChartFrame } from './chart-frame';\nimport type { CellChartProps } from './dashboard-markup';\nimport { DashboardLinkContext } from './link-context';\nimport { SilverpointContext } from './context';\nimport { useForcedPrecision, useMeasuredWidth, useTypefaceCheck } from './environment';\nimport { Overlay, type TooltipRenderer } from './overlay';\n\nexport type { ChartHandle };\n\n/** Interaction props of the client components (API Spec §9). */\nexport interface InteractionProps {\n /** The active item changed, or `null` when it cleared (REQ-141, REQ-143). */\n onActiveChange?: (item: ActiveItem | null) => void;\n /** An item was chosen by click, Enter or Space. */\n onSelect?: (item: ActiveItem) => void;\n /** Replaces the built-in readout (REQ-142). */\n tooltip?: TooltipRenderer;\n}\n\nexport type ClientChart<P> = ForwardRefExoticComponent<P & InteractionProps & RefAttributes<ChartHandle>>;\n\n/**\n * The client component of a recipe: it measures, renders through the core pipeline and forwards\n * interaction events to the core's reducer. Every client chart is this function applied to its\n * recipe, so the charts differ only in the recipe (Art. 2).\n */\nexport function createClientChart<P extends CommonChartProps>(recipe: ChartRecipe<P>): ClientChart<P> {\n const Chart = forwardRef<ChartHandle, P & InteractionProps & CellChartProps>(function Chart(allProps, ref) {\n const { onActiveChange, onSelect, tooltip } = allProps;\n const provider = useContext(SilverpointContext);\n const link = useContext(DashboardLinkContext);\n const generated = useId();\n const rootRef = useRef<HTMLDivElement>(null);\n const forcedPrecision = useForcedPrecision();\n useTypefaceCheck(recipe.name);\n const measured = useMeasuredWidth(rootRef, allProps.width === undefined);\n\n const rendered = useMemo(() => {\n // Inside a dashboard cell: its id, height and config, and its nominal width until measured\n // (REQ-206, REQ-207, REQ-209, REQ-212); the chart's own props win.\n const { dashboardCell, ...own } = allProps;\n const fitted = inCell(own as unknown as P, dashboardCell, recipe);\n return renderChart(recipe, fitted.props, {\n id: instanceId(recipe.name, generated),\n width: measured ?? fitted.width,\n provider,\n forcedPrecision,\n });\n // Keyed on the props object React hands in, which is stable across this component's own\n // state changes, so moving the pointer never re-inks the chart.\n }, [allProps, generated, measured, provider, forcedPrecision]);\n\n const [active, setActive] = useState<ActiveItem | null>(null);\n const dispatch = (event: InteractionEvent): boolean => {\n const result = reduceInteraction(rendered.geometry, active, event);\n if (result.changed) {\n setActive(result.active);\n onActiveChange?.(result.active);\n // In a linked dashboard this chart becomes the source, or clears the link (REQ-216, REQ-218).\n link?.set(linkFrom(link.key, rendered.id, result.active));\n }\n if (result.selected) onSelect?.(result.selected);\n return result.handled;\n };\n // WCAG 1.4.13: a readout shown by the pointer is dismissible with Escape wherever focus is.\n const latest = useRef(dispatch);\n latest.current = dispatch;\n const showing = active !== null;\n useEffect(() => {\n if (!showing) return undefined;\n const onKey = (event: globalThis.KeyboardEvent) => {\n if (event.key === 'Escape' && !rootRef.current?.contains(event.target as Node)) latest.current({ type: 'key', key: 'Escape' });\n };\n document.addEventListener('keydown', onKey);\n return () => document.removeEventListener('keydown', onKey);\n }, [showing]);\n const pointer = (type: 'pointer' | 'click') => (event: PointerEvent<HTMLDivElement>) => {\n const svg = rootRef.current?.querySelector('svg.sp-chart');\n if (!svg) return;\n const box = svg.getBoundingClientRect();\n dispatch({\n type,\n client: { x: event.clientX, y: event.clientY },\n box: { left: box.left, top: box.top, width: box.width, height: box.height },\n kind: (event.pointerType || 'mouse') as PointerKind,\n });\n };\n const rootProps = {\n tabIndex: 0,\n role: 'group',\n 'aria-label': rendered.name,\n onPointerMove: pointer('pointer'),\n onPointerDown: pointer('pointer'),\n onClick: pointer('click'),\n onPointerLeave: () => dispatch({ type: 'leave' }),\n onFocus: () => dispatch({ type: 'focus' }),\n onBlur: () => dispatch({ type: 'blur' }),\n onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => {\n if (dispatch({ type: 'key', key: event.key })) event.preventDefault();\n },\n };\n\n useImperativeHandle(\n ref,\n () => ({\n getGeometry: () => rendered.geometry,\n toSVGString: () => toSVGString(rendered),\n }),\n [rendered],\n );\n\n return (\n <ChartFrame\n rendered={rendered}\n className={allProps.className}\n rootRef={rootRef}\n rootProps={rootProps}\n overlay={<Overlay rendered={rendered} active={active} tooltip={tooltip} />}\n />\n );\n });\n Chart.displayName = recipe.name;\n return Chart as ClientChart<P>;\n}\n","import type { PathView, SvgView } from '@silverpoint/core';\n\nfunction Path({ path }: { readonly path: PathView }) {\n return (\n <path\n d={path.d}\n part={path.part}\n data-role={path.role}\n data-paint={path.paint}\n data-dash={path.dash ?? undefined}\n data-weight={path.weight ?? undefined}\n fill={path.fill ?? undefined}\n />\n );\n}\n\n/** Writes the core's SVG view one field to one attribute; computes nothing (Art. 2). */\nexport function ChartSvg({ view }: { readonly view: SvgView }) {\n const { svg } = view;\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={svg.viewBox}\n width={svg.width}\n height={svg.height}\n className={svg.class}\n data-substrate={svg.substrate}\n data-mode={svg.mode}\n role={svg.role}\n aria-labelledby={svg.labelledby}\n >\n <title id={view.title.id}>{view.title.text}</title>\n <desc id={view.desc.id}>{view.desc.text}</desc>\n {view.patterns.length > 0 && (\n <defs>\n {view.patterns.map((pattern) => (\n <pattern\n key={pattern.id}\n id={pattern.id}\n width={pattern.width}\n height={pattern.height}\n patternUnits=\"userSpaceOnUse\"\n patternTransform={pattern.transform}\n >\n {pattern.paths.map((path, index) => (\n <Path key={index} path={path} />\n ))}\n </pattern>\n ))}\n </defs>\n )}\n {view.paths.map((path, index) => (\n <Path key={index} path={path} />\n ))}\n {view.texts.map((text, index) => (\n <text key={index} x={text.x} y={text.y} part={text.part} data-kind={text.kind} textAnchor={text.anchor}>\n {text.text}\n </text>\n ))}\n </svg>\n );\n}\n","import type { DataTable } from '@silverpoint/core';\nimport type { RenderedChart } from '@silverpoint/grounds';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { ChartSvg } from './chart-svg';\n\nfunction Table({ table, id, visibility }: { readonly table: DataTable; readonly id: string; readonly visibility: string }) {\n return (\n <div className=\"sp-table-box\" data-visibility={visibility}>\n <table className=\"sp-table\" id={id} data-visibility={visibility}>\n <caption>{table.caption}</caption>\n <thead>\n <tr>\n {table.columns.map((column, index) => (\n <th key={index} scope=\"col\">\n {column}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {table.rows.map((row, index) => (\n <tr key={index}>\n {row.map((cell, column) =>\n column === 0 ? (\n <th key={column} scope=\"row\">\n {cell}\n </th>\n ) : (\n <td key={column}>{cell}</td>\n ),\n )}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\nexport interface ChartFrameProps {\n readonly rendered: RenderedChart;\n readonly className?: string;\n /** Interaction handlers and focus attributes, supplied by the client component only. */\n readonly rootProps?: HTMLAttributes<HTMLDivElement>;\n readonly rootRef?: Ref<HTMLDivElement>;\n /** Readout and marker, drawn over the chart by the client component. */\n readonly overlay?: ReactNode;\n}\n\n/** The chart's DOM: root, SVG, overlay and tabular alternative (API Spec §10). */\nexport function ChartFrame({ rendered, className, rootProps, rootRef, overlay }: ChartFrameProps) {\n const classes = ['sp-root', `sp-ground-${rendered.ground}`, className].filter(Boolean).join(' ');\n return (\n <div\n className={classes}\n data-substrate={rendered.substrate}\n data-chrome={rendered.chrome}\n data-status={rendered.status}\n ref={rootRef}\n {...rootProps}\n >\n <ChartSvg view={rendered.view} />\n {overlay}\n {rendered.dataTable !== 'none' && (\n <Table table={rendered.table} id={rendered.ids.table} visibility={rendered.dataTable} />\n )}\n </div>\n );\n}\n","import type { ProviderConfig } from '@silverpoint/core';\nimport { createContext } from 'react';\n\n/** Application-wide configuration (API Spec §8.1); a chart prop always wins over it. */\nexport const SilverpointContext = createContext<ProviderConfig>({});\n","import { checkTypeface, FORCED_PRECISION_QUERY } from '@silverpoint/core';\nimport { useEffect, useState, type RefObject } from 'react';\n\n/**\n * Whether the environment forces `precision` (REQ-123). Read after hydration, so the server\n * render and the first client render agree (REQ-103).\n */\nexport function useForcedPrecision(): boolean {\n const [forced, setForced] = useState(false);\n useEffect(() => {\n if (typeof matchMedia !== 'function') return;\n const query = matchMedia(FORCED_PRECISION_QUERY);\n const update = () => setForced(query.matches);\n update();\n query.addEventListener?.('change', update);\n return () => query.removeEventListener?.('change', update);\n }, []);\n return forced;\n}\n\n/** Width of the container, measured with ResizeObserver; `undefined` until measured (REQ-009). */\nexport function useMeasuredWidth(ref: RefObject<HTMLElement | null>, enabled: boolean): number | undefined {\n const [width, setWidth] = useState<number | undefined>(undefined);\n useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof ResizeObserver !== 'function') return;\n const observer = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) setWidth(entry.contentRect.width);\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled]);\n return width;\n}\n\n/** Reports SP013 when the display typeface fails to load; never blocks the render (REQ-032). */\nexport function useTypefaceCheck(chart: string): void {\n useEffect(() => {\n if (typeof document !== 'undefined' && document.fonts) void checkTypeface(document.fonts, chart);\n }, [chart]);\n}\n","import { linkedMarks, readout, type ActiveItem, type Readout } from '@silverpoint/core';\nimport type { RenderedChart } from '@silverpoint/grounds';\nimport { useContext, type ReactNode } from 'react';\nimport { DashboardLinkContext } from './link-context';\n\n/** A consumer-supplied readout renderer (REQ-142). */\nexport type TooltipRenderer = (active: ActiveItem, readout: Readout) => ReactNode;\n\n/**\n * Marker, readout and live region of the active item (REQ-141, REQ-122). Every number comes from\n * the core's `readout`; this component only places it.\n */\nexport function Overlay({\n rendered,\n active,\n tooltip,\n}: {\n readonly rendered: RenderedChart;\n readonly active: ActiveItem | null;\n readonly tooltip?: TooltipRenderer;\n}) {\n const current = active ? readout(rendered, active) : null;\n // Another chart's linked item, marked here and hidden from assistive technology (REQ-216, REQ-218).\n const linked = linkedMarks(rendered, useContext(DashboardLinkContext)?.state);\n return (\n <>\n {linked.length > 0 && (\n <svg className=\"sp-marker\" part=\"linked\" viewBox={rendered.view.svg.viewBox} aria-hidden=\"true\" focusable=\"false\">\n {linked.map((d, index) => (\n <path key={index} d={d} />\n ))}\n </svg>\n )}\n {current && active && (\n <>\n <svg className=\"sp-marker\" viewBox={rendered.view.svg.viewBox} aria-hidden=\"true\" focusable=\"false\">\n <path d={current.marker.d} />\n </svg>\n <div className=\"sp-readout\" style={{ left: current.left, top: current.top }} aria-hidden=\"true\">\n {tooltip ? (\n tooltip(active, current)\n ) : (\n <>\n <span className=\"sp-readout-heading\">{current.heading}</span>\n {current.text}\n </>\n )}\n </div>\n </>\n )}\n <div className=\"sp-live\" aria-live=\"polite\">\n {current ? current.announcement : ''}\n </div>\n </>\n );\n}\n"],"mappings":";;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP,SAAS,aAAa,mBAAmB;AACzC;AAAA,EACE;AAAA,EACA,cAAAA;AAAA,EACA,aAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAAC;AAAA,OAKK;;;ACtBH,cAgBA,YAhBA;AAFJ,SAAS,KAAK,EAAE,KAAK,GAAgC;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,GAAG,KAAK;AAAA,MACR,MAAM,KAAK;AAAA,MACX,aAAW,KAAK;AAAA,MAChB,cAAY,KAAK;AAAA,MACjB,aAAW,KAAK,QAAQ;AAAA,MACxB,eAAa,KAAK,UAAU;AAAA,MAC5B,MAAM,KAAK,QAAQ;AAAA;AAAA,EACrB;AAEJ;AAGO,SAAS,SAAS,EAAE,KAAK,GAA+B;AAC7D,QAAM,EAAE,IAAI,IAAI;AAChB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,SAAS,IAAI;AAAA,MACb,OAAO,IAAI;AAAA,MACX,QAAQ,IAAI;AAAA,MACZ,WAAW,IAAI;AAAA,MACf,kBAAgB,IAAI;AAAA,MACpB,aAAW,IAAI;AAAA,MACf,MAAM,IAAI;AAAA,MACV,mBAAiB,IAAI;AAAA,MAErB;AAAA,4BAAC,WAAM,IAAI,KAAK,MAAM,IAAK,eAAK,MA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AE,MAAM,QAAQ,CAAC;AAAA,MACzC,QAAQ,MAAM,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,MACvC,WAAW,CAAC,UAAyC;AACnD,YAAI,SAAS,EAAE,MAAM,OAAO,KAAK,MAAM,IAAI,CAAC,EAAG,OAAM,eAAe;AAAA,MACtE;AAAA,IACF;AAEA;AAAA,MACE;AAAA,MACA,OAAO;AAAA,QACL,aAAa,MAAM,SAAS;AAAA,QAC5B,aAAa,MAAM,YAAY,QAAQ;AAAA,MACzC;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AAEA,WACE,gBAAAJ;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,SAAS;AAAA,QACpB;AAAA,QACA;AAAA,QACA,SAAS,gBAAAA,KAAC,WAAQ,UAAoB,QAAgB,SAAkB;AAAA;AAAA,IAC1E;AAAA,EAEJ,CAAC;AACD,QAAM,cAAc,OAAO;AAC3B,SAAO;AACT;","names":["useContext","useEffect","useState","jsx","jsxs","jsx","jsxs","jsx","Chart","useContext","useState","useEffect"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|