@wfgraph/plugins 3.1.0 → 4.0.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/dist/ui.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import { Option, Schema, SchemaTransformation } from "effect";
2
2
  import { compact } from "es-toolkit/array";
3
- //#region \0rolldown/runtime.js
4
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
3
+ // \0rolldown/runtime.js
4
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
5
5
  Schema.String.pipe(Schema.decodeTo(Schema.String, SchemaTransformation.trim())).check(Schema.isMinLength(1));
6
+ Schema.Finite.check(Schema.isInt(), Schema.isGreaterThan(0));
7
+ Schema.Finite.check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0));
6
8
  Schema.Record(Schema.String, Schema.Unknown);
7
9
  /**
8
10
  * Reads a value that arrived from outside the program, answering `undefined`
@@ -25,8 +27,7 @@ function readAs(schema) {
25
27
  const decode = Schema.decodeUnknownOption(schema);
26
28
  return (value) => Option.getOrUndefined(decode(value));
27
29
  }
28
- //#endregion
29
- //#region ../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.production.js
30
+ // ../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react-jsx-runtime.production.js
30
31
  /**
31
32
  * @license React
32
33
  * react-jsx-runtime.production.js
@@ -60,8 +61,7 @@ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((expor
60
61
  exports.jsx = jsxProd;
61
62
  exports.jsxs = jsxProd;
62
63
  }));
63
- //#endregion
64
- //#region ../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.production.js
64
+ // ../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react.production.js
65
65
  /**
66
66
  * @license React
67
67
  * react.production.js
@@ -84,6 +84,7 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
84
84
  var REACT_MEMO_TYPE = Symbol.for("react.memo");
85
85
  var REACT_LAZY_TYPE = Symbol.for("react.lazy");
86
86
  var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
87
+ var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition");
87
88
  var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
88
89
  function getIteratorFn(maybeIterable) {
89
90
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
@@ -222,14 +223,13 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
222
223
  }
223
224
  function lazyInitializer(payload) {
224
225
  if (-1 === payload._status) {
225
- var ctor = payload._result;
226
- ctor = ctor();
227
- ctor.then(function(moduleObject) {
228
- if (0 === payload._status || -1 === payload._status) payload._status = 1, payload._result = moduleObject;
226
+ var ctor = payload._result, thenable = ctor();
227
+ thenable.then(function(moduleObject) {
228
+ if (0 === payload._status || -1 === payload._status) payload._status = 1, payload._result = moduleObject, void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
229
229
  }, function(error) {
230
- if (0 === payload._status || -1 === payload._status) payload._status = 2, payload._result = error;
230
+ if (0 === payload._status || -1 === payload._status) payload._status = 2, payload._result = error, void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
231
231
  });
232
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
232
+ -1 === payload._status && (payload._status = 0, payload._result = thenable);
233
233
  }
234
234
  if (1 === payload._status) return payload._result.default;
235
235
  throw payload._result;
@@ -249,6 +249,27 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
249
249
  }
250
250
  console.error(error);
251
251
  };
252
+ function startTransition(scope) {
253
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
254
+ currentTransition.types = null !== prevTransition ? prevTransition.types : null;
255
+ ReactSharedInternals.T = currentTransition;
256
+ try {
257
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
258
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
259
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
260
+ } catch (error) {
261
+ reportGlobalError(error);
262
+ } finally {
263
+ null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
264
+ }
265
+ }
266
+ function addTransitionType(type) {
267
+ var transition = ReactSharedInternals.T;
268
+ if (null !== transition) {
269
+ var transitionTypes = transition.types;
270
+ null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
271
+ } else startTransition(addTransitionType.bind(null, type));
272
+ }
252
273
  var Children = {
253
274
  map: mapChildren,
254
275
  forEach: function(children, forEachFunc, forEachContext) {
@@ -281,6 +302,7 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
281
302
  exports.PureComponent = PureComponent;
282
303
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
283
304
  exports.Suspense = REACT_SUSPENSE_TYPE;
305
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
284
306
  exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
285
307
  exports.__COMPILER_RUNTIME = {
286
308
  __proto__: null,
@@ -288,6 +310,7 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
288
310
  return ReactSharedInternals.H.useMemoCache(size);
289
311
  }
290
312
  };
313
+ exports.addTransitionType = addTransitionType;
291
314
  exports.cache = function(fn) {
292
315
  return function() {
293
316
  return fn.apply(null, arguments);
@@ -363,19 +386,7 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
363
386
  compare: void 0 === compare ? null : compare
364
387
  };
365
388
  };
366
- exports.startTransition = function(scope) {
367
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
368
- ReactSharedInternals.T = currentTransition;
369
- try {
370
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
371
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
372
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
373
- } catch (error) {
374
- reportGlobalError(error);
375
- } finally {
376
- null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
377
- }
378
- };
389
+ exports.startTransition = startTransition;
379
390
  exports.unstable_useCacheRefresh = function() {
380
391
  return ReactSharedInternals.H.useCacheRefresh();
381
392
  };
@@ -434,10 +445,9 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
434
445
  exports.useTransition = function() {
435
446
  return ReactSharedInternals.H.useTransition();
436
447
  };
437
- exports.version = "19.2.8";
448
+ exports.version = "19.3.1";
438
449
  }));
439
- //#endregion
440
- //#region ../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.js
450
+ // ../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react.development.js
441
451
  /**
442
452
  * @license React
443
453
  * react.development.js
@@ -507,6 +517,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
507
517
  case REACT_SUSPENSE_TYPE: return "Suspense";
508
518
  case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
509
519
  case REACT_ACTIVITY_TYPE: return "Activity";
520
+ case REACT_VIEW_TRANSITION_TYPE: return "ViewTransition";
510
521
  }
511
522
  if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
512
523
  case REACT_PORTAL_TYPE: return "Portal";
@@ -698,8 +709,11 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
698
709
  }
699
710
  function lazyInitializer(payload) {
700
711
  if (-1 === payload._status) {
701
- var ioInfo = payload._ioInfo;
702
- null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
712
+ var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo;
713
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) {
714
+ resolveDebugValue = resolve;
715
+ rejectDebugValue = reject;
716
+ }));
703
717
  ioInfo = payload._result;
704
718
  var thenable = ioInfo();
705
719
  thenable.then(function(moduleObject) {
@@ -707,7 +721,13 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
707
721
  payload._status = 1;
708
722
  payload._result = moduleObject;
709
723
  var _ioInfo = payload._ioInfo;
710
- null != _ioInfo && (_ioInfo.end = performance.now());
724
+ if (null != _ioInfo) {
725
+ _ioInfo.end = performance.now();
726
+ var debugValue = null == moduleObject ? void 0 : moduleObject.default;
727
+ resolveDebugValue(debugValue);
728
+ _ioInfo.value.status = "fulfilled";
729
+ _ioInfo.value.value = debugValue;
730
+ }
711
731
  void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
712
732
  }
713
733
  }, function(error) {
@@ -715,13 +735,12 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
715
735
  payload._status = 2;
716
736
  payload._result = error;
717
737
  var _ioInfo2 = payload._ioInfo;
718
- null != _ioInfo2 && (_ioInfo2.end = performance.now());
738
+ null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error);
719
739
  void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
720
740
  }
721
741
  });
722
742
  ioInfo = payload._ioInfo;
723
743
  if (null != ioInfo) {
724
- ioInfo.value = thenable;
725
744
  var displayName = thenable.displayName;
726
745
  "string" === typeof displayName && (ioInfo.name = displayName);
727
746
  }
@@ -738,6 +757,28 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
738
757
  function releaseAsyncTransition() {
739
758
  ReactSharedInternals.asyncTransitions--;
740
759
  }
760
+ function startTransition(scope) {
761
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
762
+ currentTransition.types = null !== prevTransition ? prevTransition.types : null;
763
+ currentTransition._updatedFibers = /* @__PURE__ */ new Set();
764
+ ReactSharedInternals.T = currentTransition;
765
+ try {
766
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
767
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
768
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
769
+ } catch (error) {
770
+ reportGlobalError(error);
771
+ } finally {
772
+ null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
773
+ }
774
+ }
775
+ function addTransitionType(type) {
776
+ var transition = ReactSharedInternals.T;
777
+ if (null !== transition) {
778
+ var transitionTypes = transition.types;
779
+ null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
780
+ } else 0 === ReactSharedInternals.asyncTransitions && console.error("addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."), startTransition(addTransitionType.bind(null, type));
781
+ }
741
782
  function enqueueTask(task) {
742
783
  if (null === enqueueTaskImpl) try {
743
784
  var requireString = ("require" + Math.random()).slice(0, 7);
@@ -802,7 +843,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
802
843
  }
803
844
  }
