@plasmicapp/react-web 0.2.362 → 0.2.364

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.362",
3
+ "version": "0.2.364",
4
4
  "description": "plasmic library for rendering in the presentational style",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
@@ -101,7 +101,7 @@
101
101
  "@plasmicapp/data-sources-context": "0.1.21",
102
102
  "@plasmicapp/host": "1.0.209",
103
103
  "@plasmicapp/loader-splits": "1.0.62",
104
- "@plasmicapp/nextjs-app-router": "1.0.14",
104
+ "@plasmicapp/nextjs-app-router": "1.0.15",
105
105
  "@plasmicapp/prepass": "1.0.19",
106
106
  "@plasmicapp/query": "0.1.79",
107
107
  "@react-aria/checkbox": "^3.14.2",
@@ -168,5 +168,5 @@
168
168
  "react": ">=16.8.0",
169
169
  "react-dom": ">=16.8.0"
170
170
  },
171
- "gitHead": "a68b0dbe021bc38f355643251cf4150d949f92c6"
171
+ "gitHead": "0996f36da377a273109025757b2392f7c75c1f26"
172
172
  }
@@ -21,7 +21,7 @@ export type PlasmicClass<V extends Record<string, any>, A extends Record<string,
21
21
  variants?: V;
22
22
  args?: A;
23
23
  overrides?: O;
24
- }): React.ReactElement | null;
24
+ }): React.ReactNode;
25
25
  internalVariantProps: (keyof V)[];
26
26
  internalArgProps: (keyof A)[];
