@plasmicapp/react-web 0.2.356 → 0.2.358
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 +88 -86
- package/dist/index-common.d.ts +3 -2
- package/dist/index.cjs.js +15 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +16 -17
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/ssr.d.ts +1 -1
- package/dist/render/translation.d.ts +2 -10
- package/package.json +4 -4
- package/skinny/dist/index-common.d.ts +3 -2
- package/skinny/dist/index.js +7 -9
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/checkbox/index.js +1 -1
- package/skinny/dist/plume/menu/index.js +1 -1
- package/skinny/dist/plume/menu-button/index.js +1 -1
- package/skinny/dist/plume/select/index.js +1 -1
- package/skinny/dist/plume/switch/index.js +1 -1
- package/skinny/dist/render/ssr.d.ts +1 -1
- package/skinny/dist/render/translation.d.ts +2 -10
- package/skinny/dist/{ssr-64c8ab20.js → ssr-61d6e91a.js} +12 -11
- package/skinny/dist/ssr-61d6e91a.js.map +1 -0
- package/skinny/dist/ssr-64c8ab20.js.map +0 -1
package/dist/render/ssr.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlasmicDataSourceContextValue } from "@plasmicapp/data-sources-context";
|
|
2
|
+
import { PlasmicI18NContextValue, PlasmicTranslator } from "@plasmicapp/host";
|
|
2
3
|
import { useIsSSR as useAriaIsSSR } from "@react-aria/ssr";
|
|
3
4
|
import * as React from "react";
|
|
4
|
-
import { PlasmicI18NContextValue, PlasmicTranslator } from "./translation";
|
|
5
5
|
export { PlasmicDataSourceContextProvider, useCurrentUser, } from "@plasmicapp/data-sources-context";
|
|
6
6
|
export interface PlasmicRootContextValue {
|
|
7
7
|
platform?: "nextjs" | "gatsby";
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
+
import { PlasmicI18NContextValue, PlasmicTranslator, usePlasmicTranslator as useHostPlasmicTranslator } from "@plasmicapp/host";
|
|
1
2
|
import React from "react";
|
|
2
|
-
export type PlasmicTranslator = (str: string, opts?: {
|
|
3
|
-
components?: {
|
|
4
|
-
[key: string]: React.ReactElement;
|
|
5
|
-
};
|
|
6
|
-
}) => React.ReactNode;
|
|
7
|
-
export interface PlasmicI18NContextValue {
|
|
8
|
-
translator?: PlasmicTranslator;
|
|
9
|
-
tagPrefix?: string;
|
|
10
|
-
}
|
|
11
3
|
export declare const PlasmicTranslatorContext: React.Context<PlasmicI18NContextValue | PlasmicTranslator | undefined>;
|
|
4
|
+
export declare const usePlasmicTranslator: typeof useHostPlasmicTranslator;
|
|
12
5
|
export interface TransProps {
|
|
13
6
|
transKey?: string;
|
|
14
7
|
children?: React.ReactNode;
|
|
15
8
|
}
|
|
16
|
-
export declare function usePlasmicTranslator(): PlasmicTranslator | undefined;
|
|
17
9
|
export declare function genTranslatableString(elt: React.ReactNode, opts?: {
|
|
18
10
|
tagPrefix?: string;
|
|
19
11
|
}): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/react-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.358",
|
|
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",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@plasmicapp/auth-react": "0.0.22",
|
|
100
|
-
"@plasmicapp/data-sources": "0.1.
|
|
100
|
+
"@plasmicapp/data-sources": "0.1.167",
|
|
101
101
|
"@plasmicapp/data-sources-context": "0.1.21",
|
|
102
|
-
"@plasmicapp/host": "1.0.
|
|
102
|
+
"@plasmicapp/host": "1.0.208",
|
|
103
103
|
"@plasmicapp/loader-splits": "1.0.62",
|
|
104
104
|
"@plasmicapp/nextjs-app-router": "1.0.14",
|
|
105
105
|
"@plasmicapp/prepass": "1.0.19",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"react": ">=16.8.0",
|
|
169
169
|
"react-dom": ">=16.8.0"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "90562f44f158b15245f72926fd82658a41d0bba2"
|
|
172
172
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export { PlasmicTranslator } from "@plasmicapp/host";
|
|
1
2
|
export { PlasmicPageGuard, withPlasmicPageGuard, } from "./auth/PlasmicPageGuard";
|
|
2
3
|
export { omit, pick } from "./common";
|
|
3
4
|
export { HTMLElementRefOf, StrictProps } from "./react-utils";
|
|
4
|
-
export {
|
|
5
|
+
export { Flex, MultiChoiceArg, SingleBooleanChoiceArg, SingleChoiceArg, createPlasmicElementProxy, deriveRenderOpts, hasVariant, makeFragment, mergeVariantsWithStates, wrapWithClassName, } from "./render/elements";
|
|
5
6
|
export { ensureGlobalVariants } from "./render/global-variants";
|
|
6
7
|
export { PlasmicHead, plasmicHeadMeta } from "./render/PlasmicHead";
|
|
7
8
|
export { PlasmicIcon } from "./render/PlasmicIcon";
|
|
@@ -11,7 +12,7 @@ export { PlasmicSlot, renderPlasmicSlot } from "./render/PlasmicSlot";
|
|
|
11
12
|
export { createUseScreenVariants } from "./render/screen-variants";
|
|
12
13
|
export { PlasmicDataSourceContextProvider, PlasmicRootProvider, useCurrentUser, useIsSSR, } from "./render/ssr";
|
|
13
14
|
export { Stack } from "./render/Stack";
|
|
14
|
-
export {
|
|
15
|
+
export { Trans, genTranslatableString, usePlasmicTranslator, } from "./render/translation";
|
|
15
16
|
export { useTrigger } from "./render/triggers";
|
|
16
17
|
export * from "./states";
|
|
17
18
|
export declare const classNames: any;
|
package/skinny/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@ export { default as get } from 'dlv';
|
|
|
10
10
|
import { c as createElementWithChildren, m as mergeProps, e as ensureNotArray, N as NONE, a as mergePropVals, i as isReactNode, b as isBrowser, u as useIsomorphicLayoutEffect$1 } from './react-utils-d266354d.js';
|
|
11
11
|
export { PlasmicHead, plasmicHeadMeta } from './render/PlasmicHead/index.js';
|
|
12
12
|
export { PlasmicImg } from './render/PlasmicImg/index.js';
|
|
13
|
-
import { T as Trans } from './ssr-
|
|
14
|
-
export { P as PlasmicLink, a as PlasmicRootProvider, g as genTranslatableString, u as useIsSSR, b as usePlasmicTranslator } from './ssr-
|
|
13
|
+
import { T as Trans } from './ssr-61d6e91a.js';
|
|
14
|
+
export { P as PlasmicLink, a as PlasmicRootProvider, g as genTranslatableString, u as useIsSSR, b as usePlasmicTranslator } from './ssr-61d6e91a.js';
|
|
15
15
|
import ReactDOM__default from 'react-dom';
|
|
16
16
|
import { useFocusRing } from '@react-aria/focus';
|
|
17
17
|
import { proxy, useSnapshot, ref, getVersion, subscribe } from 'valtio';
|
|
@@ -1018,7 +1018,7 @@ function subscribeToValtio($$state, statePath, node) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
1020
|
function initializeStateValue($$state, initialStateCell, proxyRoot) {
|
|
1021
|
-
var _a
|
|
1021
|
+
var _a;
|
|
1022
1022
|
var initialStateName = initialStateCell.node.getSpec().path;
|
|
1023
1023
|
var stateAccess = new Set();
|
|
1024
1024
|
$$state.stateInitializationEnv.visited.add(initialStateName);
|
|
@@ -1075,16 +1075,12 @@ function initializeStateValue($$state, initialStateCell, proxyRoot) {
|
|
|
1075
1075
|
: clonedValue;
|
|
1076
1076
|
set(proxyRoot, initialStateCell.path, value);
|
|
1077
1077
|
}
|
|
1078
|
-
catch (
|
|
1078
|
+
catch (_b) {
|
|
1079
1079
|
// Setting the state to undefined to make sure it gets re-initialized
|
|
1080
1080
|
// in case it changes values.
|
|
1081
1081
|
initialStateCell.initialValue = undefined;
|
|
1082
1082
|
set(proxyRoot, initialStateCell.path, undefined);
|
|
1083
1083
|
}
|
|
1084
|
-
//immediately fire onChange
|
|
1085
|
-
if (initialSpec.onChangeProp) {
|
|
1086
|
-
(_c = (_b = $$state.env.$props)[initialSpec.onChangeProp]) === null || _c === void 0 ? void 0 : _c.call(_b, initialValue);
|
|
1087
|
-
}
|
|
1088
1084
|
$$state.stateInitializationEnv.visited.delete(initialStateName);
|
|
1089
1085
|
$$state.stateInitializationEnv.stack.pop();
|
|
1090
1086
|
return initialValue;
|
|
@@ -1425,7 +1421,9 @@ function useDollarState(specs) {
|
|
|
1425
1421
|
var spec = node.getSpec();
|
|
1426
1422
|
if (!spec.isRepeated && spec.type !== "private" && spec.initFunc) {
|
|
1427
1423
|
var stateCell = getStateCellFrom$StateRoot($state, spec.pathObj);
|
|
1428
|
-
|
|
1424
|
+
if (stateCell.initialValue === UNINITIALIZED) {
|
|
1425
|
+
initializeStateValue($$state, stateCell, $state);
|
|
1426
|
+
}
|
|
1429
1427
|
}
|
|
1430
1428
|
});
|
|
1431
1429
|
}, []);
|