@miadi/stateloom-canvas 0.1.5 → 0.1.6

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/icons.js ADDED
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ function Icon({ size = 16, children, ...rest }) {
3
+ return (_jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", className: "slc-icon", ...rest, children: children }));
4
+ }
5
+ export function MicIcon(p) {
6
+ return (_jsxs(Icon, { ...p, children: [_jsx("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }), _jsx("path", { d: "M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21M8.5 21h7" })] }));
7
+ }
8
+ export function SpeakerIcon(p) {
9
+ return (_jsxs(Icon, { ...p, children: [_jsx("path", { d: "M4 9.5h3.5L12 5.5v13l-4.5-4H4z" }), _jsx("path", { d: "M15.5 9a4 4 0 0 1 0 6M18 6.5a7.5 7.5 0 0 1 0 11" })] }));
10
+ }
11
+ export function SpeakerOffIcon(p) {
12
+ return (_jsxs(Icon, { ...p, children: [_jsx("path", { d: "M4 9.5h3.5L12 5.5v13l-4.5-4H4z" }), _jsx("path", { d: "M16 10l4 4M20 10l-4 4" })] }));
13
+ }
14
+ /** A speech bubble: the marks on a drawing, what people said about it. */
15
+ export function MarksIcon(p) {
16
+ return (_jsx(Icon, { ...p, children: _jsx("path", { d: "M5 5h14a1.5 1.5 0 0 1 1.5 1.5v8A1.5 1.5 0 0 1 19 16h-7l-4.5 3.5V16H5a1.5 1.5 0 0 1-1.5-1.5v-8A1.5 1.5 0 0 1 5 5z" }) }));
17
+ }
18
+ export function PlayIcon(p) {
19
+ return (_jsx(Icon, { ...p, children: _jsx("path", { d: "M8 5.5v13l10-6.5z", fill: "currentColor" }) }));
20
+ }
21
+ export function PauseIcon(p) {
22
+ return (_jsx(Icon, { ...p, children: _jsx("path", { d: "M8.5 5.5v13M15.5 5.5v13", strokeWidth: 2.6 }) }));
23
+ }
24
+ export function StopIcon(p) {
25
+ return (_jsx(Icon, { ...p, children: _jsx("rect", { x: "7", y: "7", width: "10", height: "10", rx: "1.5", fill: "currentColor" }) }));
26
+ }
27
+ export function PrevIcon(p) {
28
+ return (_jsxs(Icon, { ...p, children: [_jsx("path", { d: "M17 5.5v13L8 12z" }), _jsx("path", { d: "M6.5 5.5v13" })] }));
29
+ }
30
+ export function NextIcon(p) {
31
+ return (_jsxs(Icon, { ...p, children: [_jsx("path", { d: "M7 5.5v13l9-6.5z" }), _jsx("path", { d: "M17.5 5.5v13" })] }));
32
+ }
33
+ export function ThumbUpIcon(p) {
34
+ return (_jsx(Icon, { ...p, children: _jsx("path", { d: "M7.5 10.5v9H4.5v-9zM7.5 10.5l3.5-6.5a2 2 0 0 1 2.5 2.2l-.6 3.3h5.4a2 2 0 0 1 2 2.4l-1.3 6.2a2 2 0 0 1-2 1.4H7.5" }) }));
35
+ }
36
+ export function ThumbDownIcon(p) {
37
+ return (_jsx(Icon, { ...p, style: { transform: "scaleY(-1)", ...p.style }, children: _jsx("path", { d: "M7.5 10.5v9H4.5v-9zM7.5 10.5l3.5-6.5a2 2 0 0 1 2.5 2.2l-.6 3.3h5.4a2 2 0 0 1 2 2.4l-1.3 6.2a2 2 0 0 1-2 1.4H7.5" }) }));
38
+ }
39
+ export function CloseIcon(p) {
40
+ return (_jsx(Icon, { ...p, children: _jsx("path", { d: "M6.5 6.5l11 11M17.5 6.5l-11 11" }) }));
41
+ }
42
+ /** A pencil: marking is on, a tap or a drag marks the drawing. */
43
+ export function MarkIcon(p) {
44
+ return (_jsxs(Icon, { ...p, children: [_jsx("path", { d: "M4.5 19.5l1-4.2L15.8 5a1.8 1.8 0 0 1 2.5 0l.7.7a1.8 1.8 0 0 1 0 2.5L8.7 18.5z" }), _jsx("path", { d: "M13.8 7l3.2 3.2" })] }));
45
+ }
46
+ //# sourceMappingURL=icons.js.map
package/dist/index.d.ts CHANGED
@@ -18,8 +18,17 @@ export { EntityRelationshipCanvas } from "./EntityRelationshipCanvas.js";
18
18
  export type { EntityRelationshipCanvasProps, ErdCanvasTarget } from "./EntityRelationshipCanvas.js";
19
19
  export { SequenceCanvas, drawableSequence } from "./SequenceCanvas.js";
20
20
  export type { SequenceCanvasProps, SequenceCanvasTarget, SequenceSelection, SequenceTargetKind, } from "./SequenceCanvas.js";
21
+ export { StageOverlay, markAnchor } from "./StageOverlay.js";
22
+ export type { StageOverlayProps, MarkDraft } from "./StageOverlay.js";
23
+ export { StageCaption } from "./StageCaption.js";
24
+ export type { StageCaptionProps } from "./StageCaption.js";
25
+ export { MarkComposer, MarkThread, MarksPanel } from "./MarkCards.js";
26
+ export { CompanionDock } from "./CompanionDock.js";
27
+ export type { CompanionDockProps, DockItem, DockReply, DockStep, DockTake } from "./CompanionDock.js";
28
+ export { MicIcon, SpeakerIcon, SpeakerOffIcon, MarksIcon, MarkIcon, PlayIcon, PauseIcon, StopIcon, PrevIcon, NextIcon, ThumbUpIcon, ThumbDownIcon, CloseIcon, } from "./icons.js";
29
+ export type { MarkComposerProps, MarkThreadProps, MarksPanelProps, ListenerLike } from "./MarkCards.js";
21
30
  export { themeStyle, CANVAS_THEME_VARS } from "./theme.js";
22
31
  export type { CanvasTheme } from "./theme.js";
23
32
  export { childByName, childStatesAt, childrenOf, definedEvents, findState, livePath, parentAt, } from "./drill.js";
24
- export { autoLayout, AUTO_LAYOUT_DEFAULTS, IDENTITY_VIEWPORT, VIEWPORT_LIMITS, clampScale, fitToBoxes, normalizeViewport, panBy, sameViewport, screenDeltaToWorld, screenToWorld, viewportTransform, worldToScreen, zoomAt, zoomTo, routeEdges, erdAutoLayout, erdEntitySize, sequenceLayout, placeLabels, eventGlyph, guardText, } from "@miadi/stateloom-protocol";
25
- export type { AutoLayoutOptions, Box, EntityRelationshipDefinition, FitOptions, LayoutBox, Point, ScaleLimits, SequenceDefinition, SequenceLayout, StateDef, StateMachineDefinition, TransitionDef, Viewport, } from "@miadi/stateloom-protocol";
33
+ export { autoLayout, AUTO_LAYOUT_DEFAULTS, IDENTITY_VIEWPORT, VIEWPORT_LIMITS, clampScale, fitToBoxes, normalizeViewport, panBy, sameViewport, screenDeltaToWorld, screenToWorld, viewportTransform, worldToScreen, zoomAt, zoomTo, routeEdges, erdAutoLayout, erdEntitySize, sequenceLayout, placeLabels, eventGlyph, guardText, machineElementBoxes, erdElementBoxes, sequenceElementBoxes, elementsInRegion, elementAt, boxesOf, unionBox, } from "@miadi/stateloom-protocol";
34
+ export type { AutoLayoutOptions, Box, EntityRelationshipDefinition, FitOptions, LayoutBox, Point, ScaleLimits, SequenceDefinition, SequenceLayout, StateDef, StateMachineDefinition, TransitionDef, Viewport, ElementBox, Mark, MarkKind, TourStep, TourDefinition, } from "@miadi/stateloom-protocol";
package/dist/index.js CHANGED
@@ -15,9 +15,18 @@
15
15
  export { StateMachineCanvas, default } from "./StateMachineCanvas.js";
16
16
  export { EntityRelationshipCanvas } from "./EntityRelationshipCanvas.js";
17
17
  export { SequenceCanvas, drawableSequence } from "./SequenceCanvas.js";
18
+ // The stage (Spec 83): a layer over any of the boards that lights what an
19
+ // agent points at and takes a person's marks, the caption that plays a tour,
20
+ // and the cards marks are written and read in.
21
+ export { StageOverlay, markAnchor } from "./StageOverlay.js";
22
+ export { StageCaption } from "./StageCaption.js";
23
+ export { MarkComposer, MarkThread, MarksPanel } from "./MarkCards.js";
24
+ // Talking with a companion from the canvas (Spec 84).
25
+ export { CompanionDock } from "./CompanionDock.js";
26
+ export { MicIcon, SpeakerIcon, SpeakerOffIcon, MarksIcon, MarkIcon, PlayIcon, PauseIcon, StopIcon, PrevIcon, NextIcon, ThumbUpIcon, ThumbDownIcon, CloseIcon, } from "./icons.js";
18
27
  export { themeStyle, CANVAS_THEME_VARS } from "./theme.js";
19
28
  export { childByName, childStatesAt, childrenOf, definedEvents, findState, livePath, parentAt, } from "./drill.js";
20
29
  // The geometry and the model, re-exported at the address a host reaching for a
21
30
  // canvas is already looking at.
22
- export { autoLayout, AUTO_LAYOUT_DEFAULTS, IDENTITY_VIEWPORT, VIEWPORT_LIMITS, clampScale, fitToBoxes, normalizeViewport, panBy, sameViewport, screenDeltaToWorld, screenToWorld, viewportTransform, worldToScreen, zoomAt, zoomTo, routeEdges, erdAutoLayout, erdEntitySize, sequenceLayout, placeLabels, eventGlyph, guardText, } from "@miadi/stateloom-protocol";
31
+ export { autoLayout, AUTO_LAYOUT_DEFAULTS, IDENTITY_VIEWPORT, VIEWPORT_LIMITS, clampScale, fitToBoxes, normalizeViewport, panBy, sameViewport, screenDeltaToWorld, screenToWorld, viewportTransform, worldToScreen, zoomAt, zoomTo, routeEdges, erdAutoLayout, erdEntitySize, sequenceLayout, placeLabels, eventGlyph, guardText, machineElementBoxes, erdElementBoxes, sequenceElementBoxes, elementsInRegion, elementAt, boxesOf, unionBox, } from "@miadi/stateloom-protocol";
23
32
  //# sourceMappingURL=index.js.map