stickyflow 0.5.0 → 0.6.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/binding/index.cjs +9 -9
  3. package/dist/binding/index.d.cts +4 -4
  4. package/dist/binding/index.d.ts +4 -4
  5. package/dist/binding/index.js +3 -3
  6. package/dist/{chunk-IEHE6WVN.js → chunk-4G2R7PEL.js} +319 -45
  7. package/dist/chunk-4G2R7PEL.js.map +1 -0
  8. package/dist/{chunk-L3VJXZFD.cjs → chunk-4LENHH6C.cjs} +15 -15
  9. package/dist/{chunk-L3VJXZFD.cjs.map → chunk-4LENHH6C.cjs.map} +1 -1
  10. package/dist/{chunk-LTGF5OHP.js → chunk-FVHVOJS2.js} +395 -89
  11. package/dist/chunk-FVHVOJS2.js.map +1 -0
  12. package/dist/{chunk-TWDLOXRM.cjs → chunk-JIJMZMGY.cjs} +18 -18
  13. package/dist/{chunk-TWDLOXRM.cjs.map → chunk-JIJMZMGY.cjs.map} +1 -1
  14. package/dist/{chunk-VK3T6O5Z.cjs → chunk-KTNCDNDB.cjs} +33 -33
  15. package/dist/{chunk-VK3T6O5Z.cjs.map → chunk-KTNCDNDB.cjs.map} +1 -1
  16. package/dist/{chunk-BODZN3ZI.js → chunk-MFNUJA26.js} +4 -4
  17. package/dist/{chunk-BODZN3ZI.js.map → chunk-MFNUJA26.js.map} +1 -1
  18. package/dist/{chunk-7VW2XKVB.js → chunk-ULQZ6CZW.js} +3 -3
  19. package/dist/{chunk-7VW2XKVB.js.map → chunk-ULQZ6CZW.js.map} +1 -1
  20. package/dist/{chunk-ZMLQIMJK.cjs → chunk-WQRT5PVT.cjs} +993 -687
  21. package/dist/chunk-WQRT5PVT.cjs.map +1 -0
  22. package/dist/{chunk-G7NRK5AG.js → chunk-WRDVNMFS.js} +5 -5
  23. package/dist/{chunk-G7NRK5AG.js.map → chunk-WRDVNMFS.js.map} +1 -1
  24. package/dist/{chunk-XY2GZUHC.cjs → chunk-XJ4W6TW4.cjs} +326 -44
  25. package/dist/chunk-XJ4W6TW4.cjs.map +1 -0
  26. package/dist/index.cjs +49 -29
  27. package/dist/index.d.cts +52 -7
  28. package/dist/index.d.ts +52 -7
  29. package/dist/index.js +5 -5
  30. package/dist/interaction/index.cjs +245 -235
  31. package/dist/interaction/index.cjs.map +1 -1
  32. package/dist/interaction/index.d.cts +3 -2
  33. package/dist/interaction/index.d.ts +3 -2
  34. package/dist/interaction/index.js +17 -7
  35. package/dist/interaction/index.js.map +1 -1
  36. package/dist/{render-CgX_y15a.d.ts → render-Db0eSz_s.d.cts} +36 -15
  37. package/dist/{render-CgX_y15a.d.cts → render-Db0eSz_s.d.ts} +36 -15
  38. package/dist/{runtime-reWgr7MP.d.cts → runtime-BhivvBeL.d.cts} +2 -2
  39. package/dist/{runtime-DnUxca3Y.d.ts → runtime-n2yG-_j-.d.ts} +2 -2
  40. package/dist/{runtimeTypes-D60w6nyF.d.cts → runtimeTypes-CrkMHvVi.d.cts} +2 -2
  41. package/dist/{runtimeTypes-CEBGueYM.d.ts → runtimeTypes-DnI7mRF5.d.ts} +2 -2
  42. package/dist/stickyflow-diagram.global.js +35 -35
  43. package/dist/stickyflow-diagram.global.js.map +1 -1
  44. package/dist/{types-DvhMpqrL.d.cts → types-BHfUKT4s.d.cts} +1 -1
  45. package/dist/{types-DYLC_lsk.d.ts → types-D4cH4f1a.d.ts} +1 -1
  46. package/dist/viewer/index.cjs +9 -9
  47. package/dist/viewer/index.d.cts +4 -4
  48. package/dist/viewer/index.d.ts +4 -4
  49. package/dist/viewer/index.js +4 -4
  50. package/dist/web-component/index.cjs +6 -6
  51. package/dist/web-component/index.d.cts +2 -2
  52. package/dist/web-component/index.d.ts +2 -2
  53. package/dist/web-component/index.js +4 -4
  54. package/package.json +1 -1
  55. package/dist/chunk-IEHE6WVN.js.map +0 -1
  56. package/dist/chunk-LTGF5OHP.js.map +0 -1
  57. package/dist/chunk-XY2GZUHC.cjs.map +0 -1
  58. package/dist/chunk-ZMLQIMJK.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkZMLQIMJK_cjs = require('./chunk-ZMLQIMJK.cjs');