804
845
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
805
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
846
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
806
847
  isMounted: function() {
807
848
  return !1;
808
849
  },
@@ -915,6 +956,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
915
956
  exports.PureComponent = PureComponent;
916
957
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
917
958
  exports.Suspense = REACT_SUSPENSE_TYPE;
959
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
918
960
  exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
919
961
  exports.__COMPILER_RUNTIME = deprecatedAPIs;
920
962
  exports.act = function(callback) {
@@ -969,6 +1011,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
969
1011
  })) : resolve(returnValue$jscomp$0);
970
1012
  } };
971
1013
  };
1014
+ exports.addTransitionType = addTransitionType;
972
1015
  exports.cache = function(fn) {
973
1016
  return function() {
974
1017
  return fn.apply(null, arguments);
@@ -1028,6 +1071,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
1028
1071
  };
1029
1072
  exports.createElement = function(type, config, children) {
1030
1073
  for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i]);
1074
+ var propName;
1031
1075
  i = {};
1032
1076
  var key = null;
1033
1077
  if (null != config) for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
@@ -1040,8 +1084,8 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
1040
1084
  }
1041
1085
  if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1042
1086
  key && defineKeyPropWarningGetter(i, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
1043
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1044
- return ReactElement(type, key, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1087
+ (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack;
1088
+ return ReactElement(type, key, i, getOwner(), childrenLength, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1045
1089
  };
1046
1090
  exports.createRef = function() {
1047
1091
  var refObject = { current: null };
@@ -1112,20 +1156,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
1112
1156
  });
1113
1157
  return compare;
1114
1158
  };
1115
- exports.startTransition = function(scope) {
1116
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
1117
- currentTransition._updatedFibers = /* @__PURE__ */ new Set();
1118
- ReactSharedInternals.T = currentTransition;
1119
- try {
1120
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
1121
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
1122
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
1123
- } catch (error) {
1124
- reportGlobalError(error);
1125
- } finally {
1126
- null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
1127
- }
1128
- };
1159
+ exports.startTransition = startTransition;
1129
1160
  exports.unstable_useCacheRefresh = function() {
1130
1161
  return resolveDispatcher().useCacheRefresh();
1131
1162
  };
@@ -1191,18 +1222,16 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
1191
1222
  exports.useTransition = function() {
1192
1223
  return resolveDispatcher().useTransition();
1193
1224
  };
1194
- exports.version = "19.2.8";
1225
+ exports.version = "19.3.1";
1195
1226
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1196
1227
  })();
