@marimo-team/islands 0.25.3-dev27 → 0.25.3-dev29
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/{ConnectedDataExplorerComponent-DfG3PRaJ.js → ConnectedDataExplorerComponent-7EaP9VWb.js} +7 -7
- package/dist/{ErrorBoundary-DKAio_E4.js → ErrorBoundary-ysC54Xwn.js} +2 -2
- package/dist/{abnfDiagram-VCTEODGH-B3w-XWX8.js → abnfDiagram-VCTEODGH-z_OSynK8.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-C18U9A6k.js → architectureDiagram-5GKGNRK7-Cs8J8BZr.js} +1 -1
- package/dist/{chat-ui-DDJuqS87.js → chat-ui-0udY4hpv.js} +13 -13
- package/dist/{chunk-IMKFNOWR-CrS5bzqW.js → chunk-IMKFNOWR-aoSFasqF.js} +1 -1
- package/dist/{chunk-SHT3W25Y-StpvPvUG.js → chunk-SHT3W25Y-CMaybO3O.js} +1 -1
- package/dist/{chunk-SVP7TREG-CBXjbYZC.js → chunk-SVP7TREG-BNBrTAw1.js} +1 -1
- package/dist/{chunk-TICWLB2K-Dp6bIb-q.js → chunk-TICWLB2K-DXNxvUJn.js} +1 -1
- package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
- package/dist/{classDiagram-ZZMXUADV-BFYuxV5g.js → classDiagram-ZZMXUADV-DXdCCDOg.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-D_tjXVMl.js → classDiagram-v2-VYDZK3BY-DyZqrtLP.js} +2 -2
- package/dist/{code-visibility-CFvLbCZJ.js → code-visibility-CZmyRTO8.js} +4 -4
- package/dist/{common-1HUDUr7W.js → common-CCrzSQnL.js} +14 -14
- package/dist/{cynefinDiagram-5FMLGOSQ-DSgYrHB2.js → cynefinDiagram-5FMLGOSQ-DWHuKJs8.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-GYlruCBf.js → dagre-GXQ25YYZ-DYLu-OCU.js} +1 -1
- package/dist/{data-grid-overlay-editor-ZxoN8gVB.js → data-grid-overlay-editor-B141KnZO.js} +5 -5
- package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-DRu5LX5_.js → diagram-S7CK7UJ4-PwwcUOHP.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-DD7uiejP.js → diagram-UQ7AKVKN-CvJbL_IM.js} +1 -1
- package/dist/{diagram-VX7I27RA-ByH9KAJJ.js → diagram-VX7I27RA-B5RkqnzN.js} +1 -1
- package/dist/{diagram-Z3DM3KII-BsQHPRke.js → diagram-Z3DM3KII-CyijwTR2.js} +1 -1
- package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
- package/dist/{dropdown-menu-DHP9P4VE.js → dropdown-menu-BuE2b8Yb.js} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-CQRK5_eT.js → ebnfDiagram-PWID7BFC-DG90ELFp.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-BKtWrDVh.js → erDiagram-RLTQ6QDP-FMo_SpyX.js} +1 -1
- package/dist/{error-entries-Cz3yNs7w.js → error-entries-DgtRTNaG.js} +5 -5
- package/dist/{feedback-button-B2JRVQRd.js → feedback-button-CykZqHY-.js} +5 -5
- package/dist/{flowDiagram-HODETNUW-1IN-ih2E.js → flowDiagram-HODETNUW-DQ4JuadE.js} +2 -2
- package/dist/{formats-Buu00Z2q.js → formats-DRHUWwSK.js} +2 -2
- package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
- package/dist/{glide-data-editor-BBgCAPbk.js → glide-data-editor-DLHbRbsj.js} +51 -51
- package/dist/{glide-utils-DM9zBO4W.js → glide-utils-pisbYVjH.js} +1 -1
- package/dist/{globals-DhH_o2tF.js → globals-D2g1BHQ0.js} +2 -2
- package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
- package/dist/{html-to-image-DWTzN7q3.js → html-to-image--r0l9wUy.js} +7 -7
- package/dist/{infoDiagram-27XIBGKW-CkB-zr4p.js → infoDiagram-27XIBGKW-CRSDtRrd.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-wlyLjBmM.js → ishikawaDiagram-5VMMS53U-DxLEUldB.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-C2usY0i-.js → kanban-definition-UXKFOSKX-BLhvu8o4.js} +1 -1
- package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
- package/dist/{loader-BQOfjTIJ.js → loader-BPdQhmlq.js} +10 -10
- package/dist/main.js +24 -24
- package/dist/{mermaid-BA-Z6wGL.js → mermaid-Bjm6C1qN.js} +36 -36
- package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
- package/dist/{mindmap-definition-YA3MSWOX-nKOWS8RR.js → mindmap-definition-YA3MSWOX-g2LwxnYQ.js} +1 -1
- package/dist/{number-overlay-editor-CvLhxHLb.js → number-overlay-editor-DHqP6YVn.js} +3 -3
- package/dist/{pegDiagram-XKGWAZYB-Dac9EIKD.js → pegDiagram-XKGWAZYB-CpMAt3Qs.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-B7S-DsW_.js → pieDiagram-E7YTZNPT-CVTthoZo.js} +1 -1
- package/dist/precisionRound-DhAzeRcm.js +49 -0
- package/dist/{process-output-B-KBO95p.js → process-output-CuIlhYwn.js} +2 -2
- package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-Cfa5Q-hr.js → railroadDiagram-O6MQD6OU-ao8cqqFB.js} +2 -2
- package/dist/{react-vega-BED0DjiB.js → react-vega-BDpbvBCb.js} +12284 -12270
- package/dist/{requirementDiagram-BXWQKSXE-d8zXCJIk.js → requirementDiagram-BXWQKSXE--J8vyfm-.js} +1 -1
- package/dist/{reveal-component-C9BavSsS.js → reveal-component-DYHhtPqq.js} +6 -6
- package/dist/{sequenceDiagram-WJ2MYXX4-b6pei3lJ.js → sequenceDiagram-WJ2MYXX4-CiQbn62x.js} +1 -1
- package/dist/{spec-BJzgmvVa.js → spec-D_u2ipzF.js} +1 -1
- package/dist/{stateDiagram-D77RDMKH-Be-xSpaZ.js → stateDiagram-D77RDMKH-DVEeGs5b.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-5Y-FxesJ.js → stateDiagram-v2-MP3YSRHH-1OQRe6iA.js} +2 -2
- package/dist/{swimlanes-42K2YHIH-nRRl4NU0.js → swimlanes-42K2YHIH-CqkGoGqn.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-BS79510V.js → swimlanesDiagram-VR7AAH4N-CszjkrKo.js} +2 -2
- package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
- package/dist/{timeline-definition-24CTP7MA-Cfzf8WPf.js → timeline-definition-24CTP7MA-DLRUNVAx.js} +1 -1
- package/dist/{toDate-CJWU9dyl.js → toDate-gyi35XS2.js} +6 -6
- package/dist/{useAsyncData-BD534XmW.js → useAsyncData-BneN349z.js} +1 -1
- package/dist/{useDeepCompareMemoize-C72_RNsu.js → useDeepCompareMemoize-Z_7R8wTt.js} +1 -1
- package/dist/{useLifecycle-BGWzTwHK.js → useLifecycle-Dfq8UD-b.js} +1 -1
- package/dist/{useTheme-BhQvec43.js → useTheme-Bu5bBgrh.js} +3 -3
- package/dist/{vega-component-nB1kV6sb.js → vega-component-1lFfDE_8.js} +8 -8
- package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container-BgKnsDbB.js} +2 -2
- package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-CpbZAXub.js} +297 -506
- package/dist/{vennDiagram-4TSXK5OY-CeY6Z1xZ.js → vennDiagram-4TSXK5OY-CypgoBVZ.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-Cxs9NtVi.js → wardleyDiagram-VM6X3IG4-B6xjiQ_g.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-DNWbvPK7.js → xychartDiagram-S5SC5T6Z-e0PefDVs.js} +2 -2
- package/package.json +2 -1
- package/src/core/host/__tests__/protocol.test.ts +15 -0
- package/src/core/host/protocol.ts +8 -5
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
- package/dist/precisionRound-DMIVQrt2.js +0 -97
|
@@ -3,7 +3,7 @@ import { t } from "./src-CA_m4ONl.js";
|
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
5
|
import { t as _ } from "./rough.esm-CtV9AnV1.js";
|
|
6
|
-
import { p as v } from "./mermaid-
|
|
6
|
+
import { p as v } from "./mermaid-Bjm6C1qN.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
|
|
8
8
|
var y = (e, t) => p(e, "a", -t), b = 1e-10;
|
|
9
9
|
function x(e, t) {
|
|
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
2
2
|
import { n as t } from "./src-CA_m4ONl.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
|
-
import { p as m } from "./mermaid-
|
|
5
|
+
import { p as m } from "./mermaid-Bjm6C1qN.js";
|
|
6
6
|
import { n as h } from "./mermaid-parser.core-DxuSfYwJ.js";
|
|
7
7
|
import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./linear-
|
|
1
|
+
import { t as e } from "./linear-DWERh7eI.js";
|
|
2
2
|
import { n as t } from "./ordinal-c7efuCSS.js";
|
|
3
3
|
import { t as n } from "./range-BAIvbVHp.js";
|
|
4
4
|
import { q as r } from "./cubic-OaEBhQPK.js";
|
|
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
|
9
9
|
import { D as c, H as l, K as u, U as d, a as f, b as p, c as m, f as h, v as g, w as _, y as v, z as y } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
10
10
|
import "./chunk-PWAF6VOD-CQw5qATZ.js";
|
|
11
11
|
import { t as b } from "./chunk-GMAD6QVW-BhaJx0X3.js";
|
|
12
|
-
import { p as x } from "./mermaid-
|
|
12
|
+
import { p as x } from "./mermaid-Bjm6C1qN.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
|
|
14
14
|
function S() {
|
|
15
15
|
var e = t().unknown(void 0), r = e.domain, i = e.range, o = 0, s = 1, c, l, u = !1, d = 0, f = 0, p = .5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/islands",
|
|
3
|
-
"version": "0.25.3-
|
|
3
|
+
"version": "0.25.3-dev29",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
"typescript-memoize": "^1.1.1",
|
|
153
153
|
"use-acp": "0.2.6",
|
|
154
154
|
"use-resize-observer": "^9.1.0",
|
|
155
|
+
"vega": "6.2.0",
|
|
155
156
|
"vega-lite": "6.4.3",
|
|
156
157
|
"vega-loader": "^5.1.3",
|
|
157
158
|
"vega-parser": "^7.1.3",
|
|
@@ -19,6 +19,7 @@ function readFixture(name: string): unknown {
|
|
|
19
19
|
const records = {
|
|
20
20
|
"record.json": Protocol.HostRecord,
|
|
21
21
|
"cell.json": Protocol.Cell,
|
|
22
|
+
"cell-withheld.json": Protocol.Cell,
|
|
22
23
|
"analysis.json": Protocol.Analysis,
|
|
23
24
|
"diagnostic.json": Protocol.Error,
|
|
24
25
|
"edit.json": Protocol.EditRequest,
|
|
@@ -111,6 +112,20 @@ describe("host protocol bindings", () => {
|
|
|
111
112
|
expect(Protocol.Document.parse(configured)).toEqual(configured);
|
|
112
113
|
});
|
|
113
114
|
|
|
115
|
+
it("requires source in edits while allowing withheld source in records", () => {
|
|
116
|
+
expectTypeOf<Protocol.Cell["code"]>().toEqualTypeOf<string | null>();
|
|
117
|
+
expectTypeOf<Protocol.CellInput["code"]>().toEqualTypeOf<string>();
|
|
118
|
+
const cell = Protocol.Cell.parse(readFixture("cell.json"));
|
|
119
|
+
const { code, ...missing } = cell;
|
|
120
|
+
expect(Protocol.Cell.safeParse(missing).success).toBe(false);
|
|
121
|
+
expect(Protocol.Cell.parse({ ...cell, code: "" }).code).toBe("");
|
|
122
|
+
for (const input of [{ id: cell.id }, { id: cell.id, code: null }]) {
|
|
123
|
+
expect(Protocol.CellInput.safeParse(input).success).toBe(false);
|
|
124
|
+
}
|
|
125
|
+
expect(Protocol.CellInput.parse({ id: cell.id, code }).code).toBe(code);
|
|
126
|
+
expect(Protocol.CellInput.parse({ id: cell.id, code: "" }).code).toBe("");
|
|
127
|
+
});
|
|
128
|
+
|
|
114
129
|
it("applies the defaults declared for cell inputs", () => {
|
|
115
130
|
expect(
|
|
116
131
|
Protocol.CellInput.parse({ id: "c3", code: "x = 1", config: {} }),
|
|
@@ -618,7 +618,7 @@ export const Execution = zod
|
|
|
618
618
|
.string()
|
|
619
619
|
.nullable()
|
|
620
620
|
.describe(
|
|
621
|
-
"The submitted code for an execution with no cell. Null for a cell's execution
|
|
621
|
+
"The submitted code for an execution with no cell. Null for a cell's execution; its source is available through the cell when the host exposes it.",
|
|
622
622
|
),
|
|
623
623
|
code_hash: Etag.describe(
|
|
624
624
|
"The `code_hash` of the code that was evaluated, computed as a cell's is.",
|
|
@@ -715,7 +715,9 @@ export const CellConfig = zod
|
|
|
715
715
|
disabled: zod.boolean().describe("Whether the cell is kept from running."),
|
|
716
716
|
hide_code: zod
|
|
717
717
|
.boolean()
|
|
718
|
-
.describe(
|
|
718
|
+
.describe(
|
|
719
|
+
"Whether clients hide the code by default. This is a presentation preference; source availability is represented by `Cell.code`.",
|
|
720
|
+
),
|
|
719
721
|
expand_output: zod
|
|
720
722
|
.boolean()
|
|
721
723
|
.describe(
|
|
@@ -771,8 +773,9 @@ export const Cell = zod
|
|
|
771
773
|
notebook_id: NotebookId,
|
|
772
774
|
code: zod
|
|
773
775
|
.string()
|
|
776
|
+
.nullable()
|
|
774
777
|
.describe(
|
|
775
|
-
"The cell's source code, with newline line endings. A host normalizes other line endings when it loads a file.",
|
|
778
|
+
"The cell's source code, with newline line endings, or null when the host does not expose source to this client. An empty string is an empty cell. A host normalizes other line endings when it loads a file. Source availability does not grant editing permission; see the notebook's operations.",
|
|
776
779
|
),
|
|
777
780
|
name: zod
|
|
778
781
|
.string()
|
|
@@ -784,7 +787,7 @@ export const Cell = zod
|
|
|
784
787
|
"Identifies code, name, and config together, and is the precondition for editing the cell. Its text is `code_hash`, `name`, and the config values `column`, `disabled`, `hide_code`, and `expand_output` in that order, each written as a JSON scalar such as `null`, `0`, or `true`.",
|
|
785
788
|
),
|
|
786
789
|
code_hash: Etag.describe(
|
|
787
|
-
"Identifies the code alone. Its text is `code
|
|
790
|
+
"Identifies the code alone. Its text is the actual source, even when `code` is null. Withholding source does not change this hash, the cell or document etags, or their versions. Unchanged by renaming the cell or editing its config. Compare with an execution's `code_hash` to tell whether a result came from the current code without needing the source.",
|
|
788
791
|
),
|
|
789
792
|
version: zod
|
|
790
793
|
.int()
|
|
@@ -1800,7 +1803,7 @@ export const CellInput = zod
|
|
|
1800
1803
|
config: CellConfigInput.optional(),
|
|
1801
1804
|
})
|
|
1802
1805
|
.describe(
|
|
1803
|
-
"A cell as a client writes it. The host derives the etags and the analysis.",
|
|
1806
|
+
"A cell as a client writes it. Code must be a string, even when the host withholds source in cell records. Null is not an edit or a request to preserve existing source. The host derives the etags and the analysis.",
|
|
1804
1807
|
);
|
|
1805
1808
|
|
|
1806
1809
|
export type CellInput = zod.input<typeof CellInput>;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { a as e } from "./defaultLocale-DhPPeApV.js";
|
|
2
|
-
//#region ../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js
|
|
3
|
-
function t(e, t) {
|
|
4
|
-
return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
5
|
-
}
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region ../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/descending.js
|
|
8
|
-
function n(e, t) {
|
|
9
|
-
return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region ../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js
|
|
13
|
-
function r(e) {
|
|
14
|
-
let r, a, o;
|
|
15
|
-
e.length === 2 ? (r = e === t || e === n ? e : i, a = e, o = e) : (r = t, a = (n, r) => t(e(n), r), o = (t, n) => e(t) - n);
|
|
16
|
-
function s(e, t, n = 0, i = e.length) {
|
|
17
|
-
if (n < i) {
|
|
18
|
-
if (r(t, t) !== 0) return i;
|
|
19
|
-
do {
|
|
20
|
-
let r = n + i >>> 1;
|
|
21
|
-
a(e[r], t) < 0 ? n = r + 1 : i = r;
|
|
22
|
-
} while (n < i);
|
|
23
|
-
}
|
|
24
|
-
return n;
|
|
25
|
-
}
|
|
26
|
-
function c(e, t, n = 0, i = e.length) {
|
|
27
|
-
if (n < i) {
|
|
28
|
-
if (r(t, t) !== 0) return i;
|
|
29
|
-
do {
|
|
30
|
-
let r = n + i >>> 1;
|
|
31
|
-
a(e[r], t) <= 0 ? n = r + 1 : i = r;
|
|
32
|
-
} while (n < i);
|
|
33
|
-
}
|
|
34
|
-
return n;
|
|
35
|
-
}
|
|
36
|
-
function l(e, t, n = 0, r = e.length) {
|
|
37
|
-
let i = s(e, t, n, r - 1);
|
|
38
|
-
return i > n && o(e[i - 1], t) > -o(e[i], t) ? i - 1 : i;
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
left: s,
|
|
42
|
-
center: l,
|
|
43
|
-
right: c
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function i() {
|
|
47
|
-
return 0;
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region ../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js
|
|
51
|
-
var a = Math.sqrt(50), o = Math.sqrt(10), s = Math.sqrt(2);
|
|
52
|
-
function c(e, t, n) {
|
|
53
|
-
let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / 10 ** i, u = l >= a ? 10 : l >= o ? 5 : l >= s ? 2 : 1, d, f, p;
|
|
54
|
-
return i < 0 ? (p = 10 ** -i / u, d = Math.round(e * p), f = Math.round(t * p), d / p < e && ++d, f / p > t && --f, p = -p) : (p = 10 ** i * u, d = Math.round(e / p), f = Math.round(t / p), d * p < e && ++d, f * p > t && --f), f < d && .5 <= n && n < 2 ? c(e, t, n * 2) : [
|
|
55
|
-
d,
|
|
56
|
-
f,
|
|
57
|
-
p
|
|
58
|
-
];
|
|
59
|
-
}
|
|
60
|
-
function l(e, t, n) {
|
|
61
|
-
if (t = +t, e = +e, n = +n, !(n > 0)) return [];
|
|
62
|
-
if (e === t) return [e];
|
|
63
|
-
let r = t < e, [i, a, o] = r ? c(t, e, n) : c(e, t, n);
|
|
64
|
-
if (!(a >= i)) return [];
|
|
65
|
-
let s = a - i + 1, l = Array(s);
|
|
66
|
-
if (r) {
|
|
67
|
-
if (o < 0) for (let e = 0; e < s; ++e) l[e] = (a - e) / -o;
|
|
68
|
-
else for (let e = 0; e < s; ++e) l[e] = (a - e) * o;
|
|
69
|
-
} else if (o < 0) for (let e = 0; e < s; ++e) l[e] = (i + e) / -o;
|
|
70
|
-
else for (let e = 0; e < s; ++e) l[e] = (i + e) * o;
|
|
71
|
-
return l;
|
|
72
|
-
}
|
|
73
|
-
function u(e, t, n) {
|
|
74
|
-
return t = +t, e = +e, n = +n, c(e, t, n)[2];
|
|
75
|
-
}
|
|
76
|
-
function d(e, t, n) {
|
|
77
|
-
t = +t, e = +e, n = +n;
|
|
78
|
-
let r = t < e, i = r ? u(t, e, n) : u(e, t, n);
|
|
79
|
-
return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region ../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionFixed.js
|
|
83
|
-
function f(t) {
|
|
84
|
-
return Math.max(0, -e(Math.abs(t)));
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region ../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionPrefix.js
|
|
88
|
-
function p(t, n) {
|
|
89
|
-
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(e(n) / 3))) * 3 - e(Math.abs(t)));
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region ../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionRound.js
|
|
93
|
-
function m(t, n) {
|
|
94
|
-
return t = Math.abs(t), n = Math.abs(n) - t, Math.max(0, e(n) - e(t)) + 1;
|
|
95
|
-
}
|
|
96
|
-
//#endregion
|
|
97
|
-
export { d as a, t as c, u as i, p as n, l as o, f as r, r as s, m as t };
|