@plasmicapp/host
Advanced tools
Comparing version 1.0.74 to 1.0.75
@@ -36,4 +36,4 @@ import React, { ReactNode } from "react"; | ||
export interface PageParamsProviderProps { | ||
params?: Record<string, string>; | ||
query?: Record<string, string>; | ||
params?: Record<string, string | string[] | undefined>; | ||
query?: Record<string, string | string[] | undefined>; | ||
children?: ReactNode; | ||
@@ -40,0 +40,0 @@ } |
@@ -524,3 +524,3 @@ 'use strict'; | ||
var hostVersion = "1.0.74"; | ||
var hostVersion = "1.0.75"; | ||
@@ -527,0 +527,0 @@ var root$6 = globalThis; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-dom");function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=globalThis;null==l.__PlasmicHostVersion&&(l.__PlasmicHostVersion="2");var s=[],u=new function(e){var t=this;this.value=null,this.set=function(e){t.value=e,s.forEach((function(e){return e()}))},this.get=function(){return t.value}}(null);function c(){return function(e,t){if(void 0===t&&(t=""),null==e)throw t=(function(e){return"string"==typeof e}(t)?t:t())||"",new Error("Value must not be undefined or null"+(t?"- "+t:""));return e}(new URL("https://fakeurl/"+location.hash.replace(/#/,"?")).searchParams.get("origin"),"Missing information from Plasmic window.")}var p=0;function m(e){p++,u.set(e)}var d=t.createContext(!1),f=function(){return t.useContext(d)};function v(){var e,r,a,o=!!window.parent,i=!(null==(e=location.hash)||!e.match(/\bcanvas=true\b/)),l=!(null==(r=location.hash)||!r.match(/\blive=true\b/))||!o,m=o&&!document.querySelector("#plasmic-studio-tag")&&!i&&!l,f=(a=t.useState(0)[1],t.useCallback((function(){a((function(e){return e+1}))}),[]));if(t.useLayoutEffect((function(){return s.push(f),function(){var e=s.indexOf(f);e>=0&&s.splice(e,1)}}),[f]),t.useEffect((function(){var e,t;m&&o&&window.parent!==window&&(e=document.createElement("script"),t=c(),e.src=t+"/static/js/studio.js",document.body.appendChild(e))}),[m,o]),t.useEffect((function(){if(!m&&!document.querySelector("#getlibs")&&l){var e=document.createElement("script");e.id="getlibs",e.src=c()+"/static/js/getlibs.js",e.async=!1,e.onload=function(){null==window.__GetlibsReadyResolver||window.__GetlibsReadyResolver()},document.head.append(e)}}),[m]),!o)return null;if(i||l){var v,h=document.querySelector("#plasmic-app.__wab_user-body");h||((h=document.createElement("div")).id="plasmic-app",h.classList.add("__wab_user-body"),document.body.appendChild(h));var g=new URLSearchParams(location.hash),y=!!i&&{componentName:g.get("componentName"),globalVariants:JSON.parse(null!=(v=g.get("globalVariants"))?v:"{}")};return n.createPortal(t.createElement(b,{key:""+p},t.createElement(d.Provider,{value:y},u.get())),h,"plasmic-app")}return m&&window.parent===window?t.createElement("iframe",{src:"https://docs.plasmic.app/app-content/app-host-ready#appHostUrl="+encodeURIComponent(location.href),style:{width:"100vw",height:"100vh",border:"none",position:"fixed",top:0,left:0,zIndex:99999999}}):null}var h=function(e){var r=e.enableWebpackHmr,n=t.useState(null),a=n[0],o=n[1];return t.useEffect((function(){o(t.createElement(v,null))}),[]),t.createElement(t.Fragment,null,!r&&t.createElement(_,null),a)},g=[];function y(e){return g.push(e),function(){var t=g.indexOf(e);t>=0&&g.splice(t,1)}}var b=function(e){var r,n;function a(t){var r;return(r=e.call(this,t)||this).state={},r}n=e,(r=a).prototype=Object.create(n.prototype),r.prototype.constructor=r,o(r,n),a.getDerivedStateFromError=function(e){return{error:e}};var i=a.prototype;return i.componentDidCatch=function(e){g.forEach((function(t){return t(e)}))},i.render=function(){return this.state.error?t.createElement("div",null,"Error: ",""+this.state.error.message):t.createElement(t.Fragment,null,this.props.children)},a}(t.Component);function _(){return null}var x=t.createContext(void 0);function P(e){return"__plasmic_meta_"+e}function E(e){return e}function C(e,t){if(t){for(var r,n=e,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,void 0):void 0}}(e))){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t.split("."));!(r=a()).done;){var o;n=null==(o=n)?void 0:o[r.value]}return n}}function w(e){return C(S(),e)}function R(e){void 0===e&&(e={});var t=S();return Object.fromEntries(Object.entries(e).filter((function(e){return!!e[0]&&!!e[1]})).map((function(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t}(e[0],C(t,e[1]))})))}function S(){return t.useContext(x)}function j(e){var t,n,o=e.name,i=e.data,l=e.hidden,s=e.label,u=e.children,c=null!=(t=S())?t:{};return o?r.createElement(x.Provider,{value:a({},c,(n={},n[o]=i,n[P(o)]={hidden:l,label:s},n))},u):r.createElement(r.Fragment,null,u)}function O(e){var t=e.children,n=e.params,o=void 0===n?{}:n,i=e.query,l=void 0===i?{}:i,s=S()||{};return r.createElement(j,{name:"params",data:a({},s.params,o),label:"Page route params"},r.createElement(j,{name:"query",data:a({},s.query,l),label:"Page query params"},t))}function T(e){return(0,e.children)(S())}var D=globalThis;function F(e,t){D.__PlasmicFetcherRegistry.push({fetcher:e,meta:t})}D.__PlasmicFetcherRegistry=[];var q=globalThis;function A(e,t){q.__PlasmicComponentRegistry.push({component:e,meta:t})}null==q.__PlasmicComponentRegistry&&(q.__PlasmicComponentRegistry=[]);var M=globalThis;function V(e,t){M.__PlasmicContextRegistry.push({component:e,meta:t})}null==M.__PlasmicContextRegistry&&(M.__PlasmicContextRegistry=[]);var k,N,H=globalThis;function L(e,t){H.__PlasmicTraitRegistry.push({trait:e,meta:t})}function U(e,t){return I(e,t)}null==H.__PlasmicTraitRegistry&&(H.__PlasmicTraitRegistry=[]);var I=function(e,r){return Array.isArray(r)?r.map((function(t){return I(e,t)})):r&&t.isValidElement(r)&&"string"!=typeof r?t.cloneElement(r):r},G=globalThis,z=null!=(k=null==G||null==(N=G.__Sub)?void 0:N.setRepeatedElementFn)?k:function(e){I=e},J={__proto__:null,PlasmicCanvasContext:d,PlasmicCanvasHost:h,usePlasmicCanvasContext:f,unstable_registerFetcher:F,registerComponent:A,registerGlobalContext:V,registerTrait:L,repeatedElement:U,DataContext:x,mkMetaName:P,mkMetaValue:E,applySelector:C,useSelector:w,useSelectors:R,useDataEnv:S,DataProvider:j,PageParamsProvider:O,DataCtxReader:T},W=globalThis;null==W.__Sub&&(W.__Sub=a({React:t,ReactDOM:n,hostModule:J,hostVersion:"1.0.74",hostUtils:{setPlasmicRootNode:m,registerRenderErrorListener:y,setRepeatedElementFn:z},setPlasmicRootNode:m,registerRenderErrorListener:y,setRepeatedElementFn:z},J)),exports.DataContext=x,exports.DataCtxReader=T,exports.DataProvider=j,exports.PageParamsProvider=O,exports.PlasmicCanvasContext=d,exports.PlasmicCanvasHost=h,exports.applySelector=C,exports.mkMetaName=P,exports.mkMetaValue=E,exports.registerComponent=A,exports.registerGlobalContext=V,exports.registerTrait=L,exports.repeatedElement=U,exports.unstable_registerFetcher=F,exports.useDataEnv=S,exports.usePlasmicCanvasContext=f,exports.useSelector=w,exports.useSelectors=R; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-dom");function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=globalThis;null==l.__PlasmicHostVersion&&(l.__PlasmicHostVersion="2");var s=[],u=new function(e){var t=this;this.value=null,this.set=function(e){t.value=e,s.forEach((function(e){return e()}))},this.get=function(){return t.value}}(null);function c(){return function(e,t){if(void 0===t&&(t=""),null==e)throw t=(function(e){return"string"==typeof e}(t)?t:t())||"",new Error("Value must not be undefined or null"+(t?"- "+t:""));return e}(new URL("https://fakeurl/"+location.hash.replace(/#/,"?")).searchParams.get("origin"),"Missing information from Plasmic window.")}var p=0;function m(e){p++,u.set(e)}var d=t.createContext(!1),f=function(){return t.useContext(d)};function v(){var e,r,a,o=!!window.parent,i=!(null==(e=location.hash)||!e.match(/\bcanvas=true\b/)),l=!(null==(r=location.hash)||!r.match(/\blive=true\b/))||!o,m=o&&!document.querySelector("#plasmic-studio-tag")&&!i&&!l,f=(a=t.useState(0)[1],t.useCallback((function(){a((function(e){return e+1}))}),[]));if(t.useLayoutEffect((function(){return s.push(f),function(){var e=s.indexOf(f);e>=0&&s.splice(e,1)}}),[f]),t.useEffect((function(){var e,t;m&&o&&window.parent!==window&&(e=document.createElement("script"),t=c(),e.src=t+"/static/js/studio.js",document.body.appendChild(e))}),[m,o]),t.useEffect((function(){if(!m&&!document.querySelector("#getlibs")&&l){var e=document.createElement("script");e.id="getlibs",e.src=c()+"/static/js/getlibs.js",e.async=!1,e.onload=function(){null==window.__GetlibsReadyResolver||window.__GetlibsReadyResolver()},document.head.append(e)}}),[m]),!o)return null;if(i||l){var v,h=document.querySelector("#plasmic-app.__wab_user-body");h||((h=document.createElement("div")).id="plasmic-app",h.classList.add("__wab_user-body"),document.body.appendChild(h));var g=new URLSearchParams(location.hash),y=!!i&&{componentName:g.get("componentName"),globalVariants:JSON.parse(null!=(v=g.get("globalVariants"))?v:"{}")};return n.createPortal(t.createElement(b,{key:""+p},t.createElement(d.Provider,{value:y},u.get())),h,"plasmic-app")}return m&&window.parent===window?t.createElement("iframe",{src:"https://docs.plasmic.app/app-content/app-host-ready#appHostUrl="+encodeURIComponent(location.href),style:{width:"100vw",height:"100vh",border:"none",position:"fixed",top:0,left:0,zIndex:99999999}}):null}var h=function(e){var r=e.enableWebpackHmr,n=t.useState(null),a=n[0],o=n[1];return t.useEffect((function(){o(t.createElement(v,null))}),[]),t.createElement(t.Fragment,null,!r&&t.createElement(_,null),a)},g=[];function y(e){return g.push(e),function(){var t=g.indexOf(e);t>=0&&g.splice(t,1)}}var b=function(e){var r,n;function a(t){var r;return(r=e.call(this,t)||this).state={},r}n=e,(r=a).prototype=Object.create(n.prototype),r.prototype.constructor=r,o(r,n),a.getDerivedStateFromError=function(e){return{error:e}};var i=a.prototype;return i.componentDidCatch=function(e){g.forEach((function(t){return t(e)}))},i.render=function(){return this.state.error?t.createElement("div",null,"Error: ",""+this.state.error.message):t.createElement(t.Fragment,null,this.props.children)},a}(t.Component);function _(){return null}var x=t.createContext(void 0);function P(e){return"__plasmic_meta_"+e}function E(e){return e}function C(e,t){if(t){for(var r,n=e,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,void 0):void 0}}(e))){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t.split("."));!(r=a()).done;){var o;n=null==(o=n)?void 0:o[r.value]}return n}}function w(e){return C(S(),e)}function R(e){void 0===e&&(e={});var t=S();return Object.fromEntries(Object.entries(e).filter((function(e){return!!e[0]&&!!e[1]})).map((function(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t}(e[0],C(t,e[1]))})))}function S(){return t.useContext(x)}function j(e){var t,n,o=e.name,i=e.data,l=e.hidden,s=e.label,u=e.children,c=null!=(t=S())?t:{};return o?r.createElement(x.Provider,{value:a({},c,(n={},n[o]=i,n[P(o)]={hidden:l,label:s},n))},u):r.createElement(r.Fragment,null,u)}function O(e){var t=e.children,n=e.params,o=void 0===n?{}:n,i=e.query,l=void 0===i?{}:i,s=S()||{};return r.createElement(j,{name:"params",data:a({},s.params,o),label:"Page route params"},r.createElement(j,{name:"query",data:a({},s.query,l),label:"Page query params"},t))}function T(e){return(0,e.children)(S())}var D=globalThis;function F(e,t){D.__PlasmicFetcherRegistry.push({fetcher:e,meta:t})}D.__PlasmicFetcherRegistry=[];var q=globalThis;function A(e,t){q.__PlasmicComponentRegistry.push({component:e,meta:t})}null==q.__PlasmicComponentRegistry&&(q.__PlasmicComponentRegistry=[]);var M=globalThis;function V(e,t){M.__PlasmicContextRegistry.push({component:e,meta:t})}null==M.__PlasmicContextRegistry&&(M.__PlasmicContextRegistry=[]);var k,N,H=globalThis;function L(e,t){H.__PlasmicTraitRegistry.push({trait:e,meta:t})}function U(e,t){return I(e,t)}null==H.__PlasmicTraitRegistry&&(H.__PlasmicTraitRegistry=[]);var I=function(e,r){return Array.isArray(r)?r.map((function(t){return I(e,t)})):r&&t.isValidElement(r)&&"string"!=typeof r?t.cloneElement(r):r},G=globalThis,z=null!=(k=null==G||null==(N=G.__Sub)?void 0:N.setRepeatedElementFn)?k:function(e){I=e},J={__proto__:null,PlasmicCanvasContext:d,PlasmicCanvasHost:h,usePlasmicCanvasContext:f,unstable_registerFetcher:F,registerComponent:A,registerGlobalContext:V,registerTrait:L,repeatedElement:U,DataContext:x,mkMetaName:P,mkMetaValue:E,applySelector:C,useSelector:w,useSelectors:R,useDataEnv:S,DataProvider:j,PageParamsProvider:O,DataCtxReader:T},W=globalThis;null==W.__Sub&&(W.__Sub=a({React:t,ReactDOM:n,hostModule:J,hostVersion:"1.0.75",hostUtils:{setPlasmicRootNode:m,registerRenderErrorListener:y,setRepeatedElementFn:z},setPlasmicRootNode:m,registerRenderErrorListener:y,setRepeatedElementFn:z},J)),exports.DataContext=x,exports.DataCtxReader=T,exports.DataProvider=j,exports.PageParamsProvider=O,exports.PlasmicCanvasContext=d,exports.PlasmicCanvasHost=h,exports.applySelector=C,exports.mkMetaName=P,exports.mkMetaValue=E,exports.registerComponent=A,exports.registerGlobalContext=V,exports.registerTrait=L,exports.repeatedElement=U,exports.unstable_registerFetcher=F,exports.useDataEnv=S,exports.usePlasmicCanvasContext=f,exports.useSelector=w,exports.useSelectors=R; | ||
//# sourceMappingURL=host.cjs.production.min.js.map |
@@ -522,3 +522,3 @@ import * as React from 'react'; | ||
var hostVersion = "1.0.74"; | ||
var hostVersion = "1.0.75"; | ||
@@ -525,0 +525,0 @@ var root$6 = globalThis; |
@@ -62,3 +62,11 @@ /// <reference types="react" /> | ||
onSearch?: ContextDependentConfig<P, ((value: string) => void) | undefined>; | ||
} | { | ||
}) & StringTypeBase<P>); | ||
export declare type BooleanType<P> = "boolean" | ({ | ||
type: "boolean"; | ||
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>); | ||
declare type GraphQLValue = { | ||
query: string; | ||
variables?: Record<string, any>; | ||
}; | ||
export declare type GraphQLType<P> = { | ||
type: "code"; | ||
@@ -69,7 +77,3 @@ lang: "graphql"; | ||
headers?: object | ContextDependentConfig<P, object>; | ||
variables?: object | ContextDependentConfig<P, object>; | ||
}) & StringTypeBase<P>); | ||
export declare type BooleanType<P> = "boolean" | ({ | ||
type: "boolean"; | ||
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>; | ||
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & { | ||
@@ -187,3 +191,3 @@ type: "number"; | ||
export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase); | ||
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P>> | SlotType<P>; | ||
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P>> | SlotType<P>; | ||
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>; | ||
@@ -190,0 +194,0 @@ export interface ActionProps<P> { |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.74"; | ||
export declare const hostVersion = "1.0.75"; |
{ | ||
"name": "@plasmicapp/host", | ||
"version": "1.0.74", | ||
"version": "1.0.75", | ||
"description": "plasmic library for app hosting", | ||
@@ -58,3 +58,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "4b8fe21276748ffdcc767f050c20fc54b5a12dc0" | ||
"gitHead": "2f21b922bd4d8ce516640d8a4a8d9a942ed798a6" | ||
} |
@@ -62,3 +62,11 @@ /// <reference types="react" /> | ||
onSearch?: ContextDependentConfig<P, ((value: string) => void) | undefined>; | ||
} | { | ||
}) & StringTypeBase<P>); | ||
export declare type BooleanType<P> = "boolean" | ({ | ||
type: "boolean"; | ||
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>); | ||
declare type GraphQLValue = { | ||
query: string; | ||
variables?: Record<string, any>; | ||
}; | ||
export declare type GraphQLType<P> = { | ||
type: "code"; | ||
@@ -69,7 +77,3 @@ lang: "graphql"; | ||
headers?: object | ContextDependentConfig<P, object>; | ||
variables?: object | ContextDependentConfig<P, object>; | ||
}) & StringTypeBase<P>); | ||
export declare type BooleanType<P> = "boolean" | ({ | ||
type: "boolean"; | ||
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>; | ||
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & { | ||
@@ -187,3 +191,3 @@ type: "number"; | ||
export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase); | ||
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P>> | SlotType<P>; | ||
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P>> | SlotType<P>; | ||
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>; | ||
@@ -190,0 +194,0 @@ export interface ActionProps<P> { |
@@ -62,3 +62,11 @@ /// <reference types="react" /> | ||
onSearch?: ContextDependentConfig<P, ((value: string) => void) | undefined>; | ||
} | { | ||
}) & StringTypeBase<P>); | ||
export declare type BooleanType<P> = "boolean" | ({ | ||
type: "boolean"; | ||
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>); | ||
declare type GraphQLValue = { | ||
query: string; | ||
variables?: Record<string, any>; | ||
}; | ||
export declare type GraphQLType<P> = { | ||
type: "code"; | ||
@@ -69,7 +77,3 @@ lang: "graphql"; | ||
headers?: object | ContextDependentConfig<P, object>; | ||
variables?: object | ContextDependentConfig<P, object>; | ||
}) & StringTypeBase<P>); | ||
export declare type BooleanType<P> = "boolean" | ({ | ||
type: "boolean"; | ||
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>; | ||
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & { | ||
@@ -187,3 +191,3 @@ type: "number"; | ||
export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase); | ||
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P>> | SlotType<P>; | ||
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P>> | SlotType<P>; | ||
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>; | ||
@@ -190,0 +194,0 @@ export interface ActionProps<P> { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
278612
2709