@weasel-js/diagram 1.12.0 → 1.13.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/{chunk-DYDX6EJC.js → chunk-ESFIS7BB.js} +23 -18
- package/dist/chunk-ESFIS7BB.js.map +1 -0
- package/dist/{chunk-5GIP2LA6.js → chunk-FAQXYGMX.js} +3 -3
- package/dist/{chunk-5GIP2LA6.js.map → chunk-FAQXYGMX.js.map} +1 -1
- package/dist/{chunk-R2XB6D32.js → chunk-L4H444QI.js} +10 -9
- package/dist/chunk-L4H444QI.js.map +1 -0
- package/dist/{chunk-2SYY4W3B.js → chunk-QU4QZUC6.js} +16 -16
- package/dist/chunk-QU4QZUC6.js.map +1 -0
- package/dist/{chunk-GA4BX7SH.js → chunk-Y72FK3Y7.js} +3 -3
- package/dist/{chunk-GA4BX7SH.js.map → chunk-Y72FK3Y7.js.map} +1 -1
- package/dist/{dataTypes-DHdkzCL8.d.ts → dataTypes-DW-MljuN.d.ts} +1 -1
- package/dist/effect-audio.js +3 -3
- package/dist/effect.d.ts +2 -2
- package/dist/effect.js +9 -9
- package/dist/effect.js.map +1 -1
- package/dist/index.d.ts +18 -17
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +2 -2
- package/dist/{layout.entry-B-jJMc50.d.ts → layout.entry-CQoPNfzA.d.ts} +2 -5
- package/dist/layout.js +2 -2
- package/dist/{types-M_ccNAlk.d.ts → types-vbW21fHm.d.ts} +3 -3
- package/package.json +9 -9
- package/dist/chunk-2SYY4W3B.js.map +0 -1
- package/dist/chunk-DYDX6EJC.js.map +0 -1
- package/dist/chunk-R2XB6D32.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DerivedDep, PoseDescriptor, NodeShapeEntry, MarkerRef, Page, PageLayoutOptions, AddNodeSpec, Stroke, RectPose } from '@weasel-js/core';
|
|
2
2
|
import { Vec2 } from '@weasel-js/core/math';
|
|
3
|
-
import { E as EdgeHop, S as StyleField, P as PortAnchor, D as DiagramGroup, R as RowTextStyle, a as Row, O as Outline, b as PortSpec, B as BodySpec, c as DiagramLabel, L as LayoutPorts, d as LayoutFn, e as LayoutOptions, M as MeasureRowText, f as DiagramNode } from './types-
|
|
3
|
+
import { E as EdgeHop, S as StyleField, P as PortAnchor, D as DiagramGroup, R as RowTextStyle, a as Row, O as Outline, b as PortSpec, B as BodySpec, c as DiagramLabel, L as LayoutPorts, d as LayoutFn, e as LayoutOptions, M as MeasureRowText, f as DiagramNode } from './types-vbW21fHm.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Off-page markers as data: what a connector cut at the page gap holds, and
|
package/dist/effect-audio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { formatParam, uniqueStages, runOrder, paramValues, PREVIEW_DENSITY, closeBitmaps, previewsOf, PREVIEW_SIZE } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { formatParam, uniqueStages, runOrder, paramValues, PREVIEW_DENSITY, closeBitmaps, previewsOf, PREVIEW_SIZE } from './chunk-FAQXYGMX.js';
|
|
2
|
+
import './chunk-QU4QZUC6.js';
|
|
3
|
+
import './chunk-L4H444QI.js';
|
|
4
4
|
import { createMixNode, createFileSourceNode, compressorNode, reverbNode, delayNode, filterNode, createPanNode, createGainNode, createNoiseNode, createOscillatorNode } from '@weasel-js/audio';
|
|
5
5
|
import { useEffect, useSyncExternalStore, useMemo, useState } from 'react';
|
|
6
6
|
import { useVisibleRaf, useStableByContent, useLatest } from '@weasel-js/react';
|
package/dist/effect.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as EffectDoc, E as EffectPipeline, d as EffectWire, e as EffectStage, f as EffectPort, g as EffectGroup, a as EffectRun, b as EffectStageType, L as LookRoutes, h as EffectParamControl, i as EffectBox } from './stageTypes-DvnR8cKQ.js';
|
|
2
2
|
export { j as EffectParam, k as EffectPlaces, l as EffectStageRun, m as EffectType, n as LookRoute, o as formatParam, s as stageFromType } from './stageTypes-DvnR8cKQ.js';
|
|
3
|
-
import { D as DiagramTheme, a as DiagramData, b as DiagramSceneOptions, N as NodeStyle, c as DataEdge, E as EdgeStyle, d as DataNode, e as DiagramRouter, f as DiagramSpec } from './dataTypes-
|
|
4
|
-
import { a as Row, M as MeasureRowText } from './types-
|
|
3
|
+
import { D as DiagramTheme, a as DiagramData, b as DiagramSceneOptions, N as NodeStyle, c as DataEdge, E as EdgeStyle, d as DataNode, e as DiagramRouter, f as DiagramSpec } from './dataTypes-DW-MljuN.js';
|
|
4
|
+
import { a as Row, M as MeasureRowText } from './types-vbW21fHm.js';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { Paint } from '@weasel-js/core';
|
|
7
7
|
import { Vec2 } from '@weasel-js/core/math';
|
package/dist/effect.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DiagramView, reorderContribution, ANYWHERE, isBodyEnd, sequenceSlots } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { stageFromType, LOOK_THEME, drawableWires, uniqueStages, shownPorts, valueRowId, NO_VALUE, previewRowId, formatParam, stageStyle, PROBLEM_COLOR, typeColors, kindOf, boxNode, portOn, wireStyle, isControl, wireEdge, sceneStyles, uniqueGroups, wireEdges, exitLabel, splitProblem, checkPipeline, PREVIEW_DENSITY, runOrder, PREVIEW_SIZE, closeBitmaps, previewsOf, paramValues } from './chunk-
|
|
4
|
-
export { LOOK_THEME, NO_VALUE, PREVIEW_SIZE, PROBLEM_COLOR, checkPipeline, drawableWires, exitLabel, formatParam, isControl, kindOf, portOn, previewRowId, runOrder, shownPorts, stageFromType, stageRows, stageStyle, typeColors, uniqueGroups, uniqueStages, valueRowId, wireEdges, wireStyle } from './chunk-
|
|
5
|
-
import { diagramScene, diagramPages, edgeIdOf, titleIdOf, groupLabelIdOf, nestGroups, groupMinWidth, LABEL_PLACEMENT, EDGE_DERIVE_PATH } from './chunk-
|
|
6
|
-
import { portOf, insetOf, diagramNodeOf, DEFAULT_GROUP_INSET, SIDE_TRACK_GAP, widenForMinWidth, rankGaps, portSitesOf, labelCenter } from './chunk-
|
|
1
|
+
import { DiagramView, reorderContribution, ANYWHERE, isBodyEnd, sequenceSlots } from './chunk-ESFIS7BB.js';
|
|
2
|
+
import './chunk-Y72FK3Y7.js';
|
|
3
|
+
import { stageFromType, LOOK_THEME, drawableWires, uniqueStages, shownPorts, valueRowId, NO_VALUE, previewRowId, formatParam, stageStyle, PROBLEM_COLOR, typeColors, kindOf, boxNode, portOn, wireStyle, isControl, wireEdge, sceneStyles, uniqueGroups, wireEdges, exitLabel, splitProblem, checkPipeline, PREVIEW_DENSITY, runOrder, PREVIEW_SIZE, closeBitmaps, previewsOf, paramValues } from './chunk-FAQXYGMX.js';
|
|
4
|
+
export { LOOK_THEME, NO_VALUE, PREVIEW_SIZE, PROBLEM_COLOR, checkPipeline, drawableWires, exitLabel, formatParam, isControl, kindOf, portOn, previewRowId, runOrder, shownPorts, stageFromType, stageRows, stageStyle, typeColors, uniqueGroups, uniqueStages, valueRowId, wireEdges, wireStyle } from './chunk-FAQXYGMX.js';
|
|
5
|
+
import { diagramScene, diagramPages, edgeIdOf, titleIdOf, groupLabelIdOf, nestGroups, groupMinWidth, LABEL_PLACEMENT, EDGE_DERIVE_PATH } from './chunk-QU4QZUC6.js';
|
|
6
|
+
import { portOf, insetOf, diagramNodeOf, DEFAULT_GROUP_INSET, SIDE_TRACK_GAP, widenForMinWidth, rankGaps, portSitesOf, labelCenter } from './chunk-L4H444QI.js';
|
|
7
7
|
import { polygonFromPoints } from '@weasel-js/core/math';
|
|
8
8
|
import { forwardRef, useMemo, useRef, useState, useImperativeHandle, useEffect, useCallback, useSyncExternalStore } from 'react';
|
|
9
9
|
import { useLatest, bitmapSrc, ActionDisabledReason, pointAlongPath } from '@weasel-js/core';
|
|
@@ -141,7 +141,7 @@ function wireEnds(specs, edge) {
|
|
|
141
141
|
const [from, to] = spec?.dependsOn ?? [];
|
|
142
142
|
const point = (node, port) => {
|
|
143
143
|
const n = node === void 0 || port === void 0 ? void 0 : specs.find((s) => s.id === node);
|
|
144
|
-
return n === void 0 ? void 0 : portOf({ id: node, kind: n.kind ?? "
|
|
144
|
+
return n === void 0 ? void 0 : portOf({ id: node, kind: n.kind ?? "mark", data: n.data }, n.pose, port)?.point;
|
|
145
145
|
};
|
|
146
146
|
const a = point(from, trait?.from?.port);
|
|
147
147
|
const b = point(to, trait?.to?.port);
|
|
@@ -866,7 +866,7 @@ function costSpec(stage, own, of, text, problem) {
|
|
|
866
866
|
}));
|
|
867
867
|
return {
|
|
868
868
|
id: `${stage.id}/cost`,
|
|
869
|
-
kind: "
|
|
869
|
+
kind: "mark",
|
|
870
870
|
layer: "main",
|
|
871
871
|
pickable: false,
|
|
872
872
|
pose: { x: box.x + box.width - width, y: top - height - COST_GAP, width, height },
|
|
@@ -1502,7 +1502,7 @@ function sizesOf(nodes, groups, measure) {
|
|
|
1502
1502
|
const specs = diagramScene({ nodes, edges: [], groups }, { layout: "none", ...measure !== void 0 ? { measure } : {} });
|
|
1503
1503
|
const pose = new Map(specs.map((s) => [s.id, s.pose]));
|
|
1504
1504
|
const spec = new Map(specs.map((s) => [s.id, s]));
|
|
1505
|
-
const nested = nestGroups(groups, (id) => nodes.some((n) => n.id === id)).map((g) => ({ members: g.members, inset: insetOf(diagramNodeOf({ id: g.id, kind: "
|
|
1505
|
+
const nested = nestGroups(groups, (id) => nodes.some((n) => n.id === id)).map((g) => ({ members: g.members, inset: insetOf(diagramNodeOf({ id: g.id, kind: "mark", data: spec.get(g.id)?.data })?.group?.inset) }));
|
|
1506
1506
|
const boxed = (id, side) => nested.reduce((sum, g) => sum + (g.members.includes(id) ? g.inset[side] : 0), 0);
|
|
1507
1507
|
const titles = new Map(groups.flatMap((g) => {
|
|
1508
1508
|
const title2 = pose.get(groupLabelIdOf(g.id));
|