@tumaet/apollon 4.8.0 → 4.9.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 +45 -20
- package/dist/assets/style.css +1 -1
- package/dist/exportStyles-Co-WBqTa.js +5 -0
- package/dist/external/LICENSE-InterFont +92 -0
- package/dist/external/exportFonts-DxO9jrR1.js +19 -0
- package/dist/external/exportStyles-Co-WBqTa.js +5 -0
- package/dist/external/index.js +22191 -0
- package/dist/index.d.ts +131 -3
- package/dist/index.js +19744 -19098
- package/dist/internals.d.ts +29 -0
- package/dist/internals.js +7 -6
- package/dist/react/apollon-editor.d.ts +56 -3
- package/dist/react/components/CustomControls.d.ts +7 -0
- package/dist/react/components/popovers/PopoverManager.d.ts +1 -1
- package/dist/react/components/popovers/activityDiagram/ActivitySwimlaneEditPopover.d.ts +2 -0
- package/dist/react/components/popovers/activityDiagram/index.d.ts +1 -0
- package/dist/react/components/react/ApollonControl.d.ts +18 -0
- package/dist/react/components/svgs/nodes/InterfaceLabel.d.ts +26 -0
- package/dist/react/components/svgs/nodes/activityDiagram/ActivitySwimlaneSVG.d.ts +9 -0
- package/dist/react/components/svgs/nodes/activityDiagram/index.d.ts +1 -0
- package/dist/react/components/svgs/nodes/componentDiagram/ComponentInterfaceNodeSVG.d.ts +2 -0
- package/dist/react/components/svgs/nodes/deploymentDiagram/DeploymentInterfaceSVG.d.ts +2 -0
- package/dist/react/constants.d.ts +18 -0
- package/dist/react/edges/labelTypes/EdgeIncludeExtendLabel.d.ts +1 -4
- package/dist/react/edges/labelTypes/EdgeMiddleLabels.d.ts +7 -4
- package/dist/react/edges/labelTypes/EdgeMultipleLabels.d.ts +2 -3
- package/dist/react/edges/labelTypes/messageLayout.d.ts +51 -0
- package/dist/react/exportStyles-yVX7Dykt.js +6 -0
- package/dist/react/hooks/index.d.ts +0 -1
- package/dist/react/hooks/useStepPathEdge.d.ts +11 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/nodes/activityDiagram/ActivitySwimlane.d.ts +3 -0
- package/dist/react/nodes/activityDiagram/index.d.ts +1 -0
- package/dist/react/nodes/types.d.ts +2 -1
- package/dist/react/overlay/OverlayLayer.d.ts +8 -0
- package/dist/react/overlay/RegionMount.d.ts +10 -0
- package/dist/react/overlay/overlayStore.d.ts +20 -0
- package/dist/react/overlay/types.d.ts +48 -0
- package/dist/react/react.d.ts +1 -0
- package/dist/react/react.js +13264 -18536
- package/dist/react/store/context.d.ts +3 -0
- package/dist/react/types/nodes/NodeProps.d.ts +24 -0
- package/dist/react/utils/geometry/edgeLabelLayout.d.ts +123 -0
- package/dist/react/utils/geometry/interfaceLabelLayout.d.ts +44 -0
- package/dist/react/utils/index.d.ts +1 -0
- package/dist/react/utils/paletteLayout.d.ts +23 -19
- package/dist/react/utils/swimlaneUtils.d.ts +58 -0
- package/dist/yjsSync-BCNFF_EI.js +45418 -0
- package/package.json +19 -8
- package/schema/uml-model-4.schema.json +1 -0
- package/dist/exportStyles-Wcc8N8Xj.js +0 -5
- package/dist/react/exportStyles-CH2hautV.js +0 -6
- package/dist/react/hooks/useMessagePositioning.d.ts +0 -30
- package/dist/yjsSync-CqmgRwRE.js +0 -51038
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where a control is anchored. The six React Flow `<Panel>` corners are
|
|
4
|
+
* screen-space and rendered through React Flow; `header`/`left-rail`/`right-rail`
|
|
5
|
+
* are library-owned bands; `on-canvas` pans/zooms with the diagram.
|
|
6
|
+
*/
|
|
7
|
+
export type OverlayRegion = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "header" | "left-rail" | "right-rail" | "on-canvas";
|
|
8
|
+
/** Regions that map directly onto a React Flow `<Panel position>`. */
|
|
9
|
+
export declare const PANEL_REGIONS: readonly ["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right"];
|
|
10
|
+
/** Every valid region — used to validate control registration at the API edge. */
|
|
11
|
+
export declare const OVERLAY_REGIONS: readonly OverlayRegion[];
|
|
12
|
+
/** One of the four edges a control can sit against / reserve room on. */
|
|
13
|
+
export type OverlaySide = "top" | "right" | "bottom" | "left";
|
|
14
|
+
/** Reserved room per side, in px. */
|
|
15
|
+
export type Insets = Record<OverlaySide, number>;
|
|
16
|
+
export declare const ZERO_INSETS: Insets;
|
|
17
|
+
/**
|
|
18
|
+
* How much room a control reserves so the diagram "makes way" (fed into
|
|
19
|
+
* `fitView` padding, MapLibre-style). `"auto"` measures the control via the
|
|
20
|
+
* shared ResizeObserver on the region's dominant axis; an object mixes explicit
|
|
21
|
+
* px with per-side `"auto"` (e.g. `{ top: "auto" }`).
|
|
22
|
+
*/
|
|
23
|
+
export type InsetContribution = "auto" | Partial<Record<OverlaySide, number | "auto">>;
|
|
24
|
+
export interface OverlayControlOptions {
|
|
25
|
+
/** Stable id. Re-adding the same id REPLACES (idempotent, StrictMode-safe). */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Which band/corner the control is anchored in. */
|
|
28
|
+
region: OverlayRegion;
|
|
29
|
+
/** Reserve viewport room. Default: reserves nothing (the control floats). */
|
|
30
|
+
inset?: InsetContribution;
|
|
31
|
+
/** Stacking within a region; lower renders toward the region's anchor edge. */
|
|
32
|
+
order?: number;
|
|
33
|
+
/** When false the region frame stays pointer-transparent here too. Default true. */
|
|
34
|
+
interactive?: boolean;
|
|
35
|
+
/** Wraps the control in a `role="group"` with this aria-label. No focus
|
|
36
|
+
* management is imposed. */
|
|
37
|
+
groupLabel?: string;
|
|
38
|
+
/** Hide without unregistering (reserves no inset while hidden). Default true. */
|
|
39
|
+
visible?: boolean;
|
|
40
|
+
/** Extra class on the control's wrapper element. */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Inline styles merged onto the control's wrapper element. */
|
|
43
|
+
style?: CSSProperties;
|
|
44
|
+
}
|
|
45
|
+
/** The public registration payload (options + renderer). */
|
|
46
|
+
export type OverlayControlInput = OverlayControlOptions & {
|
|
47
|
+
render: () => ReactNode;
|
|
48
|
+
};
|
package/dist/react/react.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export * from './index';
|
|
|
2
2
|
export { Apollon, type ApollonProps } from './components/react/Apollon';
|
|
3
3
|
export { ApollonProvider, useApollonEditor, useApollonEditorOrThrow, } from './components/react/context';
|
|
4
4
|
export { useApollonSubscription } from './components/react/useApollonSubscription';
|
|
5
|
+
export { ApollonControl, type ApollonControlProps, } from './components/react/ApollonControl';
|