@pixerate/editor-react 0.111.0 → 0.112.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/chart/index.cjs +13 -0
- package/dist/chart/index.js +1 -1
- package/dist/{chunk-VTLCQXIY.js → chunk-3MUK5ASL.js} +14 -0
- package/dist/index.cjs +13 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/chart/index.cjs
CHANGED
|
@@ -780,6 +780,19 @@ function ChartInspector({ controller, sections, className }) {
|
|
|
780
780
|
onChange: (e) => controller.update({ gapWidth: Number(e.currentTarget.value) })
|
|
781
781
|
}
|
|
782
782
|
) }),
|
|
783
|
+
spec.type === "choropleth" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Field, { label: "Map", htmlFor: `${idBase}-map`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("select", { id: `${idBase}-map`, className: chartInputClass, value: spec.map, "data-option": "map", onChange: (e) => controller.update({ map: e.currentTarget.value }), children: [.../* @__PURE__ */ new Set([spec.map, ...(0, import_chart4.listChartMaps)().map((m) => m.id)])].map((id) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: id, children: (0, import_chart4.listChartMaps)().find((m) => m.id === id)?.name ?? `${id} (not loaded)` }, id)) }) }),
|
|
784
|
+
spec.type === "choropleth" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Field, { label: "Classes", htmlFor: `${idBase}-map-steps`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChartCommitInput, { id: `${idBase}-map-steps`, value: String(spec.mapSteps), inputMode: "numeric", "data-option": "mapSteps", disabled: spec.mapThresholds.length > 0, className: chartInputClass, onCommit: (text) => controller.update({ mapSteps: Number(text) }).ok }) }),
|
|
785
|
+
spec.type === "choropleth" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Field, { label: "Breaks", htmlFor: `${idBase}-map-breaks`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
786
|
+
ChartCommitInput,
|
|
787
|
+
{
|
|
788
|
+
id: `${idBase}-map-breaks`,
|
|
789
|
+
value: spec.mapThresholds.join(", "),
|
|
790
|
+
placeholder: "Equal classes",
|
|
791
|
+
"data-option": "mapThresholds",
|
|
792
|
+
className: chartInputClass,
|
|
793
|
+
onCommit: (text) => controller.update({ mapThresholds: text.trim() ? text.split(",").map((t) => Number(t.trim())) : [] }).ok
|
|
794
|
+
}
|
|
795
|
+
) }),
|
|
783
796
|
spec.type === "barrace" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Field, { label: "Bars", htmlFor: `${idBase}-race-top`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChartCommitInput, { id: `${idBase}-race-top`, value: String(spec.raceTopN), inputMode: "numeric", "data-option": "raceTopN", className: chartInputClass, onCommit: (text) => controller.update({ raceTopN: Number(text) }).ok }) }),
|
|
784
797
|
spec.type === "barrace" && spec.categories.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Field, { label: "Time", htmlFor: `${idBase}-race-frame`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
785
798
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: chartButtonClass, "data-action": "race-play", "aria-label": racePlaying ? "Pause the race" : "Play the race", onClick: () => racePlaying ? controller.pauseRace() : controller.playRace(), children: racePlaying ? "Pause" : "Play" }),
|
package/dist/chart/index.js
CHANGED
|
@@ -550,6 +550,7 @@ import {
|
|
|
550
550
|
parseChartAmountList,
|
|
551
551
|
chartSeriesType,
|
|
552
552
|
isCartesianChart,
|
|
553
|
+
listChartMaps,
|
|
553
554
|
suggestChartReferences
|
|
554
555
|
} from "@pixerate/editor/chart";
|
|
555
556
|
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -785,6 +786,19 @@ function ChartInspector({ controller, sections, className }) {
|
|
|
785
786
|
onChange: (e) => controller.update({ gapWidth: Number(e.currentTarget.value) })
|
|
786
787
|
}
|
|
787
788
|
) }),
|
|
789
|
+
spec.type === "choropleth" && /* @__PURE__ */ jsx3(Field, { label: "Map", htmlFor: `${idBase}-map`, children: /* @__PURE__ */ jsx3("select", { id: `${idBase}-map`, className: chartInputClass, value: spec.map, "data-option": "map", onChange: (e) => controller.update({ map: e.currentTarget.value }), children: [.../* @__PURE__ */ new Set([spec.map, ...listChartMaps().map((m) => m.id)])].map((id) => /* @__PURE__ */ jsx3("option", { value: id, children: listChartMaps().find((m) => m.id === id)?.name ?? `${id} (not loaded)` }, id)) }) }),
|
|
790
|
+
spec.type === "choropleth" && /* @__PURE__ */ jsx3(Field, { label: "Classes", htmlFor: `${idBase}-map-steps`, children: /* @__PURE__ */ jsx3(ChartCommitInput, { id: `${idBase}-map-steps`, value: String(spec.mapSteps), inputMode: "numeric", "data-option": "mapSteps", disabled: spec.mapThresholds.length > 0, className: chartInputClass, onCommit: (text) => controller.update({ mapSteps: Number(text) }).ok }) }),
|
|
791
|
+
spec.type === "choropleth" && /* @__PURE__ */ jsx3(Field, { label: "Breaks", htmlFor: `${idBase}-map-breaks`, children: /* @__PURE__ */ jsx3(
|
|
792
|
+
ChartCommitInput,
|
|
793
|
+
{
|
|
794
|
+
id: `${idBase}-map-breaks`,
|
|
795
|
+
value: spec.mapThresholds.join(", "),
|
|
796
|
+
placeholder: "Equal classes",
|
|
797
|
+
"data-option": "mapThresholds",
|
|
798
|
+
className: chartInputClass,
|
|
799
|
+
onCommit: (text) => controller.update({ mapThresholds: text.trim() ? text.split(",").map((t) => Number(t.trim())) : [] }).ok
|
|
800
|
+
}
|
|
801
|
+
) }),
|
|
788
802
|
spec.type === "barrace" && /* @__PURE__ */ jsx3(Field, { label: "Bars", htmlFor: `${idBase}-race-top`, children: /* @__PURE__ */ jsx3(ChartCommitInput, { id: `${idBase}-race-top`, value: String(spec.raceTopN), inputMode: "numeric", "data-option": "raceTopN", className: chartInputClass, onCommit: (text) => controller.update({ raceTopN: Number(text) }).ok }) }),
|
|
789
803
|
spec.type === "barrace" && spec.categories.length > 1 && /* @__PURE__ */ jsx3(Field, { label: "Time", htmlFor: `${idBase}-race-frame`, children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-1", children: [
|
|
790
804
|
/* @__PURE__ */ jsx3("button", { type: "button", className: chartButtonClass, "data-action": "race-play", "aria-label": racePlaying ? "Pause the race" : "Play the race", onClick: () => racePlaying ? controller.pauseRace() : controller.playRace(), children: racePlaying ? "Pause" : "Play" }),
|
package/dist/index.cjs
CHANGED
|
@@ -11892,6 +11892,19 @@ function ChartInspector({ controller, sections, className }) {
|
|
|
11892
11892
|
onChange: (e) => controller.update({ gapWidth: Number(e.currentTarget.value) })
|
|
11893
11893
|
}
|
|
11894
11894
|
) }),
|
|
11895
|
+
spec.type === "choropleth" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: "Map", htmlFor: `${idBase}-map`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("select", { id: `${idBase}-map`, className: chartInputClass, value: spec.map, "data-option": "map", onChange: (e) => controller.update({ map: e.currentTarget.value }), children: [.../* @__PURE__ */ new Set([spec.map, ...(0, import_chart4.listChartMaps)().map((m) => m.id)])].map((id) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("option", { value: id, children: (0, import_chart4.listChartMaps)().find((m) => m.id === id)?.name ?? `${id} (not loaded)` }, id)) }) }),
|
|
11896
|
+
spec.type === "choropleth" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: "Classes", htmlFor: `${idBase}-map-steps`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ChartCommitInput, { id: `${idBase}-map-steps`, value: String(spec.mapSteps), inputMode: "numeric", "data-option": "mapSteps", disabled: spec.mapThresholds.length > 0, className: chartInputClass, onCommit: (text) => controller.update({ mapSteps: Number(text) }).ok }) }),
|
|
11897
|
+
spec.type === "choropleth" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: "Breaks", htmlFor: `${idBase}-map-breaks`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
11898
|
+
ChartCommitInput,
|
|
11899
|
+
{
|
|
11900
|
+
id: `${idBase}-map-breaks`,
|
|
11901
|
+
value: spec.mapThresholds.join(", "),
|
|
11902
|
+
placeholder: "Equal classes",
|
|
11903
|
+
"data-option": "mapThresholds",
|
|
11904
|
+
className: chartInputClass,
|
|
11905
|
+
onCommit: (text) => controller.update({ mapThresholds: text.trim() ? text.split(",").map((t) => Number(t.trim())) : [] }).ok
|
|
11906
|
+
}
|
|
11907
|
+
) }),
|
|
11895
11908
|
spec.type === "barrace" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: "Bars", htmlFor: `${idBase}-race-top`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ChartCommitInput, { id: `${idBase}-race-top`, value: String(spec.raceTopN), inputMode: "numeric", "data-option": "raceTopN", className: chartInputClass, onCommit: (text) => controller.update({ raceTopN: Number(text) }).ok }) }),
|
|
11896
11909
|
spec.type === "barrace" && spec.categories.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: "Time", htmlFor: `${idBase}-race-frame`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
11897
11910
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", className: chartButtonClass, "data-action": "race-play", "aria-label": racePlaying ? "Pause the race" : "Play the race", onClick: () => racePlaying ? controller.pauseRace() : controller.playRace(), children: racePlaying ? "Pause" : "Play" }),
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.112.0",
|
|
4
4
|
"description": "React bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
},
|
|
259
259
|
"peerDependencies": {
|
|
260
260
|
"@dagrejs/dagre": "^1.1.8",
|
|
261
|
-
"@pixerate/editor": ">=0.
|
|
261
|
+
"@pixerate/editor": ">=0.167.0 <1.0.0-0",
|
|
262
262
|
"@tiptap/core": "^2.27.3",
|
|
263
263
|
"@tiptap/pm": "^2.27.3",
|
|
264
264
|
"@tiptap/react": "^2.27.3",
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
"tsup": "^9.0.0",
|
|
286
286
|
"typescript": "^5.7.3",
|
|
287
287
|
"vitest": "^5.0.5",
|
|
288
|
-
"@pixerate/editor": "0.
|
|
288
|
+
"@pixerate/editor": "0.167.0"
|
|
289
289
|
},
|
|
290
290
|
"scripts": {
|
|
291
291
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|