@getartisanflow/alpineflow 0.2.4-alpha → 0.2.5-alpha

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 (139) hide show
  1. package/dist/alpineflow-collab.esm.js.map +1 -1
  2. package/dist/alpineflow-collab.js.map +1 -1
  3. package/dist/alpineflow-workflow.esm.js.map +1 -1
  4. package/dist/alpineflow.bundle.esm.js +2006 -1983
  5. package/dist/alpineflow.bundle.esm.js.map +1 -1
  6. package/dist/alpineflow.esm.js +2 -2
  7. package/dist/alpineflow.js +1 -1
  8. package/dist/{index-CvQXC8Md.js → index-iNX5XDHl.js} +1489 -1466
  9. package/dist/index-iNX5XDHl.js.map +1 -0
  10. package/dist/types/lib/collab.d.ts +2 -2
  11. package/dist/types/lib/core.d.ts +2 -2
  12. package/dist/types/lib/dagre.d.ts +1 -1
  13. package/dist/types/lib/elk.d.ts +1 -1
  14. package/dist/types/lib/force.d.ts +1 -1
  15. package/dist/types/lib/hierarchy.d.ts +1 -1
  16. package/dist/types/lib/schema.d.ts +2 -2
  17. package/dist/types/lib/whiteboard.d.ts +1 -1
  18. package/dist/types/lib/workflow.d.ts +2 -2
  19. package/dist/types/src/animate/animator.d.ts +6 -6
  20. package/dist/types/src/animate/clamp-dimensions.d.ts +1 -1
  21. package/dist/types/src/animate/flow-group.d.ts +1 -1
  22. package/dist/types/src/animate/handle-registry.d.ts +1 -1
  23. package/dist/types/src/animate/index.d.ts +19 -19
  24. package/dist/types/src/animate/interpolators.d.ts +1 -1
  25. package/dist/types/src/animate/motion/decay.d.ts +1 -1
  26. package/dist/types/src/animate/motion/index.d.ts +7 -7
  27. package/dist/types/src/animate/motion/inertia.d.ts +1 -1
  28. package/dist/types/src/animate/motion/keyframes.d.ts +1 -1
  29. package/dist/types/src/animate/motion/presets.d.ts +1 -1
  30. package/dist/types/src/animate/motion/spring.d.ts +1 -1
  31. package/dist/types/src/animate/particle-renderers.d.ts +1 -1
  32. package/dist/types/src/animate/recording/event-cursor.d.ts +1 -1
  33. package/dist/types/src/animate/recording/index.d.ts +7 -7
  34. package/dist/types/src/animate/recording/recorder.d.ts +1 -1
  35. package/dist/types/src/animate/recording/recording.d.ts +1 -1
  36. package/dist/types/src/animate/recording/replay.d.ts +2 -2
  37. package/dist/types/src/animate/recording/thumbnail.d.ts +1 -1
  38. package/dist/types/src/animate/recording/types.d.ts +3 -3
  39. package/dist/types/src/animate/recording/virtual-engine.d.ts +1 -1
  40. package/dist/types/src/animate/timeline.d.ts +5 -5
  41. package/dist/types/src/animate/transaction.d.ts +1 -1
  42. package/dist/types/src/collab/awareness.d.ts +1 -1
  43. package/dist/types/src/collab/bridge.d.ts +2 -2
  44. package/dist/types/src/collab/directives/flow-cursors.d.ts +1 -1
  45. package/dist/types/src/collab/index.d.ts +9 -9
  46. package/dist/types/src/collab/providers/in-memory.d.ts +1 -1
  47. package/dist/types/src/collab/providers/reverb.d.ts +1 -1
  48. package/dist/types/src/collab/providers/websocket.d.ts +1 -1
  49. package/dist/types/src/collab/store.d.ts +2 -2
  50. package/dist/types/src/core/__fixtures__/nodes.d.ts +1 -1
  51. package/dist/types/src/core/announcer.d.ts +1 -1
  52. package/dist/types/src/core/child-layout.d.ts +1 -1
  53. package/dist/types/src/core/child-validation.d.ts +1 -1
  54. package/dist/types/src/core/clipboard.d.ts +1 -1
  55. package/dist/types/src/core/collapse.d.ts +1 -1
  56. package/dist/types/src/core/compute.d.ts +1 -1
  57. package/dist/types/src/core/connections.d.ts +1 -1
  58. package/dist/types/src/core/controls-panel.d.ts +1 -1
  59. package/dist/types/src/core/crossing-reduction.d.ts +2 -2
  60. package/dist/types/src/core/drag.d.ts +1 -1
  61. package/dist/types/src/core/edge-paths/avoidant.d.ts +3 -3
  62. package/dist/types/src/core/edge-paths/bezier.d.ts +2 -2
  63. package/dist/types/src/core/edge-paths/editable.d.ts +2 -2
  64. package/dist/types/src/core/edge-paths/index.d.ts +7 -7
  65. package/dist/types/src/core/edge-paths/orthogonal.d.ts +2 -2
  66. package/dist/types/src/core/edge-paths/smoothstep.d.ts +2 -2
  67. package/dist/types/src/core/edge-paths/straight.d.ts +1 -1
  68. package/dist/types/src/core/edge-paths/utils.d.ts +1 -1
  69. package/dist/types/src/core/edge-utils.d.ts +3 -3
  70. package/dist/types/src/core/endpoint-spread.d.ts +1 -1
  71. package/dist/types/src/core/export.d.ts +1 -1
  72. package/dist/types/src/core/floating-edge.d.ts +1 -1
  73. package/dist/types/src/core/geometry.d.ts +1 -1
  74. package/dist/types/src/core/gradients.d.ts +1 -1
  75. package/dist/types/src/core/graph.d.ts +1 -1
  76. package/dist/types/src/core/helper-lines.d.ts +1 -1
  77. package/dist/types/src/core/history.d.ts +1 -1
  78. package/dist/types/src/core/index.d.ts +17 -17
  79. package/dist/types/src/core/intersection.d.ts +1 -1
  80. package/dist/types/src/core/lasso-hit-test.d.ts +1 -1
  81. package/dist/types/src/core/lasso.d.ts +2 -2
  82. package/dist/types/src/core/layout/dagre.d.ts +1 -1
  83. package/dist/types/src/core/layout/elk.d.ts +1 -1
  84. package/dist/types/src/core/layout/force.d.ts +1 -1
  85. package/dist/types/src/core/layout/hierarchy.d.ts +1 -1
  86. package/dist/types/src/core/minimap.d.ts +1 -1
  87. package/dist/types/src/core/pan-zoom.d.ts +10 -4
  88. package/dist/types/src/core/proximity-connect.d.ts +1 -1
  89. package/dist/types/src/core/render-plan.d.ts +1 -1
  90. package/dist/types/src/core/resize.d.ts +1 -1
  91. package/dist/types/src/core/schema-geometry.d.ts +1 -1
  92. package/dist/types/src/core/selection-box.d.ts +1 -1
  93. package/dist/types/src/core/shapes.d.ts +1 -1
  94. package/dist/types/src/core/sub-flow.d.ts +1 -1
  95. package/dist/types/src/core/types.d.ts +11 -11
  96. package/dist/types/src/index.d.ts +31 -31
  97. package/dist/types/src/plugin/connection-utils.d.ts +3 -3
  98. package/dist/types/src/plugin/data/__real-canvas-harness.d.ts +1 -1
  99. package/dist/types/src/plugin/data/__test-utils.d.ts +1 -1
  100. package/dist/types/src/plugin/data/canvas-animation.d.ts +13 -13
  101. package/dist/types/src/plugin/data/canvas-batch.d.ts +1 -1
  102. package/dist/types/src/plugin/data/canvas-collapse.d.ts +1 -1
  103. package/dist/types/src/plugin/data/canvas-compute.d.ts +2 -2
  104. package/dist/types/src/plugin/data/canvas-condense.d.ts +1 -1
  105. package/dist/types/src/plugin/data/canvas-config.d.ts +1 -1
  106. package/dist/types/src/plugin/data/canvas-context.d.ts +21 -21
  107. package/dist/types/src/plugin/data/canvas-dom.d.ts +2 -2
  108. package/dist/types/src/plugin/data/canvas-edges.d.ts +2 -2
  109. package/dist/types/src/plugin/data/canvas-history.d.ts +2 -2
  110. package/dist/types/src/plugin/data/canvas-layout.d.ts +4 -4
  111. package/dist/types/src/plugin/data/canvas-nodes.d.ts +2 -2
  112. package/dist/types/src/plugin/data/canvas-particles.d.ts +2 -2
  113. package/dist/types/src/plugin/data/canvas-rows.d.ts +2 -2
  114. package/dist/types/src/plugin/data/canvas-selection.d.ts +1 -1
  115. package/dist/types/src/plugin/data/canvas-validation.d.ts +2 -2
  116. package/dist/types/src/plugin/data/canvas-viewport.d.ts +4 -4
  117. package/dist/types/src/plugin/directives/flow-edge.d.ts +1 -1
  118. package/dist/types/src/plugin/directives/flow-handle-validate.d.ts +1 -1
  119. package/dist/types/src/plugin/directives/flow-handle.d.ts +2 -2
  120. package/dist/types/src/plugin/drag-validation.d.ts +1 -1
  121. package/dist/types/src/plugin/handle-index.d.ts +1 -1
  122. package/dist/types/src/schema/canvas-augmentation.test-d.d.ts +1 -1
  123. package/dist/types/src/schema/diff.d.ts +1 -1
  124. package/dist/types/src/schema/dot.d.ts +1 -1
  125. package/dist/types/src/schema/field-ops.d.ts +1 -1
  126. package/dist/types/src/schema/history.d.ts +1 -1
  127. package/dist/types/src/schema/index.d.ts +24 -24
  128. package/dist/types/src/schema/layout.d.ts +1 -1
  129. package/dist/types/src/schema/references.d.ts +1 -1
  130. package/dist/types/src/schema/serialization.d.ts +1 -1
  131. package/dist/types/src/schema/types.d.ts +1 -1
  132. package/dist/types/src/schema/validate.d.ts +1 -1
  133. package/dist/types/src/workflow/condition.d.ts +1 -1
  134. package/dist/types/src/workflow/index.d.ts +3 -3
  135. package/dist/types/src/workflow/replay.d.ts +1 -1
  136. package/dist/types/src/workflow/run.d.ts +1 -1
  137. package/dist/types/src/workflow/types.d.ts +3 -3
  138. package/package.json +3 -2
  139. package/dist/index-CvQXC8Md.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import type { Alpine } from 'alpinejs';
