@plasmicapp/react-web 0.2.112 → 0.2.113
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/LICENSE.md +21 -0
- package/dist/all.d.ts +36 -16
- package/dist/common.d.ts +3 -3
- package/dist/index-common.d.ts +3 -2
- package/dist/react-web.cjs.development.js +52 -31
- 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 +41 -31
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/ssr.d.ts +1 -0
- package/package.json +4 -3
- package/skinny/dist/{collection-utils-57c273dc.js → collection-utils-43f97262.js} +14 -13
- package/skinny/dist/collection-utils-43f97262.js.map +1 -0
- package/skinny/dist/{common-182a0b0c.js → common-9ebe374e.js} +1 -1
- package/skinny/dist/common-9ebe374e.js.map +1 -0
- package/skinny/dist/common.d.ts +3 -3
- package/skinny/dist/index-common.d.ts +3 -2
- package/skinny/dist/index.js +40 -42
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/button/index.js +7 -7
- package/skinny/dist/plume/button/index.js.map +1 -1
- package/skinny/dist/plume/checkbox/index.js +17 -17
- package/skinny/dist/plume/checkbox/index.js.map +1 -1
- package/skinny/dist/plume/menu/index.js +38 -39
- package/skinny/dist/plume/menu/index.js.map +1 -1
- package/skinny/dist/plume/menu-button/index.js +22 -22
- package/skinny/dist/plume/menu-button/index.js.map +1 -1
- package/skinny/dist/plume/select/index.js +41 -43
- package/skinny/dist/plume/select/index.js.map +1 -1
- package/skinny/dist/plume/switch/index.js +16 -16
- package/skinny/dist/plume/switch/index.js.map +1 -1
- package/skinny/dist/plume/text-input/index.js +10 -10
- package/skinny/dist/plume/text-input/index.js.map +1 -1
- package/skinny/dist/plume/triggered-overlay/index.js +14 -14
- package/skinny/dist/plume/triggered-overlay/index.js.map +1 -1
- package/skinny/dist/{plume-utils-d2476af1.js → plume-utils-d9811bf3.js} +2 -2
- package/skinny/dist/{plume-utils-27cd384f.js.map → plume-utils-d9811bf3.js.map} +1 -1
- package/skinny/dist/{props-utils-cac0cccf.js → props-utils-228208e6.js} +2 -2
- package/skinny/dist/{props-utils-7c02c0a8.js.map → props-utils-228208e6.js.map} +1 -1
- package/skinny/dist/{react-utils-35cb2a4e.js → react-utils-7bc53870.js} +6 -6
- package/skinny/dist/{react-utils-35cb2a4e.js.map → react-utils-7bc53870.js.map} +1 -1
- package/skinny/dist/render/PlasmicHead/index.js +6 -6
- package/skinny/dist/render/PlasmicImg/index.js +27 -27
- package/skinny/dist/render/PlasmicImg/index.js.map +1 -1
- package/skinny/dist/render/ssr.d.ts +1 -0
- package/skinny/dist/{ssr-d3321868.js → ssr-b16a1854.js} +10 -9
- package/skinny/dist/ssr-b16a1854.js.map +1 -0
- package/skinny/dist/collection-utils-2745acd4.js +0 -238
- package/skinny/dist/collection-utils-2745acd4.js.map +0 -1
- package/skinny/dist/collection-utils-42de4441.js +0 -244
- package/skinny/dist/collection-utils-42de4441.js.map +0 -1
- package/skinny/dist/collection-utils-57c273dc.js.map +0 -1
- package/skinny/dist/collection-utils-bf37b8fb.js +0 -238
- package/skinny/dist/collection-utils-bf37b8fb.js.map +0 -1
- package/skinny/dist/common-182a0b0c.js.map +0 -1
- package/skinny/dist/common-98719219.js +0 -68
- package/skinny/dist/common-98719219.js.map +0 -1
- package/skinny/dist/common-9efbae57.js +0 -201
- package/skinny/dist/common-9efbae57.js.map +0 -1
- package/skinny/dist/context-4ca6f5cd.js +0 -6
- package/skinny/dist/context-4ca6f5cd.js.map +0 -1
- package/skinny/dist/plume-utils-1e225de5.js +0 -25
- package/skinny/dist/plume-utils-1e225de5.js.map +0 -1
- package/skinny/dist/plume-utils-27cd384f.js +0 -35
- package/skinny/dist/plume-utils-623b91cc.js +0 -35
- package/skinny/dist/plume-utils-623b91cc.js.map +0 -1
- package/skinny/dist/plume-utils-d2476af1.js.map +0 -1
- package/skinny/dist/props-utils-7c02c0a8.js +0 -8
- package/skinny/dist/props-utils-b2ad4997.js +0 -8
- package/skinny/dist/props-utils-b2ad4997.js.map +0 -1
- package/skinny/dist/props-utils-c60d3105.js +0 -8
- package/skinny/dist/props-utils-c60d3105.js.map +0 -1
- package/skinny/dist/props-utils-cac0cccf.js.map +0 -1
- package/skinny/dist/react-utils-6050fadc.js +0 -201
- package/skinny/dist/react-utils-6050fadc.js.map +0 -1
- package/skinny/dist/react-utils-7c01e440.js +0 -172
- package/skinny/dist/react-utils-7c01e440.js.map +0 -1
- package/skinny/dist/react-utils-b5dc6320.js +0 -155
- package/skinny/dist/react-utils-b5dc6320.js.map +0 -1
- package/skinny/dist/render/PlasmicHead.d.ts +0 -35
- package/skinny/dist/ssr-68913b60.js +0 -107
- package/skinny/dist/ssr-68913b60.js.map +0 -1
- package/skinny/dist/ssr-9ebd98ed.js +0 -158
- package/skinny/dist/ssr-9ebd98ed.js.map +0 -1
- package/skinny/dist/ssr-d3321868.js.map +0 -1
- package/skinny/dist/ssr-f4053cdd.js +0 -110
- package/skinny/dist/ssr-f4053cdd.js.map +0 -1
- package/skinny/dist/ssr-fbf922f6.js +0 -108
- package/skinny/dist/ssr-fbf922f6.js.map +0 -1
- package/skinny/dist/states/valtio copy.d.ts +0 -15
- package/skinny/dist/stories/UseDollarState.test.d.ts +0 -11
- package/skinny/dist/stories/UseDollarState2.stories.d.ts +0 -7
- package/skinny/dist/tslib.es6-d26ffe68.js +0 -132
- package/skinny/dist/tslib.es6-d26ffe68.js.map +0 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Plasmic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/dist/all.d.ts
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
4
|
+
// LICENSE is MIT
|
|
5
|
+
//
|
|
6
|
+
// Copyright (c) 2018
|
|
7
|
+
// Dave Keen <http://www.keendevelopment.ch>
|
|
8
|
+
// Adi Dahiya <https://github.com/adidahiya>
|
|
9
|
+
// Jason Killian <https://github.com/JKillian>
|
|
10
|
+
// Sean Kelley <https://github.com/seansfkelley>
|
|
11
|
+
// Michal Adamczyk <https://github.com/mradamczyk>
|
|
12
|
+
// Marvin Hagemeister <https://github.com/marvinhagemeister>
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean;
|
|
13
|
-
|
|
14
|
-
type ClassNamesFn = (...classes: ClassValue[]) => string;
|
|
14
|
+
type Value = string | number | boolean | undefined | null;
|
|
15
|
+
type Mapping = { [key: string]: any };
|
|
16
|
+
type Argument = Value | Mapping | Argument[];
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
declare function classNames$1(...args: Argument[]): string;
|
|
17
19
|
|
|
18
|
-
declare function pick<T>(obj: T, ...keys: (string | number | symbol)[]): Partial<T>;
|
|
19
|
-
declare function omit<T>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
20
|
+
declare function pick<T extends {}>(obj: T, ...keys: (string | number | symbol)[]): Partial<T>;
|
|
21
|
+
declare function omit<T extends {}>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
20
22
|
|
|
21
23
|
declare type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
|
|
22
24
|
declare type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React__default.ComponentProps<T>["ref"], string>;
|
|
@@ -265,6 +267,23 @@ declare function genTranslatableString(elt: React__default.ReactNode): {
|
|
|
265
267
|
};
|
|
266
268
|
declare function Trans({ children }: TransProps): React__default.ReactNode;
|
|
267
269
|
|
|
270
|
+
interface PlasmicDataSourceContextValue {
|
|
271
|
+
userAuthToken?: string;
|
|
272
|
+
user?: {
|
|
273
|
+
userId: string;
|
|
274
|
+
email: string;
|
|
275
|
+
roles: string[];
|
|
276
|
+
properties: Record<string, unknown> | null;
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
declare function useCurrentUser(): {
|
|
280
|
+
userId: string;
|
|
281
|
+
email: string;
|
|
282
|
+
roles: string[];
|
|
283
|
+
properties: Record<string, unknown> | null;
|
|
284
|
+
} | undefined;
|
|
285
|
+
declare const PlasmicDataSourceContextProvider: React__default.Provider<PlasmicDataSourceContextValue | undefined>;
|
|
286
|
+
|
|
268
287
|
interface PlasmicRootProviderProps {
|
|
269
288
|
platform?: "nextjs" | "gatsby";
|
|
270
289
|
children?: React.ReactNode;
|
|
@@ -395,7 +414,8 @@ interface DOMAttributes<T = FocusableElement> extends AriaAttributes, DOMAttribu
|
|
|
395
414
|
id?: string | undefined,
|
|
396
415
|
role?: AriaRole | undefined,
|
|
397
416
|
tabIndex?: number | undefined,
|
|
398
|
-
style?: CSSProperties | undefined
|
|
417
|
+
style?: CSSProperties | undefined,
|
|
418
|
+
className?: string | undefined
|
|
399
419
|
}
|
|
400
420
|
|
|
401
421
|
/*
|
|
@@ -634,7 +654,7 @@ interface TriggerOpts {
|
|
|
634
654
|
*/
|
|
635
655
|
declare function useTrigger(trigger: TriggerType, opts: TriggerOpts): [boolean, React.HTMLAttributes<HTMLElement>];
|
|
636
656
|
|
|
637
|
-
declare const classNames:
|
|
657
|
+
declare const classNames: typeof classNames$1;
|
|
638
658
|
|
|
639
659
|
declare function setPlumeStrictMode(mode: boolean): void;
|
|
640
660
|
declare type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
|
|
@@ -1612,4 +1632,4 @@ declare function generateStateValueProp($state: $State, path: (string | number)[
|
|
|
1612
1632
|
*/
|
|
1613
1633
|
declare function set(obj: any, keys: any, val: any): void;
|
|
1614
1634
|
|
|
1615
|
-
export { $State$1 as $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, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, 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, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCanvasDollarState, useCheckbox, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
|
1635
|
+
export { $State$1 as $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, 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, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCanvasDollarState, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
package/dist/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function notNil<T>(x: T | undefined | null): x is T;
|
|
2
|
-
export declare function pick<T>(obj: T, ...keys: (string | number | symbol)[]): Partial<T>;
|
|
3
|
-
export declare function pickBy<T>(obj: T, func: (key: string, val: any) => boolean): Partial<T>;
|
|
4
|
-
export declare function omit<T>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
2
|
+
export declare function pick<T extends {}>(obj: T, ...keys: (string | number | symbol)[]): Partial<T>;
|
|
3
|
+
export declare function pickBy<T extends {}>(obj: T, func: (key: string, val: any) => boolean): Partial<T>;
|
|
4
|
+
export declare function omit<T extends {}>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
5
5
|
export declare function isSubset<T>(a1: T[], a2: T[]): boolean;
|
|
6
6
|
export declare function chainSingleArgFuncs<A>(...funcs: ((arg: A) => A)[]): ((arg: A) => A) | undefined;
|
|
7
7
|
export declare function ensure<T>(x: T | null | undefined): T;
|
package/dist/index-common.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import _classNames from "classnames";
|
|
2
|
+
export declare const classNames: typeof _classNames;
|
|
2
3
|
export { omit, pick } from "./common";
|
|
3
4
|
export { HTMLElementRefOf, StrictProps } from "./react-utils";
|
|
4
5
|
export { createPlasmicElementProxy, deriveRenderOpts, Flex, hasVariant, makeFragment, mergeVariantsWithStates, MultiChoiceArg, SingleBooleanChoiceArg, SingleChoiceArg, wrapWithClassName, } from "./render/elements";
|
|
@@ -9,7 +10,7 @@ export { PlasmicImg } from "./render/PlasmicImg";
|
|
|
9
10
|
export { PlasmicLink } from "./render/PlasmicLink";
|
|
10
11
|
export { PlasmicSlot, renderPlasmicSlot } from "./render/PlasmicSlot";
|
|
11
12
|
export { createUseScreenVariants } from "./render/screen-variants";
|
|
12
|
-
export { PlasmicRootProvider, useIsSSR } from "./render/ssr";
|
|
13
|
+
export { PlasmicDataSourceContextProvider, PlasmicRootProvider, useCurrentUser, useIsSSR, } from "./render/ssr";
|
|
13
14
|
export { Stack } from "./render/Stack";
|
|
14
15
|
export { genTranslatableString, Trans } from "./render/translation";
|
|
15
16
|
export { useTrigger } from "./render/triggers";
|
|
@@ -82,28 +82,24 @@ function _arrayLikeToArray(arr, len) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
85
|
-
var it;
|
|
85
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
86
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
86
87
|
|
|
87
|
-
if (
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
done: true
|
|
94
|
-
};
|
|
95
|
-
return {
|
|
96
|
-
done: false,
|
|
97
|
-
value: o[i++]
|
|
98
|
-
};
|
|
88
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
89
|
+
if (it) o = it;
|
|
90
|
+
var i = 0;
|
|
91
|
+
return function () {
|
|
92
|
+
if (i >= o.length) return {
|
|
93
|
+
done: true
|
|
99
94
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
return {
|
|
96
|
+
done: false,
|
|
97
|
+
value: o[i++]
|
|
98
|
+
};
|
|
99
|
+
};
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
return it.next.bind(it);
|
|
102
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
107
103
|
}
|
|
108
104
|
|
|
109
105
|
function notNil(x) {
|
|
@@ -377,9 +373,13 @@ function getElementTypeName(element) {
|
|
|
377
373
|
}
|
|
378
374
|
}
|
|
379
375
|
|
|
376
|
+
var _excluded = ["children"],
|
|
377
|
+
_excluded2 = ["as", "hasGap"],
|
|
378
|
+
_excluded3 = ["hasGap"];
|
|
379
|
+
|
|
380
380
|
function renderStack(as, props, hasGap, ref) {
|
|
381
381
|
var children = props.children,
|
|
382
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
382
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
383
383
|
|
|
384
384
|
var wrappedChildren = wrapFlexContainerChildren(children, hasGap != null ? hasGap : false);
|
|
385
385
|
return createElementWithChildren(as, _extends({
|
|
@@ -390,7 +390,7 @@ function renderStack(as, props, hasGap, ref) {
|
|
|
390
390
|
function FlexStack_(props, outerRef) {
|
|
391
391
|
var as = props.as,
|
|
392
392
|
hasGap = props.hasGap,
|
|
393
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
393
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
394
394
|
|
|
395
395
|
return renderStack(as != null ? as : "div", rest, hasGap, outerRef);
|
|
396
396
|
}
|
|
@@ -400,7 +400,7 @@ var FlexStack = /*#__PURE__*/React.forwardRef(FlexStack_);
|
|
|
400
400
|
var makeStackImpl = function makeStackImpl(as) {
|
|
401
401
|
return React.forwardRef(function (props, ref) {
|
|
402
402
|
var hasGap = props.hasGap,
|
|
403
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
403
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded3);
|
|
404
404
|
|
|
405
405
|
return renderStack(as, rest, hasGap, ref);
|
|
406
406
|
});
|
|
@@ -906,13 +906,15 @@ var plasmicHeadMeta = {
|
|
|
906
906
|
}
|
|
907
907
|
};
|
|
908
908
|
|
|
909
|
+
var _excluded$1 = ["PlasmicIconType"];
|
|
909
910
|
function PlasmicIcon(props) {
|
|
910
911
|
var PlasmicIconType = props.PlasmicIconType,
|
|
911
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
912
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
912
913
|
|
|
913
914
|
return React.createElement(PlasmicIconType, Object.assign({}, rest));
|
|
914
915
|
}
|
|
915
916
|
|
|
917
|
+
var _excluded$2 = ["src", "className", "displayWidth", "displayHeight", "displayMinWidth", "displayMinHeight", "displayMaxWidth", "displayMaxHeight", "quality", "loader", "imgRef", "style", "loading"];
|
|
916
918
|
// TODO: make this configurable?
|
|
917
919
|
|
|
918
920
|
var IMG_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];
|
|
@@ -932,7 +934,7 @@ var PlasmicImg = /*#__PURE__*/React__default.forwardRef(function PlasmicImg(prop
|
|
|
932
934
|
imgRef = props.imgRef,
|
|
933
935
|
style = props.style,
|
|
934
936
|
loading = props.loading,
|
|
935
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
937
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2);
|
|
936
938
|
|
|
937
939
|
var imgProps = Object.assign({}, rest, {
|
|
938
940
|
// Default loading to "lazy" if not specified (which is different from the
|
|
@@ -1391,6 +1393,7 @@ function hasKey(v, key) {
|
|
|
1391
1393
|
return typeof v === "object" && v !== null && key in v;
|
|
1392
1394
|
}
|
|
1393
1395
|
|
|
1396
|
+
var _excluded$3 = ["as", "defaultContents", "value"];
|
|
1394
1397
|
function PlasmicSlot(props) {
|
|
1395
1398
|
return renderPlasmicSlot(props);
|
|
1396
1399
|
}
|
|
@@ -1398,7 +1401,7 @@ function renderPlasmicSlot(opts) {
|
|
|
1398
1401
|
var as = opts.as,
|
|
1399
1402
|
defaultContents = opts.defaultContents,
|
|
1400
1403
|
value = opts.value,
|
|
1401
|
-
rest = _objectWithoutPropertiesLoose(opts,
|
|
1404
|
+
rest = _objectWithoutPropertiesLoose(opts, _excluded$3);
|
|
1402
1405
|
|
|
1403
1406
|
var content = value === undefined ? defaultContents : value;
|
|
1404
1407
|
|
|
@@ -1550,7 +1553,8 @@ var PlasmicRootContext = /*#__PURE__*/React.createContext(undefined);
|
|
|
1550
1553
|
function PlasmicRootProvider(props) {
|
|
1551
1554
|
var platform = props.platform,
|
|
1552
1555
|
children = props.children,
|
|
1553
|
-
userAuthToken = props.userAuthToken
|
|
1556
|
+
userAuthToken = props.userAuthToken,
|
|
1557
|
+
user = props.user;
|
|
1554
1558
|
var context = React.useMemo(function () {
|
|
1555
1559
|
return {
|
|
1556
1560
|
platform: platform
|
|
@@ -1558,9 +1562,10 @@ function PlasmicRootProvider(props) {
|
|
|
1558
1562
|
}, [platform]);
|
|
1559
1563
|
var dataSourceContextValue = React.useMemo(function () {
|
|
1560
1564
|
return {
|
|
1561
|
-
userAuthToken: userAuthToken
|
|
1565
|
+
userAuthToken: userAuthToken,
|
|
1566
|
+
user: user
|
|
1562
1567
|
};
|
|
1563
|
-
}, [userAuthToken]);
|
|
1568
|
+
}, [userAuthToken, user]);
|
|
1564
1569
|
return React.createElement(PlasmicRootContext.Provider, {
|
|
1565
1570
|
value: context
|
|
1566
1571
|
}, React.createElement(ssr.SSRProvider, null, React.createElement(dataSourcesContext.PlasmicDataSourceContextProvider, {
|
|
@@ -1723,6 +1728,7 @@ function getPlumeType(child) {
|
|
|
1723
1728
|
return childType.__plumeType || (childType.getPlumeType == null ? void 0 : childType.getPlumeType(child.props));
|
|
1724
1729
|
}
|
|
1725
1730
|
|
|
1731
|
+
var _excluded$4 = ["link", "isDisabled", "startIcon", "endIcon", "showStartIcon", "showEndIcon", "children"];
|
|
1726
1732
|
function useButton(plasmicClass, props, config, ref) {
|
|
1727
1733
|
var _ref, _ref2, _extends2, _overrides;
|
|
1728
1734
|
|
|
@@ -1737,7 +1743,7 @@ function useButton(plasmicClass, props, config, ref) {
|
|
|
1737
1743
|
showStartIcon = props.showStartIcon,
|
|
1738
1744
|
showEndIcon = props.showEndIcon,
|
|
1739
1745
|
children = props.children,
|
|
1740
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
1746
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$4);
|
|
1741
1747
|
|
|
1742
1748
|
var variants = _extends({}, pick.apply(void 0, [props].concat(plasmicClass.internalVariantProps)), mergeVariantToggles({
|
|
1743
1749
|
def: config.showStartIconVariant,
|
|
@@ -2087,6 +2093,7 @@ var TriggeredOverlayContext = /*#__PURE__*/React.createContext(undefined);
|
|
|
2087
2093
|
|
|
2088
2094
|
var MenuContext = /*#__PURE__*/React.createContext(undefined);
|
|
2089
2095
|
|
|
2096
|
+
var _excluded$5 = ["children"];
|
|
2090
2097
|
var COLLECTION_OPTS = {
|
|
2091
2098
|
itemPlumeType: "menu-item",
|
|
2092
2099
|
sectionPlumeType: "menu-group"
|
|
@@ -2097,7 +2104,7 @@ var COLLECTION_OPTS = {
|
|
|
2097
2104
|
|
|
2098
2105
|
function asAriaMenuProps(props) {
|
|
2099
2106
|
var children = props.children,
|
|
2100
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
2107
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$5);
|
|
2101
2108
|
|
|
2102
2109
|
var _useDerivedItemsFromC = useDerivedItemsFromChildren(children, _extends({}, COLLECTION_OPTS, {
|
|
2103
2110
|
invalidChildError: "Can only use Menu.Item and Menu.Group as children to Menu",
|
|
@@ -2540,6 +2547,7 @@ function useMenuButton(plasmicClass, props, config, outerRef) {
|
|
|
2540
2547
|
|
|
2541
2548
|
var SelectContext = /*#__PURE__*/React.createContext(undefined);
|
|
2542
2549
|
|
|
2550
|
+
var _excluded$6 = ["value", "defaultValue", "children", "onChange", "placement", "menuMatchTriggerWidth", "menuWidth"];
|
|
2543
2551
|
var COLLECTION_OPTS$1 = {
|
|
2544
2552
|
itemPlumeType: "select-option",
|
|
2545
2553
|
sectionPlumeType: "select-option-group"
|
|
@@ -2585,7 +2593,7 @@ function useAriaSelectProps(props) {
|
|
|
2585
2593
|
defaultValue = props.defaultValue,
|
|
2586
2594
|
children = props.children,
|
|
2587
2595
|
onChange = props.onChange,
|
|
2588
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
2596
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$6);
|
|
2589
2597
|
|
|
2590
2598
|
var _useDerivedItemsFromC = useDerivedItemsFromChildren(children, _extends({}, COLLECTION_OPTS$1, {
|
|
2591
2599
|
invalidChildError: "Can only use Select.Option and Select.OptionGroup as children to Select",
|
|
@@ -3027,6 +3035,7 @@ function useSwitch(plasmicClass, props, config, ref) {
|
|
|
3027
3035
|
};
|
|
3028
3036
|
}
|
|
3029
3037
|
|
|
3038
|
+
var _excluded$7 = ["isDisabled", "startIcon", "endIcon", "showStartIcon", "showEndIcon", "className", "style", "inputClassName", "inputStyle"];
|
|
3030
3039
|
function useTextInput(plasmicClass, props, config, ref) {
|
|
3031
3040
|
var _ref, _ref2, _overrides;
|
|
3032
3041
|
|
|
@@ -3043,7 +3052,7 @@ function useTextInput(plasmicClass, props, config, ref) {
|
|
|
3043
3052
|
style = props.style,
|
|
3044
3053
|
inputClassName = props.inputClassName,
|
|
3045
3054
|
inputStyle = props.inputStyle,
|
|
3046
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
3055
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$7);
|
|
3047
3056
|
|
|
3048
3057
|
var rootRef = React.useRef(null);
|
|
3049
3058
|
var inputRef = React.useRef(null);
|
|
@@ -3705,6 +3714,18 @@ function useCanvasDollarState(specs, props) {
|
|
|
3705
3714
|
return $state;
|
|
3706
3715
|
}
|
|
3707
3716
|
|
|
3717
|
+
Object.defineProperty(exports, 'PlasmicDataSourceContextProvider', {
|
|
3718
|
+
enumerable: true,
|
|
3719
|
+
get: function () {
|
|
3720
|
+
return dataSourcesContext.PlasmicDataSourceContextProvider;
|
|
3721
|
+
}
|
|
3722
|
+
});
|
|
3723
|
+
Object.defineProperty(exports, 'useCurrentUser', {
|
|
3724
|
+
enumerable: true,
|
|
3725
|
+
get: function () {
|
|
3726
|
+
return dataSourcesContext.useCurrentUser;
|
|
3727
|
+
}
|
|
3728
|
+
});
|
|
3708
3729
|
exports.DropdownMenu = DropdownMenu;
|
|
3709
3730
|
exports.PlasmicHead = PlasmicHead;
|
|
3710
3731
|
exports.PlasmicIcon = PlasmicIcon;
|