@plasmicapp/react-web 0.2.117 → 0.2.119

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 CHANGED
@@ -1,5 +1,151 @@
1
1
  import * as React from 'react';
2
- import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
2
+ import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key as Key$1, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
3
+
4
+ declare type FetcherResponse<Data = unknown> = Data | Promise<Data>;
5
+ declare type BareFetcher<Data = unknown> = (...args: any[]) => FetcherResponse<Data>;
6
+ declare type Fetcher$1<Data = unknown, SWRKey extends Key = Key> = SWRKey extends () => readonly [...infer Args] | null | undefined | false ? (...args: [...Args]) => FetcherResponse<Data> : SWRKey extends readonly [...infer Args] ? (...args: [...Args]) => FetcherResponse<Data> : SWRKey extends () => infer Arg | null | undefined | false ? (...args: [Arg]) => FetcherResponse<Data> : SWRKey extends null | undefined | false ? never : SWRKey extends infer Arg ? (...args: [Arg]) => FetcherResponse<Data> : never;
7
+ interface InternalConfiguration {
8
+ cache: Cache;
9
+ mutate: ScopedMutator;
10
+ }
11
+ interface PublicConfiguration<Data = any, Error = any, Fn extends Fetcher$1 = BareFetcher> {
12
+ errorRetryInterval: number;
13
+ errorRetryCount?: number;
14
+ loadingTimeout: number;
15
+ focusThrottleInterval: number;
16
+ dedupingInterval: number;
17
+ refreshInterval?: number | ((latestData: Data | undefined) => number);
18
+ refreshWhenHidden?: boolean;
19
+ refreshWhenOffline?: boolean;
20
+ revalidateOnFocus: boolean;
21
+ revalidateOnReconnect: boolean;
22
+ revalidateOnMount?: boolean;
23
+ revalidateIfStale: boolean;
24
+ shouldRetryOnError: boolean | ((err: Error) => boolean);
25
+ suspense?: boolean;
26
+ fallbackData?: Data;
27
+ fetcher?: Fn;
28
+ use?: Middleware[];
29
+ fallback: {
30
+ [key: string]: any;
31
+ };
32
+ isPaused: () => boolean;
33
+ onLoadingSlow: (key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>) => void;
34
+ onSuccess: (data: Data, key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>) => void;
35
+ onError: (err: Error, key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>) => void;
36
+ onErrorRetry: (err: Error, key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>, revalidate: Revalidator, revalidateOpts: Required<RevalidatorOptions>) => void;
37
+ onDiscarded: (key: string) => void;
38
+ compare: (a: Data | undefined, b: Data | undefined) => boolean;
39
+ isOnline: () => boolean;
40
+ isVisible: () => boolean;
41
+ }
42
+ declare type FullConfiguration = InternalConfiguration & PublicConfiguration;
43
+ interface SWRHook {
44
+ <Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey): SWRResponse<Data, Error>;
45
+ <Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey, fetcher: Fetcher$1<Data, SWRKey> | null): SWRResponse<Data, Error>;
46
+ <Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey, config: SWRConfiguration<Data, Error, Fetcher$1<Data, SWRKey>> | undefined): SWRResponse<Data, Error>;
47
+ <Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey, fetcher: Fetcher$1<Data, SWRKey> | null, config: SWRConfiguration<Data, Error, Fetcher$1<Data, SWRKey>> | undefined): SWRResponse<Data, Error>;
48
+ <Data = any, Error = any>(key: Key): SWRResponse<Data, Error>;
49
+ <Data = any, Error = any>(key: Key, fetcher: BareFetcher<Data> | null): SWRResponse<Data, Error>;
50
+ <Data = any, Error = any>(key: Key, config: SWRConfiguration<Data, Error, BareFetcher<Data>> | undefined): SWRResponse<Data, Error>;
51
+ <Data = any, Error = any>(key: Key, fetcher: BareFetcher<Data> | null, config: SWRConfiguration<Data, Error, BareFetcher<Data>> | undefined): SWRResponse<Data, Error>;
52
+ }
53
+ declare type Middleware = (useSWRNext: SWRHook) => <Data = any, Error = any>(key: Key, fetcher: BareFetcher<Data> | null, config: SWRConfiguration<Data, Error, BareFetcher<Data>>) => SWRResponse<Data, Error>;
54
+ declare type ArgumentsTuple = [any, ...unknown[]] | readonly [any, ...unknown[]];
55
+ declare type Arguments = string | ArgumentsTuple | Record<any, any> | null | undefined | false;
56
+ declare type Key = Arguments | (() => Arguments);
57
+ declare type MutatorCallback<Data = any> = (currentData?: Data) => Promise<undefined | Data> | undefined | Data;
58
+ declare type MutatorOptions<Data = any> = {
59
+ revalidate?: boolean;
60
+ populateCache?: boolean | ((result: any, currentData: Data) => Data);
61
+ optimisticData?: Data | ((currentData?: Data) => Data);
62
+ rollbackOnError?: boolean;
63
+ };
64
+ interface ScopedMutator<Data = any> {
65
+ /** This is used for bound mutator */
66
+ (key: Key, data?: Data | Promise<Data> | MutatorCallback<Data>, opts?: boolean | MutatorOptions<Data>): Promise<Data | undefined>;
67
+ /** This is used for global mutator */
68
+ <T = any>(key: Key, data?: T | Promise<T> | MutatorCallback<T>, opts?: boolean | MutatorOptions<Data>): Promise<T | undefined>;
69
+ }
70
+ declare type KeyedMutator<Data> = (data?: Data | Promise<Data> | MutatorCallback<Data>, opts?: boolean | MutatorOptions<Data>) => Promise<Data | undefined>;
71
+ declare type SWRConfiguration<Data = any, Error = any, Fn extends BareFetcher<any> = BareFetcher<any>> = Partial<PublicConfiguration<Data, Error, Fn>>;
72
+ interface SWRResponse<Data = any, Error = any> {
73
+ data?: Data;
74
+ error?: Error;
75
+ mutate: KeyedMutator<Data>;
76
+ isValidating: boolean;
77
+ }
78
+ interface RevalidatorOptions {
79
+ retryCount?: number;
80
+ dedupe?: boolean;
81
+ }
82
+ declare type Revalidator = (revalidateOpts?: RevalidatorOptions) => Promise<boolean> | void;
83
+ interface Cache<Data = any> {
84
+ get(key: Key): Data | null | undefined;
85
+ set(key: Key, value: Data): void;
86
+ delete(key: Key): void;
87
+ }
88
+
89
+ declare function usePlasmicDataConfig(): FullConfiguration;
90
+
91
+ interface Pagination {
92
+ pageSize: number;
93
+ pageIndex: number;
94
+ }
95
+ interface DataSourceSchema {
96
+ tables: TableSchema[];
97
+ }
98
+ interface TableSchema {
99
+ id: string;
100
+ label?: string;
101
+ fields: TableFieldSchema[];
102
+ }
103
+ interface TableFieldSchema {
104
+ id: string;
105
+ label?: string;
106
+ type: TableFieldType;
107
+ }
108
+ declare type TableFieldType = 'text' | 'boolean' | 'number' | 'datetime' | 'unknown';
109
+ interface SingleRowResult<T = any> {
110
+ data: T;
111
+ schema?: TableSchema;
112
+ }
113
+ interface ManyRowsResult<T = any> {
114
+ data: T[];
115
+ total?: number;
116
+ schema?: TableSchema;
117
+ paginate?: Pagination;
118
+ }
119
+
120
+ interface DataOp {
121
+ sourceId: string;
122
+ opId: string;
123
+ userArgs?: Record<string, any>;
124
+ cacheKey?: string;
125
+ invalidatedKeys?: string[];
126
+ }
127
+ declare function executePlasmicDataOp<T = any>(op: DataOp, opts?: {
128
+ userAuthToken?: string;
129
+ includeSchema?: boolean;
130
+ paginate?: Pagination;
131
+ }): Promise<T>;
132
+
133
+ declare function Fetcher(props: {
134
+ dataOp?: DataOp;
135
+ name?: string;
136
+ children?: React__default.ReactNode;
137
+ includeSchema?: boolean;
138
+ pageIndex?: number;
139
+ pageSize?: number;
140
+ }): JSX.Element;
141
+
142
+ declare function usePlasmicDataOp<T = any, E = any>(dataOp: DataOp | undefined, opts?: {
143
+ includeSchema?: boolean;
144
+ paginate?: Pagination;
145
+ }): SWRResponse<T, E>;
146
+ declare function usePlasmicDataMutationOp<T = any>(dataOp: DataOp | undefined, opts?: {
147
+ includeSchema?: boolean;
148
+ }): () => Promise<T | undefined>;
3
149
 