2
- import type { Connection } from '../../core/types';
2
+ import type { Connection } from '../../core/types.js';
3
3
  /** Expando property name for the validator function on handle elements. */
4
4
  export declare const HANDLE_VALIDATE_KEY = "_flowHandleValidate";
5
5
  declare global {
@@ -1,6 +1,6 @@
1
1
  import type { Alpine } from 'alpinejs';
2
- import type { HandleType, FlowEdge, Connection } from '../../core/types';
3
- import { type HandleIndex } from '../handle-index';
2
+ import type { HandleType, FlowEdge, Connection } from '../../core/types.js';
3
+ import { type HandleIndex } from '../handle-index.js';
4
4
  /**
5
5
  * Run per-handle validators for a connection.
6
6
  * Looks up source and target handle elements by node ID and handle ID,
@@ -1,4 +1,4 @@
1
- import type { Connection, FlowEdge } from '../core/types';
1
+ import type { Connection, FlowEdge } from '../core/types.js';
2
2
  /**
3
3
  * Precomputed lookups for the drag-time validation chain, keyed so the
4
4
  * per-handle apply loop can answer each check with a single map/set read.
@@ -1,4 +1,4 @@
1
- import type { XYPosition } from '../core/types';
1
+ import type { XYPosition } from '../core/types.js';
2
2
  /** A single measured connection handle, captured once per drag gesture. */
3
3
  export interface HandleRecord {
4
4
  el: HTMLElement;
@@ -1,4 +1,4 @@
1
- import './index';
1
+ import './index.js';
2
2
  declare const _addedApplied: boolean;
3
3
  declare const _addedReason: string | undefined;
4
4
  declare const _renamedCascaded: string[];
@@ -1,4 +1,4 @@
1
- import type { DiffOptions, SchemaDiff, SchemaGraphJSON } from './types';
1
+ import type { DiffOptions, SchemaDiff, SchemaGraphJSON } from './types.js';
2
2
  /**
3
3
  * Compute a structured delta between two schema snapshots. Pure, deterministic,
4
4
  * tolerant of malformed input (missing `version`, null snapshots, nodes without
@@ -1,4 +1,4 @@
1
- import type { DotExportOptions } from './types';
1
+ import type { DotExportOptions } from './types.js';
2
2
  /**
3
3
  * Render `canvas.nodes` + `canvas.edges` as a graphviz DOT string.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { FlowSchemaField } from '../core/types';
1
+ import type { FlowSchemaField } from '../core/types.js';
2
2
  export interface AddFieldResult {
3
3
  applied: boolean;
4
4
  reason?: string;
@@ -1,4 +1,4 @@
1
- import type { SchemaHistoryHandle, SchemaHistoryOptions } from './types';
1
+ import type { SchemaHistoryHandle, SchemaHistoryOptions } from './types.js';
2
2
  /**
3
3
  * Attach a bounded undo/redo stack to a canvas. Returns a handle with
4
4
  * `undo()`, `redo()`, `batch(fn)`, `clear()`, and `dispose()`.
@@ -1,31 +1,31 @@
1
1
  import type { Alpine } from 'alpinejs';
2
- import { addField, renameField, removeField, reorderFields } from './field-ops';
3
- import type { AddFieldResult, RenameFieldOpResult, RemoveFieldOpResult, ReorderFieldsOpResult } from './field-ops';
4
- import { inferReferences } from './references';
5
- import { schemaToJSON, schemaFromJSON } from './serialization';
6
- import { validateSchema } from './validate';
7
- import { diffSchemas } from './diff';
8
- import { toDot } from './dot';
9
- import { schemaLayout } from './layout';
10
- import { attachSchemaHistory } from './history';
11
- import { registerNodeInspectorDirective } from './inspector/node-inspector';
12
- import { registerRowInspectorDirective } from './inspector/row-inspector';
13
- import { registerEdgeInspectorDirective } from './inspector/edge-inspector';
14
- import { registerSchemaReorderableDirective } from './reorderable';
15
- import { registerSchemaKeyboardNavDirective } from './keyboard-nav';
16
- import type { DotExportOptions, SchemaLayoutOptions, SchemaGraphJSON, SchemaValidationResult, SchemaDiff, DiffOptions, ReferenceSuggestion } from './types';
17
- import type { FlowSchemaField } from '../core/types';
18
- export * from './types';
19
- export * from './validate';
20
- export * from './diff';
21
- export * from './dot';
22
- export * from './layout';
23
- export * from './history';
2
+ import { addField, renameField, removeField, reorderFields } from './field-ops.js';
3
+ import type { AddFieldResult, RenameFieldOpResult, RemoveFieldOpResult, ReorderFieldsOpResult } from './field-ops.js';
4
+ import { inferReferences } from './references.js';
5
+ import { schemaToJSON, schemaFromJSON } from './serialization.js';
6
+ import { validateSchema } from './validate.js';
7
+ import { diffSchemas } from './diff.js';
8
+ import { toDot } from './dot.js';
9
+ import { schemaLayout } from './layout.js';
10
+ import { attachSchemaHistory } from './history.js';
11
+ import { registerNodeInspectorDirective } from './inspector/node-inspector.js';
12
+ import { registerRowInspectorDirective } from './inspector/row-inspector.js';
13
+ import { registerEdgeInspectorDirective } from './inspector/edge-inspector.js';
14
+ import { registerSchemaReorderableDirective } from './reorderable.js';
15
+ import { registerSchemaKeyboardNavDirective } from './keyboard-nav.js';
16
+ import type { DotExportOptions, SchemaLayoutOptions, SchemaGraphJSON, SchemaValidationResult, SchemaDiff, DiffOptions, ReferenceSuggestion } from './types.js';
17
+ import type { FlowSchemaField } from '../core/types.js';
18
+ export * from './types.js';
19
+ export * from './validate.js';
20
+ export * from './diff.js';
21
+ export * from './dot.js';
22
+ export * from './layout.js';
23
+ export * from './history.js';
24
24
  export { addField, renameField, removeField, reorderFields, inferReferences, schemaToJSON, schemaFromJSON, validateSchema, diffSchemas, toDot, schemaLayout, attachSchemaHistory };
25
25
  export { registerNodeInspectorDirective, registerRowInspectorDirective, registerEdgeInspectorDirective, registerSchemaReorderableDirective, registerSchemaKeyboardNavDirective };
26
- export type { AddFieldResult, RenameFieldOpResult, RemoveFieldOpResult, ReorderFieldsOpResult } from './field-ops';
26
+ export type { AddFieldResult, RenameFieldOpResult, RemoveFieldOpResult, ReorderFieldsOpResult } from './field-ops.js';
27
27
  export default function registerSchemaAddon(Alpine: Alpine): void;
28
- declare module '../plugin/data/canvas-context' {
28
+ declare module '../plugin/data/canvas-context.js' {
29
29
  interface CanvasContext {
30
30
  /** Append a field to a schema node. Rejects invalid/duplicate names silently. _(schema addon)_ */
31
31
  addField(nodeId: string, field: FlowSchemaField): AddFieldResult;
@@ -1,4 +1,4 @@
1
- import type { SchemaLayoutOptions } from './types';
1
+ import type { SchemaLayoutOptions } from './types.js';
2
2
  /**
3
3
  * Apply a schema-tuned layout to the canvas.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { ReferenceSuggestion } from './types';
1
+ import type { ReferenceSuggestion } from './types.js';
2
2
  interface NodeLike {
3
3
  id: string;
4
4
  data?: {
@@ -1,4 +1,4 @@
1
- import type { SchemaGraphJSON } from './types';
1
+ import type { SchemaGraphJSON } from './types.js';
2
2
  /**
3
3
  * Export schema graph as a stable JSON shape. Strips internal underscore-prefixed
4
4
  * flags and only keeps the documented public fields.
@@ -1,4 +1,4 @@
1
- import type { FlowSchemaField } from '../core/types';
1
+ import type { FlowSchemaField } from '../core/types.js';
2
2
  export interface AddFieldOptions {
3
3
  /** The field to append. Fails silently if the name already exists on the node. */
4
4
  field: FlowSchemaField;
@@ -1,4 +1,4 @@
1
- import type { SchemaValidationResult } from './types';
1
+ import type { SchemaValidationResult } from './types.js';
2
2
  /**
3
3
  * Inspect a canvas (nodes + edges) and produce a structured list of schema
4
4
  * issues. Pure — no mutation, no events, never throws.
@@ -1,3 +1,3 @@
1
- import type { FlowCondition } from './types';
1
+ import type { FlowCondition } from './types.js';
2
2
  /** Evaluate a single FlowCondition against a payload. */
3
3
  export declare function evaluateCondition(condition: FlowCondition, payload: Record<string, any>): boolean;
@@ -1,4 +1,4 @@
1
- export type { FlowRunHandlers, FlowRunOptions, FlowRunContext, FlowRunHandle, FlowRunLogEntry, FlowRunLogEntryType, FlowCondition, ReplayHandle, ReplayOptions, WorkflowRunState } from './types';
2
- export { validateWorkflow } from './validate';
3
- export type { WorkflowIssueCode, WorkflowValidationIssue, WorkflowValidationResult } from './validate';
1
+ export type { FlowRunHandlers, FlowRunOptions, FlowRunContext, FlowRunHandle, FlowRunLogEntry, FlowRunLogEntryType, FlowCondition, ReplayHandle, ReplayOptions, WorkflowRunState } from './types.js';
2
+ export { validateWorkflow } from './validate.js';
3
+ export type { WorkflowIssueCode, WorkflowValidationIssue, WorkflowValidationResult } from './validate.js';
4
4
  export default function AlpineFlowWorkflow(Alpine: any): void;
@@ -1,2 +1,2 @@
1
- import type { FlowRunLogEntry, ReplayOptions, ReplayHandle } from './types';
1
+ import type { FlowRunLogEntry, ReplayOptions, ReplayHandle } from './types.js';
2
2
  export declare function createReplayExecutor(canvas: any): (log: FlowRunLogEntry[], options?: ReplayOptions) => Promise<ReplayHandle>;
@@ -1,2 +1,2 @@
1
- import type { FlowRunHandlers, FlowRunOptions, FlowRunHandle } from './types';
1
+ import type { FlowRunHandlers, FlowRunOptions, FlowRunHandle } from './types.js';
2
2
  export declare function createRunExecutor(canvas: any): (startId: string, handlers?: FlowRunHandlers, options?: FlowRunOptions) => Promise<FlowRunHandle>;
@@ -1,4 +1,4 @@
1
- import type { FlowNode } from '../core/types';
1
+ import type { FlowNode } from '../core/types.js';
2
2
  export interface FlowRunHandlers {
3
3
  onEnter?: (node: FlowNode, context: FlowRunContext) => Promise<Record<string, any> | void> | Record<string, any> | void;
4
4
  onExit?: (node: FlowNode, context: FlowRunContext) => Promise<Record<string, any> | void> | Record<string, any> | void;
@@ -64,13 +64,13 @@ export interface ReplayHandle {
64
64
  readonly isPaused: boolean;
65
65
  readonly isStopped: boolean;
66
66
  }
67
- declare module '../core/types' {
67
+ declare module '../core/types.js' {
68
68
  interface FlowInstance {
69
69
  run(startId: string, handlers: FlowRunHandlers, options?: FlowRunOptions): Promise<FlowRunHandle>;
70
70
  replayExecution(log: FlowRunLogEntry[], options?: ReplayOptions): Promise<ReplayHandle>;
71
71
  executionLog: FlowRunLogEntry[];
72
72
  resetExecutionLog(): void;
73
- validateWorkflow(): import('./validate').WorkflowValidationResult;
73
+ validateWorkflow(): import('./validate.js').WorkflowValidationResult;
74
74
  readonly runState: WorkflowRunState;
75
75
  stopRun(): void;
76
76
  _currentRunHandle: FlowRunHandle | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "@getartisanflow/alpineflow",
4
- "version": "0.2.4-alpha",
4
+ "version": "0.2.5-alpha",
5
5
  "description": "Interactive flowchart and node-graph engine for Alpine.js — drag-and-drop nodes, edges, animations, collaboration, and layout algorithms.",
6
6
  "keywords": [
7
7
  "alpinejs",
@@ -84,7 +84,8 @@
84
84
  "dist/"
85
85
  ],
86
86
  "scripts": {
87
- "build": "vite build && tsc && npm run build:locales && npm run build:css && npm run build:bundle && npm run build:addons",
87
+ "build": "vite build && npm run build:types && npm run build:locales && npm run build:css && npm run build:bundle && npm run build:addons",
88
+ "build:types": "tsc && node scripts/fix-dts-extensions.mjs",
88
89
  "build:locales": "mkdir -p dist/locales && cp locales/*.json dist/locales/",
89
90
  "build:css": "cp css/structural.css dist/alpineflow.css && cp css/theme-default.css dist/alpineflow-theme.css",
90
91
  "build:bundle": "vite build --config vite.bundle.config.ts",