1197
1228
  }));
1198
- //#endregion
1199
- //#region ../../node_modules/.pnpm/react@19.2.8/node_modules/react/index.js
1229
+ // ../../node_modules/.pnpm/react@19.3.1/node_modules/react/index.js
1200
1230
  var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1201
1231
  if (process.env.NODE_ENV === "production") module.exports = require_react_production();
1202
1232
  else module.exports = require_react_development();
1203
1233
  }));
1204
- //#endregion
1205
- //#region ../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.development.js
1234
+ // ../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react-jsx-runtime.development.js
1206
1235
  /**
1207
1236
  * @license React
1208
1237
  * react-jsx-runtime.development.js
@@ -1225,6 +1254,7 @@ var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((expo
1225
1254
  case REACT_SUSPENSE_TYPE: return "Suspense";
1226
1255
  case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
1227
1256
  case REACT_ACTIVITY_TYPE: return "Activity";
1257
+ case REACT_VIEW_TRANSITION_TYPE: return "ViewTransition";
1228
1258
  }
1229
1259
  if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
1230
1260
  case REACT_PORTAL_TYPE: return "Portal";
@@ -1378,7 +1408,7 @@ var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((expo
1378
1408
  function isValidElement(object) {
1379
1409
  return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
1380
1410
  }
1381
- var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
1411
+ var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
1382
1412
  return null;
1383
1413
  };
1384
1414
  React = { react_stack_bottom_frame: function(callStackForError) {
@@ -1392,16 +1422,27 @@ var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((expo
1392
1422
  exports.Fragment = REACT_FRAGMENT_TYPE;
1393
1423
  exports.jsx = function(type, config, maybeKey) {
1394
1424
  var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1395
- return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1425
+ if (trackActualOwner) {
1426
+ var previousStackTraceLimit = Error.stackTraceLimit;
1427
+ Error.stackTraceLimit = 10;
1428
+ var debugStackDEV = Error("react-stack-top-frame");
1429
+ Error.stackTraceLimit = previousStackTraceLimit;
1430
+ } else debugStackDEV = unknownOwnerDebugStack;
1431
+ return jsxDEVImpl(type, config, maybeKey, !1, debugStackDEV, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1396
1432
  };
1397
1433
  exports.jsxs = function(type, config, maybeKey) {
1398
1434
  var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1399
- return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1435
+ if (trackActualOwner) {
1436
+ var previousStackTraceLimit = Error.stackTraceLimit;
1437
+ Error.stackTraceLimit = 10;
1438
+ var debugStackDEV = Error("react-stack-top-frame");
1439
+ Error.stackTraceLimit = previousStackTraceLimit;
1440
+ } else debugStackDEV = unknownOwnerDebugStack;
1441
+ return jsxDEVImpl(type, config, maybeKey, !0, debugStackDEV, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1400
1442
  };
1401
1443
  })();
1402
1444
  }));
1403
- //#endregion
1404
- //#region src/clerk/components/user-card.tsx
1445
+ // src/clerk/components/user-card.tsx
1405
1446
  var import_jsx_runtime = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
1406
1447
  if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production();
1407
1448
  else module.exports = require_react_jsx_runtime_development();
@@ -1443,8 +1484,7 @@ function UserCard({ output }) {
1443
1484
  })]
1444
1485
  });
1445
1486
  }
1446
- //#endregion
1447
- //#region src/clerk/icon.tsx
1487
+ // src/clerk/icon.tsx
1448
1488
  function ClerkIcon({ className }) {
1449
1489
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
1450
1490
  className,
@@ -1471,8 +1511,7 @@ function ClerkIcon({ className }) {
1471
1511
  ]
1472
1512
  });
1473
1513
  }
1474
- //#endregion
1475
- //#region src/linear/icon.tsx
1514
+ // src/linear/icon.tsx
1476
1515
  function LinearIcon({ className }) {
1477
1516
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
1478
1517
  "aria-label": "Linear",
@@ -1486,8 +1525,18 @@ function LinearIcon({ className }) {
1486
1525
  })]
1487
1526
  });
1488
1527
  }
1489
- //#endregion
1490
- //#region src/resend/icon.tsx
1528
+ // src/posthog/icon.tsx
1529
+ function PostHogIcon({ className }) {
1530
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
1531
+ "aria-label": "PostHog",
1532
+ className,
1533
+ fill: "currentColor",
1534
+ viewBox: "0 0 24 24",
1535
+ xmlns: "http://www.w3.org/2000/svg",
1536
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "PostHog" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9.854 14.5 5 9.647.854 5.5A.5.5 0 0 0 0 5.854V8.44a.5.5 0 0 0 .146.353L5 13.647l.147.146L9.854 18.5l.146.147v-.049c.065.03.134.049.207.049h2.586a.5.5 0 0 0 .353-.854L9.854 14.5zm0-5-4-4a.487.487 0 0 0-.409-.144.515.515 0 0 0-.356.21.493.493 0 0 0-.089.288V8.44a.5.5 0 0 0 .147.353l9 9a.5.5 0 0 0 .853-.354v-2.585a.5.5 0 0 0-.146-.354l-5-5zm1-4a.5.5 0 0 0-.854.354V8.44a.5.5 0 0 0 .147.353l4 4a.5.5 0 0 0 .853-.354V9.854a.5.5 0 0 0-.146-.354l-4-4zm12.647 11.515a3.863 3.863 0 0 1-2.232-1.1l-4.708-4.707a.5.5 0 0 0-.854.354v6.585a.5.5 0 0 0 .5.5H23.5a.5.5 0 0 0 .5-.5v-.6c0-.276-.225-.497-.499-.532zm-5.394.032a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zM.854 15.5a.5.5 0 0 0-.854.354v2.293a.5.5 0 0 0 .5.5h2.293c.222 0 .39-.135.462-.309a.493.493 0 0 0-.109-.545L.854 15.501zM5 14.647.854 10.5a.5.5 0 0 0-.854.353v2.586a.5.5 0 0 0 .146.353L4.854 18.5l.146.147h2.793a.5.5 0 0 0 .353-.854L5 14.647z" })]
1537
+ });
1538
+ }
1539
+ // src/resend/icon.tsx
1491
1540
  function ResendIcon({ className }) {
1492
1541
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
1493
1542
  className,
@@ -1500,8 +1549,7 @@ function ResendIcon({ className }) {
1500
1549
  })
1501
1550
  });
1502
1551
  }
1503
- //#endregion
1504
- //#region src/slack/icon.tsx
1552
+ // src/slack/icon.tsx
1505
1553
  function SlackIcon({ className }) {
1506
1554
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
1507
1555
  "aria-label": "Slack",
@@ -1532,8 +1580,7 @@ function SlackIcon({ className }) {
1532
1580
  })]
1533
1581
  });
1534
1582
  }
1535
- //#endregion
1536
- //#region src/twilio/icon.tsx
1583
+ // src/twilio/icon.tsx
1537
1584
  function TwilioIcon({ className }) {
1538
1585
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
1539
1586
  "aria-label": "Twilio",
@@ -1576,8 +1623,7 @@ function TwilioIcon({ className }) {
1576
1623
  ]
1577
1624
  });
1578
1625
  }
1579
- //#endregion
1580
- //#region src/ui.ts
1626
+ // src/ui.ts
1581
1627
  const integrationUi = {
1582
1628
  clerk: {
1583
1629
  icon: ClerkIcon,
@@ -1588,9 +1634,9 @@ const integrationUi = {
1588
1634
  }
1589
1635
  },
1590
1636
  linear: { icon: LinearIcon },
1637
+ posthog: { icon: PostHogIcon },
1591
1638
  resend: { icon: ResendIcon },
1592
1639
  slack: { icon: SlackIcon },
1593
1640
  twilio: { icon: TwilioIcon }
1594
1641
  };
1595
- //#endregion
1596
1642
  export { integrationUi };
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@wfgraph/plugins",
3
- "version": "3.1.0",
4
- "description": "The five built-in Workflow Graph integrations, plus the icons and output renderers the editor draws them with",
3
+ "version": "4.0.0",
4
+ "description": "The six built-in Workflow Graph integrations, plus the icons and output renderers the editor draws them with",
5
5
  "keywords": [
6
6
  "automation",
7
7
  "clerk",
8
8
  "integrations",
9
9
  "linear",
10
+ "posthog",
11
+ "tanstack-intent",
10
12
  "workflow"
11
13
  ],
12
14
  "license": "Apache-2.0",
@@ -16,7 +18,8 @@
16
18
  "directory": "packages/plugins"
17
19
  },
18
20
  "files": [
19
- "dist"
21
+ "dist",
22
+ "skills"
20
23
  ],
21
24
  "type": "module",
22
25
  "imports": {
@@ -36,16 +39,17 @@
36
39
  "access": "public"
37
40
  },
38
41
  "dependencies": {
39
- "@clerk/backend": "^2.33.6",
40
- "@linear/sdk": "^75.0.0",
41
- "effect": "4.0.0-rc.111",
42
- "es-toolkit": "^1.50.0"
42
+ "@clerk/backend": "^3.27.0",
43
+ "@linear/sdk": "^101.1.0",
44
+ "effect": "4.1.2",
45
+ "es-toolkit": "^1.53.1",
46
+ "svix": "^2.9.1"
43
47
  },
44
48
  "devDependencies": {
45
- "@types/react": "^19.2.18",
46
- "react": "19.2.8",
47
- "@wfgraph/core": "3.1.0",
48
- "@wfgraph/shared": "3.1.0"
49
+ "@types/react": "^19.3.0",
50
+ "react": "19.3.1",
51
+ "@wfgraph/core": "4.0.0",
52
+ "@wfgraph/shared": "4.0.0"
49
53
  },
50
54
  "peerDependencies": {
51
55
  "@wfgraph/core": "*"
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: wfgraph-plugins
3
+ description: >
4
+ Use when turning on the built-in Workflow Graph integrations from
5
+ @wfgraph/plugins (Clerk, Linear, PostHog, Resend, Slack and Twilio) in a host
6
+ application: passing builtInIntegrations() or individual exports in
7
+ extensions.integrations, configuring Slack OAuth with slack({ oauthClient }),
8
+ meeting the publicUrl and session cookie requirements of Slack, Resend and
9
+ PostHog OAuth, or receiving Resend webhook Events. Also use for requests such
10
+ as "let workflows send Slack messages" or "the Slack OAuth connection fails".
11
+ For writing a new vendor integration use wfgraph-core/integrations; for
12
+ mounting the app itself use wfgraph-core.
13
+ metadata:
14
+ purpose: >
15
+ builtInIntegrations, slack(options?) OAuth factory, clerk linear posthog
16
+ resend twilio value exports, publicUrl OAuth routes, @wfgraph/plugins/ui.
17
+ Load when turning on the six built-in integrations or wiring Slack, Resend,
18
+ or PostHog OAuth in the host.
19
+ type: core
20
+ library: wfgraph
21
+ library_version: "3.1.1"
22
+ sources:
23
+ - alandotcom/wfgraph:docs/embedding.md
24
+ - alandotcom/wfgraph:packages/plugins/README.md
25
+ ---
26
+
27
+ # Built-in integrations
28
+
29
+ Clerk, Linear, PostHog, Resend, Slack, and Twilio. Nothing registers on
30
+ import. Pass the values into `createWfGraphApp` under
31
+ `extensions.integrations`.
32
+
33
+ Writing a new vendor integration is `@wfgraph/core/plugin`
34
+ (wfgraph-core/integrations), not this package's internals.
35
+
36
+ Copy-paste `builtInIntegrations({ slack: { oauthClient } })` from
37
+ `packages/plugins/README.md`. Host `publicUrl` and the OAuth route table:
38
+ `docs/embedding.md` ("Built-in integrations").
39
+
40
+ ## Core Patterns
41
+
42
+ ### Some of the six
43
+
44
+ Clerk, Linear, PostHog, Resend, and Twilio are values. Slack is
45
+ `slack(options?)` because it closes over host OAuth client credentials.
46
+ Selecting individual exports narrows what reaches `createWfGraphApp`, not
47
+ what the process loads: the package still imports all six. `@wfgraph/core`
48
+ is a peer; keep one copy.
49
+
50
+ Omit `slack.oauthClient` to keep Slack manual-only. Resend and PostHog OAuth
51
+ use a public client metadata document and need no provider secret. All three
52
+ keep manual credential forms when OAuth is available.
53
+
54
+ Resend also declares webhook Events (`resend/email.delivered` and the rest of
55
+ the official types) on the umbrella source `resend/webhook`. Paste the
56
+ Connection URL from the Lifecycle Node (or Wait node). Add the signing secret
57
+ on that Connection (`RESEND_WEBHOOK_SECRET`). Copying the URL needs
58
+ `publicUrl`.
59
+
60
+ ### OAuth host requirements
61
+
62
+ OAuth requires `publicUrl`. HTTPS except loopback. Callback stays behind
63
+ `auth`; `SameSite=Lax` cookies work, custom request headers on the provider
64
+ redirect do not. Core derives callback and metadata URLs from `publicUrl`
65
+ plus `basePath`.
66
+
67
+ ### Editor UI
68
+
69
+ `@wfgraph/plugins/ui` exports `integrationUi` (icons and output renderers).
70
+ Browser-only; the server entry does not import React.
71
+
72
+ ## Common Mistakes
73
+
74
+ ### CRITICAL Expect import to enable integrations
75
+
76
+ Wrong: `import "@wfgraph/plugins"` then `createWfGraphApp({ extensions: {} })`.
77
+
78
+ Correct: `extensions.integrations: builtInIntegrations()` (or an explicit list).
79
+
80
+ Source: alandotcom/wfgraph:packages/plugins/README.md
81
+
82
+ ### HIGH Slack OAuth without publicUrl
83
+
84
+ Wrong: `builtInIntegrations({ slack: { oauthClient } })` with no `publicUrl`.
85
+
86
+ Correct: set `publicUrl` to the external origin.
87
+
88
+ Source: alandotcom/wfgraph:docs/embedding.md (Built-in integrations)
89
+
90
+ ### HIGH Two copies of @wfgraph/core
91
+
92
+ Wrong: a nested `@wfgraph/core` from a mismatched plugins install.
93
+
94
+ Correct: one resolved core (packages are released in lockstep). Duplicate
95
+ runtimes split the plugin contract from the app.
96
+
97
+ Source: alandotcom/wfgraph:docs/embedding.md
98
+
99
+ ### MEDIUM Header-based auth on the OAuth callback
100
+
101
+ Wrong: `auth` that requires a custom header the provider redirect cannot send.
102
+
103
+ Correct: session cookie `SameSite=Lax` (or equivalent) so the top-level
104
+ redirect still authenticates.
105
+
106
+ Source: alandotcom/wfgraph:docs/embedding.md
@@ -1,64 +0,0 @@
1
- import { callExternal, parsePayload } from "@wfgraph/core/plugin";
2
- import { Schema } from "effect";
3
- //#region src/resend/client.ts
4
- const RESEND_API_BASE = "https://api.resend.com";
5
- /** Resend's error body. `name` is the machine-readable slug. */
6
- const resendErrorSchema = Schema.Struct({
7
- statusCode: Schema.optionalKey(Schema.Finite),
8
- name: Schema.optionalKey(Schema.String),
9
- message: Schema.optionalKey(Schema.String)
10
- });
11
- const sentEmailSchema = Schema.Struct({ id: Schema.String });
12
- /**
13
- * Resend's error body, for a caller that reports more than the message.
14
- *
15
- * The connection test is that caller: a send-only key answers
16
- * `restricted_api_key` on the domains endpoint, which confirms the key works,
17
- * and only the slug says so.
18
- */
19
- function readResendError(payload) {
20
- return parsePayload(payload, resendErrorSchema);
21
- }
22
- /**
23
- * What Resend said, in one sentence a person reads.
24
- *
25
- * A refusal carries Resend's own message when its error body is the documented
26
- * shape and the bare status when it is not. A 2xx whose body is not the
27
- * documented resource says so, because reporting success there would tell the
28
- * run an email went out and leave nothing to look it up by.
29
- */
30
- function describeResendFailure(error) {
31
- if (error._tag === "ExternalUnreachable") return error.message;
32
- if (error._tag === "ExternalUnreadable") return `Resend answered ${error.status} with an unrecognized body`;
33
- return readResendError(error.payload)?.message ?? `HTTP ${error.status}`;
34
- }
35
- function requestResend(apiKey, path, schema, init) {
36
- return callExternal({
37
- system: "Resend",
38
- url: `${RESEND_API_BASE}${path}`,
39
- method: init.method,
40
- headers: { authorization: `Bearer ${apiKey}` },
41
- body: init.jsonBody === void 0 ? void 0 : {
42
- kind: "json",
43
- value: init.jsonBody
44
- },
45
- idempotencyKey: init.idempotencyKey,
46
- schema
47
- });
48
- }
49
- function sendResendEmail(apiKey, payload, idempotencyKey) {
50
- return requestResend(apiKey, "/emails", sentEmailSchema, {
51
- method: "POST",
52
- jsonBody: payload,
53
- idempotencyKey
54
- });
55
- }
56
- /**
57
- * Listing domains is a read-only call any valid key can make, which makes it the
58
- * check that says whether a key works without sending anything.
59
- */
60
- function listResendDomains(apiKey) {
61
- return requestResend(apiKey, "/domains", Schema.Unknown, { method: "GET" });
62
- }
63
- //#endregion
64
- export { sendResendEmail as i, listResendDomains as n, readResendError as r, describeResendFailure as t };