4
150
  // LICENSE is MIT
5
151
  //
@@ -466,7 +612,7 @@ interface InputBase {
466
612
 
467
613
  type SelectionMode = 'none' | 'single' | 'multiple';
468
614
  type SelectionBehavior = 'toggle' | 'replace';
469
- type Selection = 'all' | Set<Key>;
615
+ type Selection = 'all' | Set<Key$1>;
470
616
 
471
617
  type FocusStrategy = 'first' | 'last';
472
618
  type DisabledBehavior = 'selection' | 'all';
@@ -493,32 +639,32 @@ interface Collection<T> extends Iterable<T> {
493
639
  readonly size: number,
494
640
 
495
641
  /** Iterate over all keys in the collection. */
496
- getKeys(): Iterable<Key>,
642
+ getKeys(): Iterable<Key$1>,
497
643
 
498
644
  /** Get an item by its key. */
499
- getItem(key: Key): T,
645
+ getItem(key: Key$1): T,
500
646
 
501
647
  /** Get an item by the index of its key. */
502
648
  at(idx: number): T,
503
649
 
504
650
  /** Get the key that comes before the given key in the collection. */
505
- getKeyBefore(key: Key): Key | null,
651
+ getKeyBefore(key: Key$1): Key$1 | null,
506
652
 
507
653
  /** Get the key that comes after the given key in the collection. */
508
- getKeyAfter(key: Key): Key | null,
654
+ getKeyAfter(key: Key$1): Key$1 | null,
509
655
 
510
656
  /** Get the first key in the collection. */
511
- getFirstKey(): Key | null,
657
+ getFirstKey(): Key$1 | null,
512
658
 
513
659
  /** Get the last key in the collection. */
514
- getLastKey(): Key | null
660
+ getLastKey(): Key$1 | null
515
661
  }
516
662
 
517
663
  interface Node<T> {
518
664
  /** The type of item this node represents. */
519
665
  type: string,
520
666
  /** A unique key for the node. */
521
- key: Key,
667
+ key: Key$1,
522
668
  /** The object value the node was created from. */
523
669
  value: T,
524
670
  /** The level of depth this node is at in the heirarchy. */
@@ -538,11 +684,11 @@ interface Node<T> {
538
684
  /** A function that should be called to wrap the rendered node. */
539
685
  wrapper?: (element: ReactElement) => ReactElement,
540
686
  /** The key of the parent node. */
541
- parentKey?: Key,
687
+ parentKey?: Key$1,
542
688
  /** The key of the node before this node. */
543
- prevKey?: Key,
689
+ prevKey?: Key$1,
544
690
  /** The key of the node after this node. */
545
- nextKey?: Key,
691
+ nextKey?: Key$1,
546
692
  /** Additional properties specific to a particular node type. */
547
693
  props?: any,
548
694
  /** @private */
@@ -1285,11 +1431,11 @@ interface FocusState {
1285
1431
  /** Sets whether the collection is focused. */
1286
1432
  setFocused(isFocused: boolean): void;
1287
1433
  /** The current focused key in the collection. */
1288
- readonly focusedKey: Key;
1434
+ readonly focusedKey: Key$1;
1289
1435
  /** Whether the first or last child of the focused key should receive focus. */
1290
1436
  readonly childFocusStrategy: FocusStrategy;
1291
1437
  /** Sets the focused key, and optionally, whether the first or last child of that key should receive focus. */
1292
- setFocusedKey(key: Key, child?: FocusStrategy): void;
1438
+ setFocusedKey(key: Key$1, child?: FocusStrategy): void;
1293
1439
  }
1294
1440
  interface MultipleSelectionState extends FocusState {
1295
1441
  /** The type of selection that is allowed in the collection. */
@@ -1305,7 +1451,7 @@ interface MultipleSelectionState extends FocusState {
1305
1451
  /** Sets the selected keys in the collection. */
1306
1452
  setSelectedKeys(keys: Selection): void;
1307
1453
  /** The currently disabled keys in the collection. */
1308
- readonly disabledKeys: Set<Key>;
1454
+ readonly disabledKeys: Set<Key$1>;
1309
1455
  /** Whether `disabledKeys` applies to selection, actions, or both. */
1310
1456
  readonly disabledBehavior: DisabledBehavior;
1311
1457
  }
@@ -1317,31 +1463,31 @@ interface MultipleSelectionManager extends FocusState {
1317
1463
  /** Whether the collection allows empty selection. */
1318
1464
  readonly disallowEmptySelection?: boolean;
1319
1465
  /** The currently selected keys in the collection. */
1320
- readonly selectedKeys: Set<Key>;
1466
+ readonly selectedKeys: Set<Key$1>;
1321
1467
  /** Whether the selection is empty. */
1322
1468
  readonly isEmpty: boolean;
1323
1469
  /** Whether all items in the collection are selected. */
1324
1470
  readonly isSelectAll: boolean;
1325
1471
  /** The first selected key in the collection. */
1326
- readonly firstSelectedKey: Key | null;
1472
+ readonly firstSelectedKey: Key$1 | null;
1327
1473
  /** The last selected key in the collection. */
1328
- readonly lastSelectedKey: Key | null;
1474
+ readonly lastSelectedKey: Key$1 | null;
1329
1475
  /** The currently disabled keys in the collection. */
1330
- readonly disabledKeys: Set<Key>;
1476
+ readonly disabledKeys: Set<Key$1>;
1331
1477
  /** Whether `disabledKeys` applies to selection, actions, or both. */
1332
1478
  readonly disabledBehavior: DisabledBehavior;
1333
1479
  /** Returns whether a key is selected. */
1334
- isSelected(key: Key): boolean;
1480
+ isSelected(key: Key$1): boolean;
1335
1481
  /** Returns whether the current selection is equal to the given selection. */
1336
- isSelectionEqual(selection: Set<Key>): boolean;
1482
+ isSelectionEqual(selection: Set<Key$1>): boolean;
1337
1483
  /** Extends the selection to the given key. */
1338
- extendSelection(toKey: Key): void;
1484
+ extendSelection(toKey: Key$1): void;
1339
1485
  /** Toggles whether the given key is selected. */
1340
- toggleSelection(key: Key): void;
1486
+ toggleSelection(key: Key$1): void;
1341
1487
  /** Replaces the selection with only the given key. */
1342
- replaceSelection(key: Key): void;
1488
+ replaceSelection(key: Key$1): void;
1343
1489
  /** Replaces the selection with the given keys. */
1344
- setSelectedKeys(keys: Iterable<Key>): void;
1490
+ setSelectedKeys(keys: Iterable<Key$1>): void;
1345
1491
  /** Selects all items in the collection. */
1346
1492
  selectAll(): void;
1347
1493
  /** Removes all keys from the selection. */
@@ -1352,11 +1498,11 @@ interface MultipleSelectionManager extends FocusState {
1352
1498
  * Toggles, replaces, or extends selection to the given key depending
1353
1499
  * on the pointer event and collection's selection mode.
1354
1500
  */
1355
- select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void;
1501
+ select(key: Key$1, e?: PressEvent | LongPressEvent | PointerEvent): void;
1356
1502
  /** Returns whether the given key can be selected. */
1357
- canSelectItem(key: Key): boolean;
1503
+ canSelectItem(key: Key$1): boolean;
1358
1504
  /** Returns whether the given key is non-interactive, i.e. both selection and actions are disabled. */
1359
- isDisabled(key: Key): boolean;
1505
+ isDisabled(key: Key$1): boolean;
1360
1506
  /** Sets the selection behavior for the collection. */
1361
1507
  setSelectionBehavior(selectionBehavior: SelectionBehavior): void;
1362
1508
  }
@@ -1395,17 +1541,17 @@ declare class SelectionManager implements MultipleSelectionManager {
1395
1541
  /**
1396
1542
  * The current focused key in the collection.
1397
1543
  */
1398
- get focusedKey(): Key;
1544
+ get focusedKey(): Key$1;
1399
1545
  /** Whether the first or last child of the focused key should receive focus. */
1400
1546
  get childFocusStrategy(): FocusStrategy;
1401
1547
  /**
1402
1548
  * Sets the focused key.
1403
1549
  */
1404
- setFocusedKey(key: Key, childFocusStrategy?: FocusStrategy): void;
1550
+ setFocusedKey(key: Key$1, childFocusStrategy?: FocusStrategy): void;
1405
1551
  /**
1406
1552
  * The currently selected keys in the collection.
1407
1553
  */
1408
- get selectedKeys(): Set<Key>;
1554
+ get selectedKeys(): Set<Key$1>;
1409
1555
  /**
1410
1556
  * The raw selection value for the collection.
1411
1557
  * Either 'all' for select all, or a set of keys.
@@ -1414,7 +1560,7 @@ declare class SelectionManager implements MultipleSelectionManager {
1414
1560
  /**
1415
1561
  * Returns whether a key is selected.
1416
1562
  */
1417
- isSelected(key: Key): boolean;
1563
+ isSelected(key: Key$1): boolean;
1418
1564
  /**
1419
1565
  * Whether the selection is empty.
1420
1566
  */
@@ -1423,26 +1569,26 @@ declare class SelectionManager implements MultipleSelectionManager {
1423
1569
  * Whether all items in the collection are selected.
1424
1570
  */
1425
1571
  get isSelectAll(): boolean;
1426
- get firstSelectedKey(): Key | null;
1427
- get lastSelectedKey(): Key | null;
1428
- get disabledKeys(): Set<Key>;
1572
+ get firstSelectedKey(): Key$1 | null;
1573
+ get lastSelectedKey(): Key$1 | null;
1574
+ get disabledKeys(): Set<Key$1>;
1429
1575
  get disabledBehavior(): DisabledBehavior;
1430
1576
  /**
1431
1577
  * Extends the selection to the given key.
1432
1578
  */
1433
- extendSelection(toKey: Key): void;
1579
+ extendSelection(toKey: Key$1): void;
1434
1580
  /**
1435
1581
  * Toggles whether the given key is selected.
1436
1582
  */
1437
- toggleSelection(key: Key): void;
1583
+ toggleSelection(key: Key$1): void;
1438
1584
  /**
1439
1585
  * Replaces the selection with only the given key.
1440
1586
  */
1441
- replaceSelection(key: Key): void;
1587
+ replaceSelection(key: Key$1): void;
1442
1588
  /**
1443
1589
  * Replaces the selection with the given keys.
1444
1590
  */
1445
- setSelectedKeys(keys: Iterable<Key>): void;
1591
+ setSelectedKeys(keys: Iterable<Key$1>): void;
1446
1592
  /**
1447
1593
  * Selects all items in the collection.
1448
1594
  */
@@ -1455,20 +1601,20 @@ declare class SelectionManager implements MultipleSelectionManager {
1455
1601
  * Toggles between select all and an empty selection.
1456
1602
  */
1457
1603
  toggleSelectAll(): void;
1458
- select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void;
1604
+ select(key: Key$1, e?: PressEvent | LongPressEvent | PointerEvent): void;
1459
1605
  /**
1460
1606
  * Returns whether the current selection is equal to the given selection.
1461
1607
  */
1462
- isSelectionEqual(selection: Set<Key>): boolean;
1463
- canSelectItem(key: Key): boolean;
1464
- isDisabled(key: Key): boolean;
1608
+ isSelectionEqual(selection: Set<Key$1>): boolean;
1609
+ canSelectItem(key: Key$1): boolean;
1610
+ isDisabled(key: Key$1): boolean;
1465
1611
  }
1466
1612
 
1467
1613
  interface ListState<T> {
1468
1614
  /** A collection of items in the list. */
1469
1615
  collection: Collection<Node<T>>;
1470
1616
  /** A set of items that are disabled. */
1471
- disabledKeys: Set<Key>;
1617
+ disabledKeys: Set<Key$1>;
1472
1618
  /** A selection manager to read and update multiple selection state. */
1473
1619
  selectionManager: SelectionManager;
1474
1620
  }
@@ -1637,4 +1783,4 @@ interface TriggeredOverlayContextValue {
1637
1783
  }
1638
1784
  declare const TriggeredOverlayContext: React.Context<TriggeredOverlayContextValue | undefined>;
1639
1785
 
1640
- 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, dlv as get, 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 };
1786
+ export { $State$1 as $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DataOp, DataSourceSchema, DropdownMenu, Fetcher, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, ManyRowsResult, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, Pagination, PlasmicDataSourceContextProvider, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, SingleRowResult, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TableFieldSchema, TableFieldType, TableSchema, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, executePlasmicDataOp, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, dlv as get, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCanvasDollarState, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, usePlasmicDataConfig, usePlasmicDataMutationOp, usePlasmicDataOp, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
@@ -0,0 +1 @@
1
+ export { DataOp, DataSourceSchema, executePlasmicDataOp, Fetcher, ManyRowsResult, Pagination, SingleRowResult, TableFieldSchema, TableFieldType, TableSchema, usePlasmicDataConfig, usePlasmicDataMutationOp, usePlasmicDataOp, } from "@plasmicapp/data-sources";
@@ -1,5 +1,4 @@
1
1
  import _classNames from "classnames";
2
- export declare const classNames: typeof _classNames;
3
2
  export { omit, pick } from "./common";
4
3
  export { HTMLElementRefOf, StrictProps } from "./react-utils";
5
4
  export { createPlasmicElementProxy, deriveRenderOpts, Flex, hasVariant, makeFragment, mergeVariantsWithStates, MultiChoiceArg, SingleBooleanChoiceArg, SingleChoiceArg, wrapWithClassName, } from "./render/elements";
@@ -16,3 +15,4 @@ export { genTranslatableString, Trans } from "./render/translation";
16
15
  export { useTrigger } from "./render/triggers";
17
16
  export * from "./states/helpers";
18
17
  export { $State, default as useDollarState, useCanvasDollarState, } from "./states/valtio";
18
+ export declare const classNames: typeof _classNames;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./data-sources";
1
2
  export * from "./index-common";
2
3
  export * from "./plume/button";
3
4
  export * from "./plume/checkbox";
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
+ var dataSources = require('@plasmicapp/data-sources');
7
8
  var classNames$1 = _interopDefault(require('classnames'));
8
9
  var _get = _interopDefault(require('dlv'));
9
10
  var React = require('react');
@@ -3729,6 +3730,36 @@ function useTriggeredOverlay(plasmicClass, props, config, outerRef, isDismissabl
3729
3730
  };
3730
3731
  }
3731
3732
 
3733
+ Object.defineProperty(exports, 'Fetcher', {
3734
+ enumerable: true,
3735
+ get: function () {
3736
+ return dataSources.Fetcher;
3737
+ }
3738
+ });
3739
+ Object.defineProperty(exports, 'executePlasmicDataOp', {
3740
+ enumerable: true,
3741
+ get: function () {
3742
+ return dataSources.executePlasmicDataOp;
3743
+ }
3744
+ });
3745
+ Object.defineProperty(exports, 'usePlasmicDataConfig', {
3746
+ enumerable: true,
3747
+ get: function () {
3748
+ return dataSources.usePlasmicDataConfig;
3749
+ }
3750
+ });
3751
+ Object.defineProperty(exports, 'usePlasmicDataMutationOp', {
3752
+ enumerable: true,
3753
+ get: function () {
3754
+ return dataSources.usePlasmicDataMutationOp;
3755
+ }
3756
+ });
3757
+ Object.defineProperty(exports, 'usePlasmicDataOp', {
3758
+ enumerable: true,
3759
+ get: function () {
3760
+ return dataSources.usePlasmicDataOp;
3761
+ }
3762
+ });
3732
3763
  exports.get = _get;
3733
3764
  Object.defineProperty(exports, 'PlasmicDataSourceContextProvider', {
3734
3765
  enumerable: true,