@plasmicapp/react-web 0.2.383 → 0.2.385

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/all.d.ts CHANGED
@@ -12183,7 +12183,11 @@ type ControlContext<P> = [
12183
12183
  /**
12184
12184
  * props
12185
12185
  */
12186
- P
12186
+ P,
12187
+ /**
12188
+ * context data
12189
+ */
12190
+ any
12187
12191
  ];
12188
12192
  /**
12189
12193
  * Config option that takes the context (e.g., props) of the function call
@@ -12356,6 +12360,18 @@ interface CustomFunctionMeta<F extends (...args: any[]) => any> {
12356
12360
  * not specified, it's considered `false`.
12357
12361
  */
12358
12362
  isDefaultExport?: boolean;
12363
+ /**
12364
+ * A function that takes the function arguments and returns a data key
12365
+ * and a fetcher function.
12366
+ * The data key is used to cache the result of the fetcher, and should only
12367
+ * include the arguments that are used to fetch the data.
12368
+ * The result of the fetcher will be used as the context of the function
12369
+ * in studio and should return a promise.
12370
+ */
12371
+ fnContext?: (...args: Partial<Parameters<F>>) => {
12372
+ dataKey: string;
12373
+ fetcher: () => Promise<any>;
12374
+ };
12359
12375
  }
12360
12376
  interface CustomFunctionRegistration {
12361
12377
  function: (...args: any[]) => any;
package/dist/index.cjs.js CHANGED
@@ -1487,6 +1487,9 @@ var PlasmicLinkInternal = React.forwardRef(function PlasmicLinkInternal(props, r
1487
1487
  if (props.platform === "gatsby" && isInternalHref(props.href)) {
1488
1488
  return React.createElement(props.component, __assign(__assign({}, omit(props, "component", "platform", "href")), { to: props.href, ref: ref }));
1489
1489
  }
1490
+ if (props.platform === "tanstack" && isInternalHref(props.href)) {
1491
+ return React.createElement(props.component, __assign(__assign({}, omit(props, "component", "platform", "href")), { to: props.href, ref: ref }));
1492
+ }
1490
1493
  return React.createElement("a", __assign({}, omit(props, "component", "platform"), { ref: ref }));
1491
1494
  });
1492
1495
  function isInternalHref(href) {