4
- var chunkXY2GZUHC_cjs = require('./chunk-XY2GZUHC.cjs');
3
+ var chunkWQRT5PVT_cjs = require('./chunk-WQRT5PVT.cjs');
4
+ var chunkXJ4W6TW4_cjs = require('./chunk-XJ4W6TW4.cjs');
5
5
 
6
6
  // src/binding/types.ts
7
7
  var DECLARED = {
@@ -102,10 +102,10 @@ function createDataSource(initial) {
102
102
  // src/binding/componentBinding.ts
103
103
  var BINDABLE_COMPONENT_PROPERTIES = ["value", "disabled"];
104
104
  function acceptsUserChange(componentType) {
105
- return chunkXY2GZUHC_cjs.getComponentDescriptor(componentType)?.value?.writable === true;
105
+ return chunkXJ4W6TW4_cjs.getComponentDescriptor(componentType)?.value?.writable === true;
106
106
  }
107
107
  function componentStateType(componentType, state) {
108
- const descriptor = chunkXY2GZUHC_cjs.getComponentDescriptor(componentType);
108
+ const descriptor = chunkXJ4W6TW4_cjs.getComponentDescriptor(componentType);
109
109
  if (state === "focused") {
110
110
  return "boolean";
111
111
  }
@@ -118,7 +118,7 @@ function componentPropertyType(componentType, property) {
118
118
  if (property === "disabled") {
119
119
  return "boolean";
120
120
  }
121
- return property === "value" ? chunkXY2GZUHC_cjs.getComponentDescriptor(componentType)?.value?.type : void 0;
121
+ return property === "value" ? chunkXJ4W6TW4_cjs.getComponentDescriptor(componentType)?.value?.type : void 0;
122
122
  }
123
123
  function twoWayTargetProblem(key, expr, contracts) {
124
124
  const target = expr.kind === "ref" ? expr.path : void 0;
@@ -683,7 +683,7 @@ function interactiveElements(graph) {
683
683
  collectRefs(binding.expr).forEach(note);
684
684
  }
685
685
  for (const [name, info] of graph.elements) {
686
- const interaction = chunkXY2GZUHC_cjs.getComponentDescriptor(info.componentType)?.interaction;
686
+ const interaction = chunkXJ4W6TW4_cjs.getComponentDescriptor(info.componentType)?.interaction;
687
687
  if (info.kind === "Component" && interaction && OPERATED.has(interaction) && !graph.contracts.has(name)) {
688
688
  pressable.add(name);
689
689
  }
@@ -733,17 +733,17 @@ function writeComponentValue(input, id, value) {
733
733
  if (!component) {
734
734
  return;
735
735
  }
736
- component.value = chunkXY2GZUHC_cjs.isGenericComponent(component) ? value : String(value);
736
+ component.value = chunkXJ4W6TW4_cjs.isGenericComponent(component) ? value : String(value);
737
737
  }
738
738
  function writeComponentDisabled(input, id, disabled) {
739
739
  const component = findComponent(input, id);
740
- if (component && chunkXY2GZUHC_cjs.isGenericComponent(component)) {
740
+ if (component && chunkXJ4W6TW4_cjs.isGenericComponent(component)) {
741
741
  component.disabled = disabled;
742
742
  }
743
743
  }
744
744
  function isComponentDisabled(input, id) {
745
745
  const component = findComponent(input, id);
746
- return component !== void 0 && chunkXY2GZUHC_cjs.isGenericComponent(component) && component.disabled;
746
+ return component !== void 0 && chunkXJ4W6TW4_cjs.isGenericComponent(component) && component.disabled;
747
747
  }
748
748
  function setShape(input, path, change) {
749
749
  const shape = input.shapes.find((candidate) => candidate.id === path[0]);
@@ -792,7 +792,7 @@ function applyShader(input, binding, value) {
792
792
 
793
793
  // src/binding/runtimeState.ts
794
794
  function initialValue(input, id, componentType) {
795
- const descriptor = chunkXY2GZUHC_cjs.getComponentDescriptor(componentType);
795
+ const descriptor = chunkXJ4W6TW4_cjs.getComponentDescriptor(componentType);
796
796
  const current = findComponent(input, id)?.value;
797
797
  if (current === void 0) {
798
798
  return descriptor?.value?.default ?? 0;
@@ -804,8 +804,8 @@ function initialValue(input, id, componentType) {
804
804
  return current;
805
805
  }
806
806
  function createRuntimeState(sfl, options) {
807
- const graph = buildBindingGraph(chunkXY2GZUHC_cjs.parseSource(sfl));
808
- const input = structuredClone(chunkZMLQIMJK_cjs.sflToRenderInput(sfl));
807
+ const graph = buildBindingGraph(chunkXJ4W6TW4_cjs.parseSource(sfl));
808
+ const input = structuredClone(chunkWQRT5PVT_cjs.sflToRenderInput(sfl));
809
809
  const elementState = /* @__PURE__ */ new Map();
810
810
  for (const [name, info] of graph.elements) {
811
811
  if (!graph.contracts.has(name)) {
@@ -865,7 +865,7 @@ function applyComponentValue(state, binding, value) {
865
865
  element.value = value;
866
866
  markDirty(state, id);
867
867
  }
868
- if (!chunkXY2GZUHC_cjs.isBuiltInComponentType(state.graph.elements.get(id)?.componentType)) {
868
+ if (!chunkXJ4W6TW4_cjs.isBuiltInComponentType(state.graph.elements.get(id)?.componentType)) {
869
869
  return true;
870
870
  }
871
871
  announce(state, binding.id, { kind: "component", id, value });
@@ -925,7 +925,7 @@ function flush(state) {
925
925
  if (!changed) {
926
926
  return null;
927
927
  }
928
- const result = chunkZMLQIMJK_cjs.renderCanvas(state.input, { ...state.options.renderOptions, linkHitAreas: true });
928
+ const result = chunkWQRT5PVT_cjs.renderCanvas(state.input, { ...state.options.renderOptions, linkHitAreas: true });
929
929
  for (const listener of [...state.listeners]) {
930
930
  listener(result);
931
931
  }
@@ -1000,7 +1000,7 @@ function setElementState(state, id, patch) {
1000
1000
  // src/binding/userInput.ts
1001
1001
  function descriptorOf(state, id) {
1002
1002
  const info = state.graph.elements.get(id);
1003
- return info?.kind === "Component" ? chunkXY2GZUHC_cjs.getComponentDescriptor(info.componentType) : void 0;
1003
+ return info?.kind === "Component" ? chunkXJ4W6TW4_cjs.getComponentDescriptor(info.componentType) : void 0;
1004
1004
  }
1005
1005
  function valueBinding(state, id) {
1006
1006
  return state.graph.bindings.find(
@@ -1176,7 +1176,7 @@ function renderBound(sfl, options = {}) {
1176
1176
  runtime.registerSource(name, { get: () => rows, subscribe: () => () => void 0 });
1177
1177
  }
1178
1178
  runtime.flush();
1179
- return chunkZMLQIMJK_cjs.renderCanvas(runtime.input, renderOptions);
1179
+ return chunkWQRT5PVT_cjs.renderCanvas(runtime.input, renderOptions);
1180
1180
  }
1181
1181
 
1182
1182
  exports.buildBindingGraph = buildBindingGraph;
@@ -1185,5 +1185,5 @@ exports.createBindingRuntime = createBindingRuntime;
1185
1185
  exports.createDataSource = createDataSource;
1186
1186
  exports.interactiveElements = interactiveElements;
1187
1187
  exports.renderBound = renderBound;
1188
- //# sourceMappingURL=chunk-TWDLOXRM.cjs.map
1189
- //# sourceMappingURL=chunk-TWDLOXRM.cjs.map
1188
+ //# sourceMappingURL=chunk-JIJMZMGY.cjs.map
1189
+ //# sourceMappingURL=chunk-JIJMZMGY.cjs.map