@miadi/stateloom-canvas 0.1.4 → 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/CompanionDock.d.ts +101 -0
- package/dist/CompanionDock.js +62 -0
- package/dist/MarkCards.d.ts +76 -0
- package/dist/MarkCards.js +104 -0
- package/dist/SequenceCanvas.d.ts +73 -0
- package/dist/SequenceCanvas.js +394 -0
- package/dist/StageCaption.d.ts +39 -0
- package/dist/StageCaption.js +15 -0
- package/dist/StageOverlay.d.ts +54 -0
- package/dist/StageOverlay.js +121 -0
- package/dist/icons.d.ts +28 -0
- package/dist/icons.js +46 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +11 -1
- package/dist/styles.css +721 -0
- package/package.json +2 -2
package/dist/icons.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stage's icons, drawn: outlines in the current colour.
|
|
3
|
+
*
|
|
4
|
+
* Typed symbols such as 🎙, 🔊, 💬, 👍 and even ▶ render as colour emoji on iOS,
|
|
5
|
+
* saturated and larger than the text around them. The person these designers are
|
|
6
|
+
* built with works on an iPhone and is visually sensitive, so every icon in the
|
|
7
|
+
* stage's chrome is a line drawing that takes the button's own colour and size.
|
|
8
|
+
*/
|
|
9
|
+
import type { SVGProps } from "react";
|
|
10
|
+
type IconProps = Omit<SVGProps<SVGSVGElement>, "children"> & {
|
|
11
|
+
size?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function MicIcon(p: IconProps): import("react").JSX.Element;
|
|
14
|
+
export declare function SpeakerIcon(p: IconProps): import("react").JSX.Element;
|
|
15
|
+
export declare function SpeakerOffIcon(p: IconProps): import("react").JSX.Element;
|
|
16
|
+
/** A speech bubble: the marks on a drawing, what people said about it. */
|
|
17
|
+
export declare function MarksIcon(p: IconProps): import("react").JSX.Element;
|
|
18
|
+
export declare function PlayIcon(p: IconProps): import("react").JSX.Element;
|
|
19
|
+
export declare function PauseIcon(p: IconProps): import("react").JSX.Element;
|
|
20
|
+
export declare function StopIcon(p: IconProps): import("react").JSX.Element;
|
|
21
|
+
export declare function PrevIcon(p: IconProps): import("react").JSX.Element;
|
|
22
|
+
export declare function NextIcon(p: IconProps): import("react").JSX.Element;
|
|
23
|
+
export declare function ThumbUpIcon(p: IconProps): import("react").JSX.Element;
|
|
24
|
+
export declare function ThumbDownIcon(p: IconProps): import("react").JSX.Element;
|
|
25
|
+
export declare function CloseIcon(p: IconProps): import("react").JSX.Element;
|
|
26
|
+
/** A pencil: marking is on, a tap or a drag marks the drawing. */
|
|
27
|
+
export declare function MarkIcon(p: IconProps): import("react").JSX.Element;
|
|
28
|
+
export {};
|
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
|
@@ -16,8 +16,19 @@ export { StateMachineCanvas, default } from "./StateMachineCanvas.js";
|
|
|
16
16
|
export type { CanvasSelection, CanvasTarget, DrawMode, StateMachineCanvasHandle, StateMachineCanvasProps, } from "./StateMachineCanvas.js";
|
|
17
17
|
export { EntityRelationshipCanvas } from "./EntityRelationshipCanvas.js";
|
|
18
18
|
export type { EntityRelationshipCanvasProps, ErdCanvasTarget } from "./EntityRelationshipCanvas.js";
|
|
19
|
+
export { SequenceCanvas, drawableSequence } from "./SequenceCanvas.js";
|
|
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";
|
|
19
30
|
export { themeStyle, CANVAS_THEME_VARS } from "./theme.js";
|
|
20
31
|
export type { CanvasTheme } from "./theme.js";
|
|
21
32
|
export { childByName, childStatesAt, childrenOf, definedEvents, findState, livePath, parentAt, } from "./drill.js";
|
|
22
|
-
export { autoLayout, AUTO_LAYOUT_DEFAULTS, IDENTITY_VIEWPORT, VIEWPORT_LIMITS, clampScale, fitToBoxes, normalizeViewport, panBy, sameViewport, screenDeltaToWorld, screenToWorld, viewportTransform, worldToScreen, zoomAt, zoomTo, routeEdges, erdAutoLayout, erdEntitySize, placeLabels, eventGlyph, guardText, } from "@miadi/stateloom-protocol";
|
|
23
|
-
export type { AutoLayoutOptions, Box, EntityRelationshipDefinition, FitOptions, LayoutBox, Point, ScaleLimits, 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
|
@@ -14,9 +14,19 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { StateMachineCanvas, default } from "./StateMachineCanvas.js";
|
|
16
16
|
export { EntityRelationshipCanvas } from "./EntityRelationshipCanvas.js";
|
|
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";
|
|
17
27
|
export { themeStyle, CANVAS_THEME_VARS } from "./theme.js";
|
|
18
28
|
export { childByName, childStatesAt, childrenOf, definedEvents, findState, livePath, parentAt, } from "./drill.js";
|
|
19
29
|
// The geometry and the model, re-exported at the address a host reaching for a
|
|
20
30
|
// canvas is already looking at.
|
|
21
|
-
export { autoLayout, AUTO_LAYOUT_DEFAULTS, IDENTITY_VIEWPORT, VIEWPORT_LIMITS, clampScale, fitToBoxes, normalizeViewport, panBy, sameViewport, screenDeltaToWorld, screenToWorld, viewportTransform, worldToScreen, zoomAt, zoomTo, routeEdges, erdAutoLayout, erdEntitySize, 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";
|
|
22
32
|
//# sourceMappingURL=index.js.map
|