@septkit/ui 0.0.56 → 0.0.58
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/_virtual/_rolldown/runtime.js +17 -11
- package/dist/diagram-layout/elk-layout-engine.js +71 -0
- package/dist/diagram-layout/index.js +2 -0
- package/dist/external/.pnpm/elkjs@0.10.2/node_modules/elkjs/lib/elk.bundled.js +46047 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +5 -1
- package/dist/split-layout/index.js +2 -0
- package/dist/split-layout/split-layout.js +5 -0
- package/dist/split-layout/split-layout.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/ui.css +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,13 @@ expanded: ExplorerExpandedState;
|
|
|
84
84
|
ariaLabel: string;
|
|
85
85
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
86
86
|
|
|
87
|
+
declare const __VLS_component_6: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{}>, {
|
|
88
|
+
direction: "horizontal" | "vertical";
|
|
89
|
+
defaultSize: number;
|
|
90
|
+
maxSize: number;
|
|
91
|
+
minSize: number;
|
|
92
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
93
|
+
|
|
87
94
|
declare type __VLS_Props = {
|
|
88
95
|
color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
|
|
89
96
|
variant?: 'outline' | 'dash' | 'soft' | 'ghost' | 'link';
|
|
@@ -144,6 +151,19 @@ declare type __VLS_Props_16 = {
|
|
|
144
151
|
items: ContextMenuItem[];
|
|
145
152
|
};
|
|
146
153
|
|
|
154
|
+
declare type __VLS_Props_17 = {
|
|
155
|
+
/** Unique key: drives the splitter group's auto-save-id and both panel ids. */
|
|
156
|
+
persistenceKey: string;
|
|
157
|
+
showSidebar: boolean;
|
|
158
|
+
direction?: 'horizontal' | 'vertical';
|
|
159
|
+
/** Default size of the sidebar panel, in percent. */
|
|
160
|
+
defaultSize?: number;
|
|
161
|
+
/** Minimum size of the sidebar panel, in percent. */
|
|
162
|
+
minSize?: number;
|
|
163
|
+
/** Maximum size of the sidebar panel, in percent. */
|
|
164
|
+
maxSize?: number;
|
|
165
|
+
};
|
|
166
|
+
|
|
147
167
|
declare type __VLS_Props_2 = {
|
|
148
168
|
/** Trigger color */
|
|
149
169
|
color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
|
|
@@ -321,6 +341,16 @@ declare function __VLS_template_5(): {
|
|
|
321
341
|
rootEl: any;
|
|
322
342
|
};
|
|
323
343
|
|
|
344
|
+
declare function __VLS_template_6(): {
|
|
345
|
+
attrs: Partial<{}>;
|
|
346
|
+
slots: {
|
|
347
|
+
main?(_: {}): any;
|
|
348
|
+
sidebar?(_: {}): any;
|
|
349
|
+
};
|
|
350
|
+
refs: {};
|
|
351
|
+
rootEl: any;
|
|
352
|
+
};
|
|
353
|
+
|
|
324
354
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
325
355
|
|
|
326
356
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
@@ -331,6 +361,8 @@ declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
|
|
|
331
361
|
|
|
332
362
|
declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
|
|
333
363
|
|
|
364
|
+
declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
|
|
365
|
+
|
|
334
366
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
335
367
|
new (): {
|
|
336
368
|
$slots: S;
|
|
@@ -361,6 +393,12 @@ declare type __VLS_WithTemplateSlots_5<T, S> = T & {
|
|
|
361
393
|
};
|
|
362
394
|
};
|
|
363
395
|
|
|
396
|
+
declare type __VLS_WithTemplateSlots_6<T, S> = T & {
|
|
397
|
+
new (): {
|
|
398
|
+
$slots: S;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
|
|
364
402
|
export declare type ActionFn = () => void;
|
|
365
403
|
|
|
366
404
|
/** The component + props + options currently mounted in the host (the "root"). */
|
|
@@ -502,6 +540,11 @@ export declare function createDocumentStore<GenericBaseDocument, GenericAugmente
|
|
|
502
540
|
clear: () => void;
|
|
503
541
|
};
|
|
504
542
|
|
|
543
|
+
/** Create an ELK-backed `LayoutEngine`. Each instance owns its own ELK
|
|
544
|
+
* worker/instance so callers/tests stay isolated. `defaults` are applied to
|
|
545
|
+
* every `layout()` call and can be overridden per call via its `options`. */
|
|
546
|
+
export declare function createElkLayoutEngine(defaults?: LayoutOptions): LayoutEngine;
|
|
547
|
+
|
|
505
548
|
/** A user's binary choice on a decision group. */
|
|
506
549
|
export declare type DecisionAction = 'accept' | 'skip';
|
|
507
550
|
|
|
@@ -708,6 +751,77 @@ export declare function highlightCode(code: string, options?: {
|
|
|
708
751
|
lineStatuses?: readonly LineStatus[];
|
|
709
752
|
}): Promise<string>;
|
|
710
753
|
|
|
754
|
+
export declare type LayoutDirection = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT';
|
|
755
|
+
|
|
756
|
+
/** A connection between nodes. Arrays mirror ELK's hyperedge model, so a
|
|
757
|
+
* single logical edge can bundle multiple sources/targets (for example
|
|
758
|
+
* ELK's `mergeEdges` bus-style routing). */
|
|
759
|
+
export declare type LayoutEdge = {
|
|
760
|
+
id: string;
|
|
761
|
+
sources: string[];
|
|
762
|
+
targets: string[];
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
/** A swappable diagram layout algorithm. */
|
|
766
|
+
export declare type LayoutEngine = {
|
|
767
|
+
layout(input: LayoutGraphInput, options?: LayoutOptions): Promise<LayoutGraphResult>;
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
export declare type LayoutGraphInput = {
|
|
771
|
+
nodes: LayoutNode[];
|
|
772
|
+
edges: LayoutEdge[];
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
export declare type LayoutGraphResult = {
|
|
776
|
+
/** Computed position per node id. */
|
|
777
|
+
positions: Record<string, LayoutPoint>;
|
|
778
|
+
/**
|
|
779
|
+
* Computed route points per edge id (start, optional bend points, end),
|
|
780
|
+
* when the engine produces routed edges. Absent/empty for engines that
|
|
781
|
+
* don't route edges explicitly.
|
|
782
|
+
*/
|
|
783
|
+
edgeRoutes: Record<string, LayoutPoint[]>;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Normalized, engine-agnostic diagram layout contract. No Vue, Pinia, SCL,
|
|
788
|
+
* Dialecte, or VueFlow types may appear here — see ADR-0024 (shared
|
|
789
|
+
* swappable diagram layout engine).
|
|
790
|
+
*/
|
|
791
|
+
/** A single node to be positioned. */
|
|
792
|
+
export declare type LayoutNode = {
|
|
793
|
+
id: string;
|
|
794
|
+
width: number;
|
|
795
|
+
height: number;
|
|
796
|
+
/**
|
|
797
|
+
* Rank used to order siblings left-to-right during layout (for example
|
|
798
|
+
* to keep expansion order stable). Engines that don't support ordering
|
|
799
|
+
* hints may ignore this.
|
|
800
|
+
*/
|
|
801
|
+
orderHint?: number;
|
|
802
|
+
/** Nested child nodes, for engines/consumers that lay out containment. */
|
|
803
|
+
children?: LayoutNode[];
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
export declare type LayoutOptions = {
|
|
807
|
+
direction?: LayoutDirection;
|
|
808
|
+
/** Minimum spacing between sibling nodes. */
|
|
809
|
+
nodeSpacing?: number;
|
|
810
|
+
/** Minimum spacing between layers/ranks. */
|
|
811
|
+
layerSpacing?: number;
|
|
812
|
+
/**
|
|
813
|
+
* Engine-specific escape hatch. `ElkLayoutEngine` forwards these
|
|
814
|
+
* verbatim as ELK layout options; other engines may ignore it.
|
|
815
|
+
*/
|
|
816
|
+
elkOptions?: Record<string, string>;
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
/** An absolute point on an edge's route. */
|
|
820
|
+
export declare type LayoutPoint = {
|
|
821
|
+
x: number;
|
|
822
|
+
y: number;
|
|
823
|
+
};
|
|
824
|
+
|
|
711
825
|
export declare type LineStatus = 'added' | 'removed' | 'unchanged';
|
|
712
826
|
|
|
713
827
|
/**
|
|
@@ -821,6 +935,8 @@ export declare type ReactiveDocument = {
|
|
|
821
935
|
|
|
822
936
|
export declare const SclExplorer: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
823
937
|
|
|
938
|
+
export declare const SplitLayout: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
939
|
+
|
|
824
940
|
/** Per-node selection payload: what to preview and (if any) the change it carries. */
|
|
825
941
|
declare type StructuralNodeInfo = {
|
|
826
942
|
previewRef: Scl.Ref<Scl.ElementsOf>;
|
package/dist/index.js
CHANGED
|
@@ -35,4 +35,8 @@ import N from "./merge/merge-review.js";
|
|
|
35
35
|
import "./merge/index.js";
|
|
36
36
|
import P from "./context-menu/context-menu.js";
|
|
37
37
|
import "./context-menu/index.js";
|
|
38
|
-
|
|
38
|
+
import F from "./split-layout/split-layout.js";
|
|
39
|
+
import "./split-layout/index.js";
|
|
40
|
+
import { createElkLayoutEngine as I } from "./diagram-layout/elk-layout-engine.js";
|
|
41
|
+
import "./diagram-layout/index.js";
|
|
42
|
+
export { s as Button, y as CATEGORY_ELEMENTS, T as CodeBlock, l as Combobox, P as ContextMenu, O as DecisionToggle, d as Dialog, _ as DialogHost, v as DocumentProgressBar, c as Dropdown, b as ELEMENT_TO_COLOR, x as ELEMENT_TO_ICON, k as ElementDetail, f as FeedbackDialog, N as MergeReview, A as MergeTree, u as MultiSelect, C as SclExplorer, F as SplitLayout, j as TypeNameAuthority, D as XmlDiff, S as collectExpandableNodeIds, p as createDialogHost, e as createDocumentStore, I as createElkLayoutEngine, m as dialogHostKey, E as diffLines, w as highlightCode, h as provideDialogHost, i as useActiveDocument, t as useDialecteChannel, g as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, M as useMergeSession, r as useProjectLiveData };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { SplitterGroup_default as e } from "../external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Splitter/SplitterGroup.js";
|
|
2
|
+
import { SplitterPanel_default as t } from "../external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Splitter/SplitterPanel.js";
|
|
3
|
+
import { SplitterResizeHandle_default as n } from "../external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Splitter/SplitterResizeHandle.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderSlot as f, unref as p, withCtx as m } from "vue";
|
|
5
|
+
//#region lib/split-layout/split-layout.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var h = { class: "h-full p-4" }, g = { class: "absolute h-full w-full p-4" }, _ = /*@__PURE__*/ u({
|
|
7
|
+
__name: "split-layout",
|
|
8
|
+
props: {
|
|
9
|
+
persistenceKey: {},
|
|
10
|
+
showSidebar: { type: Boolean },
|
|
11
|
+
direction: { default: "horizontal" },
|
|
12
|
+
defaultSize: { default: 25 },
|
|
13
|
+
minSize: { default: 15 },
|
|
14
|
+
maxSize: { default: 50 }
|
|
15
|
+
},
|
|
16
|
+
setup(u) {
|
|
17
|
+
let _ = u, v = i(() => `${_.persistenceKey}-main`), y = i(() => `${_.persistenceKey}-sidebar`), b = i(() => _.showSidebar ? 100 - _.defaultSize : 100);
|
|
18
|
+
return (i, _) => (d(), a(p(e), {
|
|
19
|
+
direction: u.direction,
|
|
20
|
+
"auto-save-id": u.persistenceKey,
|
|
21
|
+
class: "h-full w-full"
|
|
22
|
+
}, {
|
|
23
|
+
default: m(() => [l(p(t), {
|
|
24
|
+
id: v.value,
|
|
25
|
+
order: 1,
|
|
26
|
+
"default-size": b.value,
|
|
27
|
+
class: "bg-base-200"
|
|
28
|
+
}, {
|
|
29
|
+
default: m(() => [c("div", h, [f(i.$slots, "main")])]),
|
|
30
|
+
_: 3
|
|
31
|
+
}, 8, ["id", "default-size"]), u.showSidebar ? (d(), s(r, { key: 0 }, [l(p(n), {
|
|
32
|
+
"data-testid": "resize-handle",
|
|
33
|
+
class: "w-0.5 bg-base-300 transition-colors duration-200 hover:bg-primary/20"
|
|
34
|
+
}), l(p(t), {
|
|
35
|
+
id: y.value,
|
|
36
|
+
order: 2,
|
|
37
|
+
"default-size": u.defaultSize,
|
|
38
|
+
"min-size": u.minSize,
|
|
39
|
+
"max-size": u.maxSize,
|
|
40
|
+
class: "relative border-l-2 border-base-300 bg-base-100"
|
|
41
|
+
}, {
|
|
42
|
+
default: m(() => [c("div", g, [f(i.$slots, "sidebar")])]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 8, [
|
|
45
|
+
"id",
|
|
46
|
+
"default-size",
|
|
47
|
+
"min-size",
|
|
48
|
+
"max-size"
|
|
49
|
+
])], 64)) : o("", !0)]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, ["direction", "auto-save-id"]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
export { _ as default };
|