27
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plume-utils-9472dfe6.js","sources":["../../src/plume/plume-utils.ts"],"sourcesContent":["import * as React from \"react\";\nimport { groupBy, mapValues } from \"../common\";\nimport { SingleChoiceArg } from \"../render/elements\";\n\nexport let PLUME_STRICT_MODE = true;\n\nexport function setPlumeStrictMode(mode: boolean) {\n PLUME_STRICT_MODE = mode;\n}\n\ntype VariantArgChoices<T> = T extends (infer M)[]\n ? M\n : T extends SingleChoiceArg<infer M>\n ? M\n : never;\ntype VariantArgsChoices<V> = { [k in keyof V]-?: VariantArgChoices<V[k]> };\ntype DictValues<V extends Record<string, any>> = V[keyof V];\ntype DictTuples<V extends Record<string, any>> = DictValues<\n { [K in keyof V]: [K, V[K]] }\n>;\nexport type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;\n\ntype DistributeTuple<T> = T extends [infer T1, infer T2]\n ? { group: T1; variant: T2 }\n : never;\n\nexport type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;\n\nexport type PlasmicClass<\n V extends Record<string, any>,\n A extends Record<string, any>,\n O extends Record<string, any>\n> = {\n (props: { variants?: V; args?: A; overrides?: O }): React.ReactElement | null;\n internalVariantProps: (keyof V)[];\n internalArgProps: (keyof A)[];\n};\n\nexport type AnyPlasmicClass = PlasmicClass<any, any, any>;\n\nexport type PlasmicClassVariants<\n C extends AnyPlasmicClass\n> = C extends PlasmicClass<infer V, any, any> ? V : unknown;\nexport type PlasmicClassArgs<\n C extends AnyPlasmicClass\n> = C extends PlasmicClass<any, infer A, any> ? A : unknown;\nexport type PlasmicClassOverrides<\n C extends AnyPlasmicClass\n> = C extends PlasmicClass<any, any, infer O> ? O : unknown;\n\ntype BooleanLike = boolean | undefined | null;\n\nexport function mergeVariantToggles<V>(\n ...toggles: { def?: VariantDef<V>; active: BooleanLike }[]\n) {\n const definedToggles = toggles.filter((x) => !!x.def) as {\n def: VariantDef<V>;\n active: BooleanLike;\n }[];\n const grouped = groupBy(definedToggles, ({ def }) => def.group as string);\n return mapValues(grouped, (subToggles) => {\n return Object.fromEntries(\n subToggles.map(({ def, active }) => [def.variant, !!active])\n );\n });\n}\n\nexport function noOutline() {\n return { outline: \"none\" };\n}\n\nexport function getPlumeType(child: React.ReactChild): string | undefined {\n if (!React.isValidElement(child)) {\n return undefined;\n }\n const childType = child.type as any;\n return (childType.__plumeType || childType.getPlumeType?.(child.props)) as\n | string\n | undefined;\n}\n"],"names":[],"mappings":";;;AAIO,I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AAQ,SAAS,CAAC,WAAW,KAAI,MAAA,SAAS,CAAC,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,SAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAA,EAExD;AAChB;;;;"}
1
+ {"version":3,"file":"plume-utils-9472dfe6.js","sources":["../../src/plume/plume-utils.ts"],"sourcesContent":["import * as React from \"react\";\nimport { groupBy, mapValues } from \"../common\";\nimport { SingleChoiceArg } from \"../render/elements\";\n\nexport let PLUME_STRICT_MODE = true;\n\nexport function setPlumeStrictMode(mode: boolean) {\n PLUME_STRICT_MODE = mode;\n}\n\ntype VariantArgChoices<T> = T extends (infer M)[]\n ? M\n : T extends SingleChoiceArg<infer M>\n ? M\n : never;\ntype VariantArgsChoices<V> = { [k in keyof V]-?: VariantArgChoices<V[k]> };\ntype DictValues<V extends Record<string, any>> = V[keyof V];\ntype DictTuples<V extends Record<string, any>> = DictValues<\n { [K in keyof V]: [K, V[K]] }\n>;\nexport type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;\n\ntype DistributeTuple<T> = T extends [infer T1, infer T2]\n ? { group: T1; variant: T2 }\n : never;\n\nexport type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;\n\nexport type PlasmicClass<\n V extends Record<string, any>,\n A extends Record<string, any>,\n O extends Record<string, any>\n> = {\n (props: { variants?: V; args?: A; overrides?: O }): React.ReactNode;\n internalVariantProps: (keyof V)[];\n internalArgProps: (keyof A)[];\n};\n\nexport type AnyPlasmicClass = PlasmicClass<any, any, any>;\n\nexport type PlasmicClassVariants<\n C extends AnyPlasmicClass\n> = C extends PlasmicClass<infer V, any, any> ? V : unknown;\nexport type PlasmicClassArgs<\n C extends AnyPlasmicClass\n> = C extends PlasmicClass<any, infer A, any> ? A : unknown;\nexport type PlasmicClassOverrides<\n C extends AnyPlasmicClass\n> = C extends PlasmicClass<any, any, infer O> ? O : unknown;\n\ntype BooleanLike = boolean | undefined | null;\n\nexport function mergeVariantToggles<V>(\n ...toggles: { def?: VariantDef<V>; active: BooleanLike }[]\n) {\n const definedToggles = toggles.filter((x) => !!x.def) as {\n def: VariantDef<V>;\n active: BooleanLike;\n }[];\n const grouped = groupBy(definedToggles, ({ def }) => def.group as string);\n return mapValues(grouped, (subToggles) => {\n return Object.fromEntries(\n subToggles.map(({ def, active }) => [def.variant, !!active])\n );\n });\n}\n\nexport function noOutline() {\n return { outline: \"none\" };\n}\n\nexport function getPlumeType(child: React.ReactChild): string | undefined {\n if (!React.isValidElement(child)) {\n return undefined;\n }\n const childType = child.type as any;\n return (childType.__plumeType || childType.getPlumeType?.(child.props)) as\n | string\n | undefined;\n}\n"],"names":[],"mappings":";;;AAIO,IAAI,iBAAiB,GAAG,KAAK;SAgDpB,mBAAmB,GAAA;IACjC,IAA0D,OAAA,GAAA,EAAA,CAAA;SAA1D,IAA0D,EAAA,GAAA,CAAA,EAA1D,EAA0D,GAAA,SAAA,CAAA,MAAA,EAA1D,EAA0D,EAAA,EAAA;QAA1D,OAA0D,CAAA,EAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA,CAAA;;AAE1D,IAAA,IAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,UAAC,CAAC,EAAA,EAAK,OAAA,CAAC,CAAC,CAAC,CAAC,GAAG,CAAP,EAAO,CAGjD,CAAC;AACJ,IAAA,IAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,UAAC,EAAO,EAAA;AAAL,QAAA,IAAA,GAAG,GAAA,EAAA,CAAA,GAAA,CAAA;QAAO,OAAA,GAAG,CAAC,KAAe,CAAA;AAAnB,KAAmB,CAAC,CAAC;AAC1E,IAAA,OAAO,SAAS,CAAC,OAAO,EAAE,UAAC,UAAU,EAAA;QACnC,OAAO,MAAM,CAAC,WAAW,CACvB,UAAU,CAAC,GAAG,CAAC,UAAC,EAAe,EAAA;gBAAb,GAAG,GAAA,EAAA,CAAA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