@flaier/core 0.1.1

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.
Files changed (34) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -0
  3. package/dist/catalog.d.ts +1520 -0
  4. package/dist/code-node-sizing.d.ts +3 -0
  5. package/dist/components/Flaier.vue.d.ts +20 -0
  6. package/dist/components/FlaierPanel.vue.d.ts +10 -0
  7. package/dist/components/controls/TimelineControls.vue.d.ts +31 -0
  8. package/dist/components/edges/ArchitectureSmoothEdge.vue.d.ts +6 -0
  9. package/dist/components/nodes/ArchitectureNode.vue.d.ts +24 -0
  10. package/dist/components/nodes/CodeNode.vue.d.ts +28 -0
  11. package/dist/components/nodes/DecisionNode.vue.d.ts +12 -0
  12. package/dist/components/nodes/DescriptionNode.vue.d.ts +11 -0
  13. package/dist/components/nodes/ErrorNode.vue.d.ts +14 -0
  14. package/dist/components/nodes/LinkNode.vue.d.ts +12 -0
  15. package/dist/components/nodes/NodeSourceAnchor.vue.d.ts +6 -0
  16. package/dist/components/nodes/PayloadNode.vue.d.ts +17 -0
  17. package/dist/components/nodes/TriggerNode.vue.d.ts +14 -0
  18. package/dist/components/renderer/FlowTimelineRenderer.vue.d.ts +33 -0
  19. package/dist/composables/useDiagramExport.d.ts +15 -0
  20. package/dist/composables/useFlaierFullscreen.d.ts +5 -0
  21. package/dist/composables/useFlaierRuntime.d.ts +1 -0
  22. package/dist/composables/useShiki.d.ts +10 -0
  23. package/dist/composables/useTimeline.d.ts +20 -0
  24. package/dist/context.d.ts +11 -0
  25. package/dist/custom-nodes.d.ts +11 -0
  26. package/dist/index.d.ts +13 -0
  27. package/dist/index.js +5680 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/index.unstyled.d.ts +12 -0
  30. package/dist/registry.d.ts +488 -0
  31. package/dist/style.css +2654 -0
  32. package/dist/twoslash.d.ts +10 -0
  33. package/dist/types.d.ts +291 -0
  34. package/package.json +75 -0
