@plasmicapp/react-web 0.2.138 → 0.2.139
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 +2 -1
- package/dist/react-web.cjs.development.js +10 -2
- package/dist/react-web.cjs.development.js.map +1 -1
- package/dist/react-web.cjs.production.min.js +1 -1
- package/dist/react-web.cjs.production.min.js.map +1 -1
- package/dist/react-web.esm.js +10 -3
- package/dist/react-web.esm.js.map +1 -1
- package/dist/states/helpers.d.ts +1 -0
- package/dist/states/index.d.ts +1 -1
- package/dist/states/types.d.ts +1 -0
- package/package.json +2 -2
- package/skinny/dist/index.js +10 -3
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/states/helpers.d.ts +1 -0
- package/skinny/dist/states/index.d.ts +1 -1
- package/skinny/dist/states/types.d.ts +1 -0
package/dist/all.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ declare function generateStateOnChangeProp($state: $State, stateName: string, da
|
|
|
74
74
|
* We need to pass `parent[index1][index2].counter to the child component
|
|
75
75
|
*/
|
|
76
76
|
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
77
|
+
declare function isPlasmicStateProxy(obj: any): any;
|
|
77
78
|
/**
|
|
78
79
|
* Forked from https://github.com/lukeed/dset
|
|
79
80
|
* Changes: fixed setting a deep value to a proxy object
|
|
@@ -1638,4 +1639,4 @@ interface TriggeredOverlayContextValue {
|
|
|
1638
1639
|
}
|
|
1639
1640
|
declare const TriggeredOverlayContext: React.Context<TriggeredOverlayContextValue | undefined>;
|
|
1640
1641
|
|
|
1641
|
-
export { $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicDataSourceContextProvider, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicPageGuard, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, dlv as get, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
|
1642
|
+
export { $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicDataSourceContextProvider, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicPageGuard, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, dlv as get, getDataProps, hasVariant, isPlasmicStateProxy, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
|
@@ -1508,6 +1508,9 @@ function useTrigger(trigger, opts) {
|
|
|
1508
1508
|
return TRIGGER_TO_HOOK[trigger](opts);
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
|
+
var ARRAY_SYMBOL = /*#__PURE__*/Symbol("[]");
|
|
1512
|
+
var PLASMIC_STATE_PROXY_SYMBOL = /*#__PURE__*/Symbol("plasmic.state.proxy");
|
|
1513
|
+
|
|
1511
1514
|
function generateStateOnChangeProp($state, stateName, dataReps) {
|
|
1512
1515
|
return function (val, path) {
|
|
1513
1516
|
return set($state, [stateName].concat(dataReps, path), val);
|
|
@@ -1524,6 +1527,9 @@ function generateStateValueProp($state, path // ["parent", 0, 1, "counter"]
|
|
|
1524
1527
|
return _get($state, path);
|
|
1525
1528
|
}
|
|
1526
1529
|
var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
1530
|
+
function isPlasmicStateProxy(obj) {
|
|
1531
|
+
return obj != null && typeof obj === "object" && obj[PLASMIC_STATE_PROXY_SYMBOL];
|
|
1532
|
+
}
|
|
1527
1533
|
function shallowEqual(a1, a2) {
|
|
1528
1534
|
if (a1.length !== a2.length) {
|
|
1529
1535
|
return false;
|
|
@@ -1594,8 +1600,6 @@ function assignValue(object, key, value) {
|
|
|
1594
1600
|
}
|
|
1595
1601
|
}
|
|
1596
1602
|
|
|
1597
|
-
var ARRAY_SYMBOL = /*#__PURE__*/Symbol("[]");
|
|
1598
|
-
|
|
1599
1603
|
var UNINITIALIZED = /*#__PURE__*/Symbol("plasmic.unitialized");
|
|
1600
1604
|
var StateSpecNode = /*#__PURE__*/function () {
|
|
1601
1605
|
function StateSpecNode(specs) {
|
|
@@ -1807,6 +1811,9 @@ function create$StateProxy($$state, leafHandlers) {
|
|
|
1807
1811
|
return Reflect.deleteProperty(target, property);
|
|
1808
1812
|
},
|
|
1809
1813
|
get: function get(target, property, receiver) {
|
|
1814
|
+
if (property === PLASMIC_STATE_PROXY_SYMBOL) {
|
|
1815
|
+
return true;
|
|
1816
|
+
}
|
|
1810
1817
|
proxyRoot = proxyRoot == null ? receiver : proxyRoot;
|
|
1811
1818
|
var nextPath = getNextPath(property);
|
|
1812
1819
|
if (isOutside || currNode.isLeaf()) {
|
|
@@ -3435,6 +3442,7 @@ exports.generateStateOnChangeProp = generateStateOnChangeProp;
|
|
|
3435
3442
|
exports.generateStateValueProp = generateStateValueProp;
|
|
3436
3443
|
exports.getDataProps = getDataProps;
|
|
3437
3444
|
exports.hasVariant = hasVariant;
|
|
3445
|
+
exports.isPlasmicStateProxy = isPlasmicStateProxy;
|
|
3438
3446
|
exports.makeFragment = makeFragment;
|
|
3439
3447
|
exports.mergeVariantsWithStates = mergeVariantsWithStates;
|
|
3440
3448
|
exports.omit = omit;
|