@@ -0,0 +1,3 @@
1
+ export declare const CODE_NODE_MAX_INLINE_CHARS: number;
2
+ export declare function estimateCodeNodeWidth(maxLineLength: number): number;
3
+ export declare function estimateCodeNodeCharsPerLine(nodeWidth: number): number;
@@ -0,0 +1,20 @@
1
+ import type { FlaierProps, FlaierSpec } from "../types";
2
+ declare const _default: import("vue").DefineComponent<FlaierProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ loaded: (spec: FlaierSpec) => any;
4
+ "load-error": (message: string) => any;
5
+ "state-change": (changes: {
6
+ path: string;
7
+ value: unknown;
8
+ }[]) => any;
9
+ }, string, import("vue").PublicProps, Readonly<FlaierProps> & Readonly<{
10
+ onLoaded?: ((spec: FlaierSpec) => any) | undefined;
11
+ "onLoad-error"?: ((message: string) => any) | undefined;
12
+ "onState-change"?: ((changes: {
13
+ path: string;
14
+ value: unknown;
15
+ }[]) => any) | undefined;
16
+ }>, {
17
+ interval: number;
18
+ autoPlay: boolean;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type { FlaierPanelProps } from "../types";
2
+ declare const _default: import("vue").DefineComponent<FlaierPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlaierPanelProps> & Readonly<{}>, {
3
+ minHeight: number;
4
+ height: number | string;
5
+ zIndex: number;
6
+ interval: number;
7
+ autoPlay: boolean;
8
+ fullscreenEnabled: boolean;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,31 @@
1
+ interface ChoiceOption {
2
+ id: string;
3
+ label: string;
4
+ description?: string;
5
+ kind?: "default" | "success" | "error" | "warning" | "retry" | "async";
6
+ }
7
+ type __VLS_Props = {
8
+ currentStep: number;
9
+ totalSteps: number;
10
+ playing: boolean;
11
+ label?: string;
12
+ description?: string;
13
+ sourceAnchorLabel?: string;
14
+ sourceAnchorHref?: string;
15
+ choices?: ChoiceOption[];
16
+ selectedChoiceId?: string;
17
+ };
18
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ next: () => any;
20
+ prev: () => any;
21
+ togglePlay: () => any;
22
+ goTo: (step: number) => any;
23
+ chooseChoice: (choiceId: string) => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onNext?: (() => any) | undefined;
26
+ onPrev?: (() => any) | undefined;
27
+ onTogglePlay?: (() => any) | undefined;
28
+ onGoTo?: ((step: number) => any) | undefined;
29
+ onChooseChoice?: ((choiceId: string) => any) | undefined;
30
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { type EdgeProps } from "@vue-flow/core";
2
+ type __VLS_Props = EdgeProps;
3
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
4
+ interactionWidth: number;
5
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,24 @@
1
+ type ArchitectureKind = "service" | "database" | "queue" | "cache" | "gateway" | "external" | "compute";
2
+ type ArchitectureTier = "edge" | "application" | "integration" | "data" | "platform" | "external";
3
+ type ArchitectureStatus = "planned" | "active" | "degraded" | "retired";
4
+ type __VLS_Props = {
5
+ label: string;
6
+ kind?: ArchitectureKind;
7
+ technology?: string;
8
+ runtime?: string;
9
+ owner?: string;
10
+ tier?: ArchitectureTier;
11
+ status?: ArchitectureStatus;
12
+ tags?: string[];
13
+ capabilities?: string[];
14
+ description?: string;
15
+ sourceAnchor?: {
16
+ label: string;
17
+ href?: string;
18
+ };
19
+ active?: boolean;
20
+ };
21
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
22
+ kind: ArchitectureKind;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import "shiki-magic-move/dist/style.css";
2
+ import type { MagicMoveStep, TwoslashHtml } from "../../types";
3
+ type __VLS_Props = {
4
+ label: string;
5
+ file?: string;
6
+ language?: string;
7
+ code: string;
8
+ comment?: string;
9
+ story?: string;
10
+ wrapLongLines?: boolean;
11
+ magicMoveSteps?: MagicMoveStep[];
12
+ twoslash?: boolean;
13
+ twoslashHtml?: TwoslashHtml;
14
+ sourceAnchor?: {
15
+ label: string;
16
+ href?: string;
17
+ };
18
+ uiTheme?: "dark" | "light";
19
+ active?: boolean;
20
+ stepIndex?: number;
21
+ };
22
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
+ language: string;
24
+ wrapLongLines: boolean;
25
+ uiTheme: "dark" | "light";
26
+ stepIndex: number;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ export default _default;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ condition?: string;
4
+ description?: string;
5
+ sourceAnchor?: {
6
+ label: string;
7
+ href?: string;
8
+ };
9
+ active?: boolean;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ body: string;
4
+ sourceAnchor?: {
5
+ label: string;
6
+ href?: string;
7
+ };
8
+ active?: boolean;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ message: string;
4
+ code?: string;
5
+ cause?: string;
6
+ mitigation?: string;
7
+ sourceAnchor?: {
8
+ label: string;
9
+ href?: string;
10
+ };
11
+ active?: boolean;
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ href: string;
4
+ description?: string;
5
+ sourceAnchor?: {
6
+ label: string;
7
+ href?: string;
8
+ };
9
+ active?: boolean;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ href?: string;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ payload?: string;
4
+ before?: string;
5
+ after?: string;
6
+ format?: "json" | "yaml" | "text";
7
+ description?: string;
8
+ sourceAnchor?: {
9
+ label: string;
10
+ href?: string;
11
+ };
12
+ active?: boolean;
13
+ };
14
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ format: "json" | "yaml" | "text";
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ description?: string;
4
+ color?: string;
5
+ sourceAnchor?: {
6
+ label: string;
7
+ href?: string;
8
+ };
9
+ active?: boolean;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ color: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import type { ArchitectureZone } from "../../types";
2
+ type __VLS_Props = {
3
+ title: string;
4
+ description?: string;
5
+ mode?: "narrative" | "architecture";
6
+ zones?: ArchitectureZone[];
7
+ direction?: "horizontal" | "vertical";
8
+ minHeight?: number;
9
+ layoutEngine?: "dagre" | "manual";
10
+ layoutRankSep?: number;
11
+ layoutNodeSep?: number;
12
+ layoutEdgeSep?: number;
13
+ themeMode?: "local" | "document";
14
+ showHeaderOverlay?: boolean;
15
+ showExportControls?: boolean;
16
+ showThemeToggle?: boolean;
17
+ showArchitectureInspector?: boolean;
18
+ defaultArchitectureInspectorOpen?: boolean;
19
+ showArchitectureInspectorToggleText?: boolean;
20
+ };
21
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
22
+ direction: "horizontal" | "vertical";
23
+ mode: "narrative" | "architecture";
24
+ layoutEngine: "dagre" | "manual";
25
+ themeMode: "local" | "document";
26
+ showHeaderOverlay: boolean;
27
+ showExportControls: boolean;
28
+ showThemeToggle: boolean;
29
+ showArchitectureInspector: boolean;
30
+ defaultArchitectureInspectorOpen: boolean;
31
+ showArchitectureInspectorToggleText: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export interface DiagramBounds {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export type DiagramExportFormat = "png" | "pdf";
8
+ export interface ExportFlowDiagramOptions {
9
+ flowElement: HTMLElement;
10
+ theme: "dark" | "light";
11
+ bounds: DiagramBounds;
12
+ fileNameBase: string;
13
+ format: DiagramExportFormat;
14
+ }
15
+ export declare function exportFlowDiagram(options: ExportFlowDiagramOptions): Promise<void>;
@@ -0,0 +1,5 @@
1
+ export declare function useFlaierFullscreen(): {
2
+ fullscreen: import("vue").Ref<boolean, boolean>;
3
+ closeFullscreen: () => void;
4
+ toggleFullscreen: () => void;
5
+ };
@@ -0,0 +1 @@
1
+ export declare function useFlaierRuntime(): import("../context").FlaierRuntimeContext;
@@ -0,0 +1,10 @@
1
+ import { type ShallowRef } from "vue";
2
+ import type { HighlighterCore } from "shiki";
3
+ /**
4
+ * Shared singleton Shiki highlighter.
5
+ * Lazily created on first call; the same instance is reused across all components.
6
+ */
7
+ export declare function useShiki(langs?: string[], theme?: string): {
8
+ highlighter: ShallowRef<HighlighterCore | null>;
9
+ ready: Promise<HighlighterCore>;
10
+ };
@@ -0,0 +1,20 @@
1
+ import type { Ref } from "vue";
2
+ interface TimelineOptions {
3
+ totalSteps: Ref<number>;
4
+ interval?: number;
5
+ }
6
+ /**
7
+ * Timeline playback controls.
8
+ * Manages currentStep, playing state, and auto-advance logic.
9
+ */
10
+ export declare function useTimeline(options: TimelineOptions): {
11
+ currentStep: Ref<number, number>;
12
+ playing: Ref<boolean, boolean>;
13
+ totalSteps: Ref<number, number>;
14
+ progress: import("vue").ComputedRef<number>;
15
+ next(): void;
16
+ prev(): void;
17
+ goTo(step: number): void;
18
+ togglePlay(): void;
19
+ };
20
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { InjectionKey, Ref } from "vue";
2
+ import type { FlaierCustomNodeDefinitions, FlaierFlowOption, FlaierSpec } from "./types";
3
+ export interface FlaierRuntimeContext {
4
+ spec: Ref<FlaierSpec | null>;
5
+ interval: Ref<number>;
6
+ nodes: Ref<FlaierCustomNodeDefinitions>;
7
+ flowOptions: Ref<FlaierFlowOption[]>;
8
+ activeFlowId: Ref<string | null>;
9
+ setActiveFlow: (flowId: string) => void;
10
+ }
11
+ export declare const flaierRuntimeKey: InjectionKey<FlaierRuntimeContext>;
@@ -0,0 +1,11 @@
1
+ import { type Component } from "vue";
2
+ import type { FlaierCustomNodeDefinitions } from "./types";
3
+ export declare function normalizeFlaierCustomNodes(nodes?: FlaierCustomNodeDefinitions): FlaierCustomNodeDefinitions;
4
+ export declare function mergeFlaierCustomNodes(...sources: Array<FlaierCustomNodeDefinitions | undefined>): FlaierCustomNodeDefinitions;
5
+ export declare function createFlaierCustomCatalogComponents(nodes?: FlaierCustomNodeDefinitions): {
6
+ [k: string]: {
7
+ props: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
8
+ description: string;
9
+ };
10
+ };
11
+ export declare function createFlaierCustomRegistryComponents(nodes?: FlaierCustomNodeDefinitions): Record<string, Component>;
@@ -0,0 +1,13 @@
1
+ import "./style.css";
2
+ export { default as Flaier } from "./components/Flaier.vue";
3
+ export { default as FlaierPanel } from "./components/FlaierPanel.vue";
4
+ export { architectureDataAssetSchema, architectureInterfaceSchema, architectureLinkSchema, architectureOperationsSchema, architectureSecuritySchema, architectureZoneSchema, catalog, createFlaierCatalog, edgeTransitionKindSchema, edgeTransitionSchema, magicMoveStepSchema, sourceAnchorSchema, twoslashHtmlSchema, } from "./catalog";
5
+ export { createFlaierRegistry, createFlaierRendererRegistry, registry } from "./registry";
6
+ export { mergeFlaierCustomNodes, normalizeFlaierCustomNodes } from "./custom-nodes";
7
+ export { useShiki } from "./composables/useShiki";
8
+ export { useTimeline } from "./composables/useTimeline";
9
+ export { useFlaierRuntime } from "./composables/useFlaierRuntime";
10
+ export { useFlaierFullscreen } from "./composables/useFlaierFullscreen";
11
+ export { hasTwoslashHints, hasTwoslashHtml, normalizeTwoslashHtml, normalizeTwoslashLanguage, resolveTwoslashHtmlForTheme, } from "./twoslash";
12
+ export type { FlaierSpec, FlaierManifest, FlaierManifestFlow, FlaierFlowOption, FlaierSource, FlaierProps, FlaierPanelProps, FlaierCatalogOptions, FlaierCustomNodeComponentProps, FlaierCustomNodeContext, FlaierCustomNodeDefinition, FlaierCustomNodeDefinitions, FlaierCustomNodeSize, FlaierResolvedSourceAnchor, FlowTimelineProps, ArchitectureNodeProps, TriggerNodeProps, CodeNodeProps, DecisionNodeProps, PayloadNodeProps, ErrorNodeProps, DescriptionNodeProps, LinkNodeProps, ArchitectureZone, ArchitectureInterface, ArchitectureDataAsset, ArchitectureSecurity, ArchitectureOperations, ArchitectureLink, SourceAnchor, SourceAnchorInput, EdgeTransition, EdgeTransitionKind, MagicMoveStep, BuiltInFlowNodeType, FlowNode, FlowEdge, FlowNodeType, FlowNodeData, TwoslashHtml, } from "./types";
13
+ export type { SupportedTwoslashLanguage } from "./twoslash";