@plasmicapp/react-web 1.0.15 → 1.0.16

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.
Files changed (2) hide show
  1. package/dist/all.d.ts +148 -277
  2. package/package.json +11 -11
package/dist/all.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties as CSSProperties$1, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
4
+ import { AriaCheckboxProps } from '@react-types/checkbox';
5
+ import { AriaSwitchProps } from '@react-types/switch';
4
6
 
5
7
  declare global {
6
8
  interface Window {
@@ -13967,43 +13969,58 @@ declare function Trans({ transKey, children }: TransProps): React__default.React
13967
13969
 
13968
13970
 
13969
13971
 
13972
+ interface InputBase {
13973
+ /** Whether the input is disabled. */
13974
+ isDisabled?: boolean;
13975
+ /** Whether the input can be selected but not changed by the user. */
13976
+ isReadOnly?: boolean;
13977
+ }
13978
+
13979
+ /*
13980
+ * Copyright 2020 Adobe. All rights reserved.
13981
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13982
+ * you may not use this file except in compliance with the License. You may obtain a copy
13983
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
13984
+ *
13985
+ * Unless required by applicable law or agreed to in writing, software distributed under
13986
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13987
+ * OF ANY KIND, either express or implied. See the License for the specific language
13988
+ * governing permissions and limitations under the License.
13989
+ */
13990
+
13991
+
13992
+
13970
13993
  interface AriaLabelingProps {
13971
13994
  /**
13972
13995
  * Defines a string value that labels the current element.
13973
13996
  */
13974
- 'aria-label'?: string,
13997
+ 'aria-label'?: string;
13975
13998
 
13976
13999
  /**
13977
14000
  * Identifies the element (or elements) that labels the current element.
13978
14001
  */
13979
- 'aria-labelledby'?: string,
14002
+ 'aria-labelledby'?: string;
13980
14003
 
13981
14004
  /**
13982
14005
  * Identifies the element (or elements) that describes the object.
13983
14006
  */
13984
- 'aria-describedby'?: string,
13985
-
13986
- /**
13987
- * Identifies the element (or elements) that provide a detailed, extended description for the object.
13988
- */
13989
- 'aria-details'?: string
13990
- }
14007
+ 'aria-describedby'?: string;
13991
14008
 
13992
- interface AriaValidationProps {
13993
- // https://www.w3.org/TR/wai-aria-1.2/#aria-errormessage
13994
14009
  /**
13995
- * Identifies the element that provides an error message for the object.
14010
+ * Identifies the element (or elements) that provide a detailed, extended description for the
14011
+ * object.
13996
14012
  */
13997
- 'aria-errormessage'?: string
14013
+ 'aria-details'?: string;
13998
14014
  }
13999
14015
 
14000
14016
  // A set of common DOM props that are allowed on any component
14001
14017
  // Ensure this is synced with DOMPropNames in filterDOMProps
14002
14018
  interface DOMProps {
14003
14019
  /**
14004
- * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
14020
+ * The element's unique identifier. See
14021
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
14005
14022
  */
14006
- id?: string
14023
+ id?: string;
14007
14024
  }
14008
14025
 
14009
14026
  interface FocusableDOMProps extends DOMProps {
@@ -14013,14 +14030,7 @@ interface FocusableDOMProps extends DOMProps {
14013
14030
  * be avoided except in rare scenarios where an alternative means of accessing
14014
14031
  * the element or its functionality via the keyboard is available.
14015
14032
  */
14016
- excludeFromTabOrder?: boolean
14017
- }
14018
-
14019
- interface InputDOMProps {
14020
- /**
14021
- * The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).
14022
- */
14023
- name?: string
14033
+ excludeFromTabOrder?: boolean;
14024
14034
  }
14025
14035
 
14026
14036
  /** Any focusable element, including both HTML and SVG elements. */
@@ -14028,59 +14038,11 @@ interface FocusableElement extends Element, HTMLOrSVGElement {}
14028
14038
 
14029
14039
  /** All DOM attributes supported across both HTML and SVG elements. */
14030
14040
  interface DOMAttributes<T = FocusableElement> extends AriaAttributes, DOMAttributes$1<T> {
14031
- id?: string | undefined,
14032
- role?: AriaRole | undefined,
14033
- tabIndex?: number | undefined,
14034
- style?: CSSProperties$1 | undefined,
14035
- className?: string | undefined
14036
- }
14037
-
14038
- /*
14039
- * Copyright 2020 Adobe. All rights reserved.
14040
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14041
- * you may not use this file except in compliance with the License. You may obtain a copy
14042
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14043
- *
14044
- * Unless required by applicable law or agreed to in writing, software distributed under
14045
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
14046
- * OF ANY KIND, either express or implied. See the License for the specific language
14047
- * governing permissions and limitations under the License.
14048
- */
14049
-
14050
-
14051
-
14052
- type ValidationState = 'valid' | 'invalid';
14053
-
14054
- type ValidationError = string | string[];
14055
-
14056
- interface Validation<T = unknown> {
14057
- /** Whether user input is required on the input before form submission. */
14058
- isRequired?: boolean,
14059
- /** Whether the input value is invalid. */
14060
- isInvalid?: boolean,
14061
- /** @deprecated Use `isInvalid` instead. */
14062
- validationState?: ValidationState,
14063
- /**
14064
- * Whether to use native HTML form validation to prevent form submission
14065
- * when the value is missing or invalid, or mark the field as required
14066
- * or invalid via ARIA.
14067
- * @default 'aria'
14068
- */
14069
- validationBehavior?: 'aria' | 'native',
14070
- /**
14071
- * A function that returns an error message if a given value is invalid.
14072
- * Validation errors are displayed to the user when the form is submitted
14073
- * if `validationBehavior="native"`. For realtime validation, use the `isInvalid`
14074
- * prop instead.
14075
- */
14076
- validate?: (value: T) => ValidationError | true | null | undefined
14077
- }
14078
-
14079
- interface InputBase {
14080
- /** Whether the input is disabled. */
14081
- isDisabled?: boolean,
14082
- /** Whether the input can be selected but not changed by the user. */
14083
- isReadOnly?: boolean
14041
+ id?: string | undefined;
14042
+ role?: AriaRole | undefined;
14043
+ tabIndex?: number | undefined;
14044
+ style?: CSSProperties$1 | undefined;
14045
+ className?: string | undefined;
14084
14046
  }
14085
14047
 
14086
14048
  /*
@@ -14119,27 +14081,27 @@ type DisabledBehavior = 'selection' | 'all';
14119
14081
 
14120
14082
 
14121
14083
  interface Rect {
14122
- x: number,
14123
- y: number,
14124
- width: number,
14125
- height: number
14084
+ x: number;
14085
+ y: number;
14086
+ width: number;
14087
+ height: number;
14126
14088
  }
14127
14089
 
14128
14090
  interface Size {
14129
- width: number,
14130
- height: number
14091
+ width: number;
14092
+ height: number;
14131
14093
  }
14132
14094
 
14133
14095
  /** A LayoutDelegate provides layout information for collection items. */
14134
14096
  interface LayoutDelegate {
14135
14097
  /** Returns a rectangle for the item with the given key. */
14136
- getItemRect(key: Key): Rect | null,
14098
+ getItemRect(key: Key): Rect | null;
14137
14099
  /** Returns the visible rectangle of the collection. */
14138
- getVisibleRect(): Rect,
14100
+ getVisibleRect(): Rect;
14139
14101
  /** Returns the size of the scrollable content in the collection. */
14140
- getContentSize(): Size,
14102
+ getContentSize(): Size;
14141
14103
  /** Returns a list of keys between `from` and `to`. */
14142
- getKeyRange?(from: Key, to: Key): Key[]
14104
+ getKeyRange?(from: Key, to: Key): Key[];
14143
14105
  }
14144
14106
 
14145
14107
  /**
@@ -14148,77 +14110,82 @@ interface LayoutDelegate {
14148
14110
  */
14149
14111
  interface Collection<T> extends Iterable<T> {
14150
14112
  /** The number of items in the collection. */
14151
- readonly size: number,
14113
+ readonly size: number;
14152
14114
 
14153
14115
  /** Iterate over all keys in the collection. */
14154
- getKeys(): Iterable<Key>,
14116
+ getKeys(): Iterable<Key>;
14155
14117
 
14156
14118
  /** Get an item by its key. */
14157
- getItem(key: Key): T | null,
14119
+ getItem(key: Key): T | null;
14158
14120
 
14159
14121
  /** Get an item by the index of its key. */
14160
- at(idx: number): T | null,
14122
+ at(idx: number): T | null;
14161
14123
 
14162
14124
  /** Get the key that comes before the given key in the collection. */
14163
- getKeyBefore(key: Key): Key | null,
14125
+ getKeyBefore(key: Key): Key | null;
14164
14126
 
14165
14127
  /** Get the key that comes after the given key in the collection. */
14166
- getKeyAfter(key: Key): Key | null,
14128
+ getKeyAfter(key: Key): Key | null;
14167
14129
 
14168
14130
  /** Get the first key in the collection. */
14169
- getFirstKey(): Key | null,
14131
+ getFirstKey(): Key | null;
14170
14132
 
14171
14133
  /** Get the last key in the collection. */
14172
- getLastKey(): Key | null,
14134
+ getLastKey(): Key | null;
14173
14135
 
14174
14136
  /** Iterate over the child items of the given key. */
14175
- getChildren?(key: Key): Iterable<T>,
14137
+ getChildren?(key: Key): Iterable<T>;
14176
14138
 
14177
14139
  /** Returns a string representation of the item's contents. */
14178
- getTextValue?(key: Key): string,
14140
+ getTextValue?(key: Key): string;
14179
14141
 
14180
14142
  /** Filters the collection using the given function. */
14181
- UNSTABLE_filter?(filterFn: (nodeValue: string) => boolean): Collection<T>
14143
+ filter?(filterFn: (nodeValue: string, node: T) => boolean): Collection<T>;
14182
14144
  }
14183
14145
 
14184
14146
  interface Node<T> {
14185
14147
  /** The type of item this node represents. */
14186
- type: string,
14148
+ type: string;
14187
14149
  /** A unique key for the node. */
14188
- key: Key,
14150
+ key: Key;
14189
14151
  /** The object value the node was created from. */
14190
- value: T | null,
14152
+ value: T | null;
14191
14153
  /** The level of depth this node is at in the hierarchy. */
14192
- level: number,
14154
+ level: number;
14193
14155
  /** Whether this item has children, even if not loaded yet. */
14194
- hasChildNodes: boolean,
14156
+ hasChildNodes: boolean;
14195
14157
  /**
14196
14158
  * The loaded children of this node.
14159
+ *
14197
14160
  * @deprecated Use `collection.getChildren(node.key)` instead.
14198
14161
  */
14199
- childNodes: Iterable<Node<T>>,
14162
+ childNodes: Iterable<Node<T>>;
14200
14163
  /** The rendered contents of this node (e.g. JSX). */
14201
- rendered: ReactNode,
14164
+ rendered: ReactNode;
14202
14165
  /** A string value for this node, used for features like typeahead. */
14203
- textValue: string,
14166
+ textValue: string;
14204
14167
  /** An accessibility label for this node. */
14205
- 'aria-label'?: string,
14168
+ 'aria-label'?: string;
14206
14169
  /** The index of this node within its parent. */
14207
- index: number,
14170
+ index: number;
14208
14171
  /** A function that should be called to wrap the rendered node. */
14209
- wrapper?: (element: ReactElement) => ReactElement,
14172
+ wrapper?: (element: ReactElement) => ReactElement;
14210
14173
  /** The key of the parent node. */
14211
- parentKey?: Key | null,
14174
+ parentKey?: Key | null;
14212
14175
  /** The key of the node before this node. */
14213
- prevKey?: Key | null,
14176
+ prevKey?: Key | null;
14214
14177
  /** The key of the node after this node. */
14215
- nextKey?: Key | null,
14178
+ nextKey?: Key | null;
14179
+ /** The first child key of this node. */
14180
+ firstChildKey?: Key | null;
14181
+ /** The last child key of this node. */
14182
+ lastChildKey?: Key | null;
14216
14183
  /** Additional properties specific to a particular node type. */
14217
- props?: any,
14184
+ props?: any;
14218
14185
  /** @private */
14219
- shouldInvalidate?: (context: any) => boolean,
14186
+ shouldInvalidate?: (context: any) => boolean;
14220
14187
  /** A function that renders this node to a React Element in the DOM. */
14221
- render?: (node: Node<any>) => ReactElement
14188
+ render?: (node: Node<any>) => ReactElement;
14222
14189
  }
14223
14190
 
14224
14191
  /*
@@ -14240,10 +14207,12 @@ interface Node<T> {
14240
14207
  type BaseEvent<T extends SyntheticEvent> = T & {
14241
14208
  /**
14242
14209
  * Use continuePropagation.
14243
- * @deprecated */
14244
- stopPropagation(): void,
14245
- continuePropagation(): void
14246
- }
14210
+ *
14211
+ * @deprecated
14212
+ */
14213
+ stopPropagation(): void;
14214
+ continuePropagation(): void;
14215
+ };
14247
14216
 
14248
14217
  type KeyboardEvent = BaseEvent<KeyboardEvent$1<any>>;
14249
14218
 
@@ -14251,55 +14220,60 @@ type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';
14251
14220
 
14252
14221
  interface PressEvent {
14253
14222
  /** The type of press event being fired. */
14254
- type: 'pressstart' | 'pressend' | 'pressup' | 'press',
14223
+ type: 'pressstart' | 'pressend' | 'pressup' | 'press';
14255
14224
  /** The pointer type that triggered the press event. */
14256
- pointerType: PointerType,
14225
+ pointerType: PointerType;
14257
14226
  /** The target element of the press event. */
14258
- target: Element,
14227
+ target: Element;
14259
14228
  /** Whether the shift keyboard modifier was held during the press event. */
14260
- shiftKey: boolean,
14229
+ shiftKey: boolean;
14261
14230
  /** Whether the ctrl keyboard modifier was held during the press event. */
14262
- ctrlKey: boolean,
14231
+ ctrlKey: boolean;
14263
14232
  /** Whether the meta keyboard modifier was held during the press event. */
14264
- metaKey: boolean,
14233
+ metaKey: boolean;
14265
14234
  /** Whether the alt keyboard modifier was held during the press event. */
14266
- altKey: boolean,
14235
+ altKey: boolean;
14267
14236
  /** X position relative to the target. */
14268
- x: number,
14237
+ x: number;
14269
14238
  /** Y position relative to the target. */
14270
- y: number,
14239
+ y: number;
14240
+ /**
14241
+ * The key that triggered the press event, if it was triggered by a keyboard interaction.
14242
+ * This is useful for differentiating between Space and Enter key presses.
14243
+ */
14244
+ key?: string;
14271
14245
  /**
14272
14246
  * By default, press events stop propagation to parent elements.
14273
14247
  * In cases where a handler decides not to handle a specific event,
14274
14248
  * it can call `continuePropagation()` to allow a parent to handle it.
14275
14249
  */
14276
- continuePropagation(): void
14250
+ continuePropagation(): void;
14277
14251
  }
14278
14252
 
14279
14253
  interface LongPressEvent extends Omit<PressEvent, 'type' | 'continuePropagation'> {
14280
14254
  /** The type of long press event being fired. */
14281
- type: 'longpressstart' | 'longpressend' | 'longpress'
14255
+ type: 'longpressstart' | 'longpressend' | 'longpress';
14282
14256
  }
14283
14257
 
14284
14258
  interface KeyboardEvents {
14285
14259
  /** Handler that is called when a key is pressed. */
14286
- onKeyDown?: (e: KeyboardEvent) => void,
14260
+ onKeyDown?: (e: KeyboardEvent) => void;
14287
14261
  /** Handler that is called when a key is released. */
14288
- onKeyUp?: (e: KeyboardEvent) => void
14262
+ onKeyUp?: (e: KeyboardEvent) => void;
14289
14263
  }
14290
14264
 
14291
14265
  interface FocusEvents<Target = Element> {
14292
14266
  /** Handler that is called when the element receives focus. */
14293
- onFocus?: (e: FocusEvent<Target>) => void,
14267
+ onFocus?: (e: FocusEvent<Target>) => void;
14294
14268
  /** Handler that is called when the element loses focus. */
14295
- onBlur?: (e: FocusEvent<Target>) => void,
14269
+ onBlur?: (e: FocusEvent<Target>) => void;
14296
14270
  /** Handler that is called when the element's focus status changes. */
14297
- onFocusChange?: (isFocused: boolean) => void
14271
+ onFocusChange?: (isFocused: boolean) => void;
14298
14272
  }
14299
14273
 
14300
14274
  interface FocusableProps<Target = Element> extends FocusEvents<Target>, KeyboardEvents {
14301
14275
  /** Whether the element should receive focus on render. */
14302
- autoFocus?: boolean
14276
+ autoFocus?: boolean;
14303
14277
  }
14304
14278
 
14305
14279
  /*
@@ -14316,27 +14290,28 @@ interface FocusableProps<Target = Element> extends FocusEvents<Target>, Keyboard
14316
14290
 
14317
14291
  type Key = string | number;
14318
14292
 
14293
+ interface FocusRingAria {
14294
+ /** Whether the element is currently focused. */
14295
+ isFocused: boolean;
14296
+ /** Whether keyboard focus should be visible. */
14297
+ isFocusVisible: boolean;
14298
+ /** Props to apply to the container element with the focus ring. */
14299
+ focusProps: DOMAttributes;
14300
+ }
14301
+
14319
14302
  interface PressResult {
14320
14303
  /** Whether the target is currently pressed. */
14321
14304
  isPressed: boolean;
14322
14305
  /** Props to spread on the target element. */
14323
14306
  pressProps: DOMAttributes;
14324
14307
  }
14308
+
14325
14309
  interface HoverResult {
14326
14310
  /** Props to spread on the target element. */
14327
14311
  hoverProps: DOMAttributes;
14328
14312
  isHovered: boolean;
14329
14313
  }
14330
14314
 
14331
- interface FocusRingAria {
14332
- /** Whether the element is currently focused. */
14333
- isFocused: boolean;
14334
- /** Whether keyboard focus should be visible. */
14335
- isFocusVisible: boolean;
14336
- /** Props to apply to the container element with the focus ring. */
14337
- focusProps: DOMAttributes;
14338
- }
14339
-
14340
14315
  type FocusHookResult = [boolean, FocusRingAria["focusProps"]];
14341
14316
  type HoverHookResult = [boolean, HoverResult["hoverProps"]];
14342
14317
  type PressHookResult = [boolean, PressResult["pressProps"]];
@@ -14446,63 +14421,6 @@ declare function useButton<P extends PlumeButtonProps, C extends AnyPlasmicClass
14446
14421
  };
14447
14422
  };
14448
14423
 
14449
- /*
14450
- * Copyright 2020 Adobe. All rights reserved.
14451
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14452
- * you may not use this file except in compliance with the License. You may obtain a copy
14453
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14454
- *
14455
- * Unless required by applicable law or agreed to in writing, software distributed under
14456
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
14457
- * OF ANY KIND, either express or implied. See the License for the specific language
14458
- * governing permissions and limitations under the License.
14459
- */
14460
-
14461
-
14462
-
14463
- interface ToggleStateOptions extends InputBase {
14464
- /**
14465
- * Whether the element should be selected (uncontrolled).
14466
- */
14467
- defaultSelected?: boolean,
14468
- /**
14469
- * Whether the element should be selected (controlled).
14470
- */
14471
- isSelected?: boolean,
14472
- /**
14473
- * Handler that is called when the element's selection state changes.
14474
- */
14475
- onChange?: (isSelected: boolean) => void
14476
- }
14477
-
14478
- interface ToggleProps extends ToggleStateOptions, Validation<boolean>, FocusableProps {
14479
- /**
14480
- * The label for the element.
14481
- */
14482
- children?: ReactNode,
14483
- /**
14484
- * The value of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue).
14485
- */
14486
- value?: string
14487
- }
14488
-
14489
- interface AriaToggleProps extends ToggleProps, FocusableDOMProps, AriaLabelingProps, AriaValidationProps, InputDOMProps {
14490
- /**
14491
- * Identifies the element (or elements) whose contents or presence are controlled by the current element.
14492
- */
14493
- 'aria-controls'?: string
14494
- }
14495
-
14496
- interface CheckboxProps$1 extends ToggleProps {
14497
- /**
14498
- * Indeterminism is presentational only.
14499
- * The indeterminate visual representation remains regardless of user interaction.
14500
- */
14501
- isIndeterminate?: boolean
14502
- }
14503
-
14504
- interface AriaCheckboxProps extends CheckboxProps$1, AriaToggleProps {}
14505
-
14506
14424
  interface StyleProps {
14507
14425
  className?: string;
14508
14426
  style?: React$1.CSSProperties;
@@ -14743,24 +14661,20 @@ declare function useMenuItem<P extends BaseMenuItemProps, C extends AnyPlasmicCl
14743
14661
  };
14744
14662
  };
14745
14663
 
14746
- /*
14747
- * Copyright 2020 Adobe. All rights reserved.
14748
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14749
- * you may not use this file except in compliance with the License. You may obtain a copy
14750
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14751
- *
14752
- * Unless required by applicable law or agreed to in writing, software distributed under
14753
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
14754
- * OF ANY KIND, either express or implied. See the License for the specific language
14755
- * governing permissions and limitations under the License.
14756
- */
14757
-
14664
+ type Placement = 'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' | 'top' | 'top left' | 'top right' | 'top start' | 'top end' | 'left' | 'left top' | 'left bottom' | 'start' | 'start top' | 'start bottom' | 'right' | 'right top' | 'right bottom' | 'end' | 'end top' | 'end bottom';
14758
14665
 
14759
-
14760
- type Placement = 'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' |
14761
- 'top' | 'top left' | 'top right' | 'top start' | 'top end' |
14762
- 'left' | 'left top' | 'left bottom' | 'start' | 'start top' | 'start bottom' |
14763
- 'right' | 'right top' | 'right bottom' | 'end' | 'end top' | 'end bottom';
14666
+ interface OverlayTriggerState {
14667
+ /** Whether the overlay is currently open. */
14668
+ readonly isOpen: boolean;
14669
+ /** Sets whether the overlay is open. */
14670
+ setOpen(isOpen: boolean): void;
14671
+ /** Opens the overlay. */
14672
+ open(): void;
14673
+ /** Closes the overlay. */
14674
+ close(): void;
14675
+ /** Toggles the overlay's visibility. */
14676
+ toggle(): void;
14677
+ }
14764
14678
 
14765
14679
  interface DropdownMenuProps {
14766
14680
  /**
@@ -15013,7 +14927,10 @@ interface FocusState {
15013
14927
  readonly focusedKey: Key | null;
15014
14928
  /** Whether the first or last child of the focused key should receive focus. */
15015
14929
  readonly childFocusStrategy: FocusStrategy | null;
15016
- /** Sets the focused key, and optionally, whether the first or last child of that key should receive focus. */
14930
+ /**
14931
+ * Sets the focused key, and optionally, whether the first or last child of that key should
14932
+ * receive focus.
14933
+ */
15017
14934
  setFocusedKey(key: Key | null, child?: FocusStrategy): void;
15018
14935
  }
15019
14936
  interface MultipleSelectionState extends FocusState {
@@ -15091,15 +15008,22 @@ interface MultipleSelectionManager extends FocusState {
15091
15008
  /** The collection of nodes that the selection manager handles. */
15092
15009
  collection: Collection<Node<unknown>>;
15093
15010
  }
15011
+
15094
15012
  interface SelectionManagerOptions {
15095
15013
  allowsCellSelection?: boolean;
15096
15014
  layoutDelegate?: LayoutDelegate;
15015
+ fullCollection?: Collection<Node<unknown>>;
15097
15016
  }
15098
15017
  /**
15099
15018
  * An interface for reading and updating multiple selection state.
15100
15019
  */
15101
15020
  declare class SelectionManager implements MultipleSelectionManager {
15102
15021
  collection: Collection<Node<unknown>>;
15022
+ private state;
15023
+ private allowsCellSelection;
15024
+ private _isSelectAll;
15025
+ private layoutDelegate;
15026
+ private fullCollection;
15103
15027
  constructor(collection: Collection<Node<unknown>>, state: MultipleSelectionState, options?: SelectionManagerOptions);
15104
15028
  /**
15105
15029
  * The type of selection that is allowed in the collection.
@@ -15164,6 +15088,9 @@ declare class SelectionManager implements MultipleSelectionManager {
15164
15088
  * Extends the selection to the given key.
15165
15089
  */
15166
15090
  extendSelection(toKey: Key): void;
15091
+ private getKeyRange;
15092
+ private getKeyRangeInternal;
15093
+ private getKey;
15167
15094
  /**
15168
15095
  * Toggles whether the given key is selected.
15169
15096
  */
@@ -15176,6 +15103,7 @@ declare class SelectionManager implements MultipleSelectionManager {
15176
15103
  * Replaces the selection with the given keys.
15177
15104
  */
15178
15105
  setSelectedKeys(keys: Iterable<Key>): void;
15106
+ private getSelectAllKeys;
15179
15107
  /**
15180
15108
  * Selects all items in the collection.
15181
15109
  */
@@ -15194,6 +15122,7 @@ declare class SelectionManager implements MultipleSelectionManager {
15194
15122
  */
15195
15123
  isSelectionEqual(selection: Set<Key>): boolean;
15196
15124
  canSelectItem(key: Key): boolean;
15125
+ private canSelectItemIn;
15197
15126
  isDisabled(key: Key): boolean;
15198
15127
  isLink(key: Key): boolean;
15199
15128
  getItemProps(key: Key): any;
@@ -15211,51 +15140,6 @@ interface ListState<T> {
15211
15140
 
15212
15141
  declare const SelectContext: React$1.Context<ListState<any> | undefined>;
15213
15142
 
15214
- /*
15215
- * Copyright 2020 Adobe. All rights reserved.
15216
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
15217
- * you may not use this file except in compliance with the License. You may obtain a copy
15218
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
15219
- *
15220
- * Unless required by applicable law or agreed to in writing, software distributed under
15221
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
15222
- * OF ANY KIND, either express or implied. See the License for the specific language
15223
- * governing permissions and limitations under the License.
15224
- */
15225
-
15226
-
15227
-
15228
- interface SwitchBase extends InputBase, FocusableProps {
15229
- /**
15230
- * The content to render as the Switch's label.
15231
- */
15232
- children?: ReactNode,
15233
- /**
15234
- * Whether the Switch should be selected (uncontrolled).
15235
- */
15236
- defaultSelected?: boolean,
15237
- /**
15238
- * Whether the Switch should be selected (controlled).
15239
- */
15240
- isSelected?: boolean,
15241
- /**
15242
- * Handler that is called when the Switch's selection state changes.
15243
- */
15244
- onChange?: (isSelected: boolean) => void,
15245
- /**
15246
- * The value of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue).
15247
- */
15248
- value?: string
15249
- }
15250
- interface SwitchProps$1 extends SwitchBase {}
15251
- interface AriaSwitchBase extends SwitchBase, FocusableDOMProps, InputDOMProps, AriaLabelingProps {
15252
- /**
15253
- * Identifies the element (or elements) whose contents or presence are controlled by the current element.
15254
- */
15255
- 'aria-controls'?: string
15256
- }
15257
- interface AriaSwitchProps extends SwitchProps$1, AriaSwitchBase {}
15258
-
15259
15143
  type SwitchRef = React$1.Ref<SwitchRefValue>;
15260
15144
  interface SwitchRefValue extends SwitchState {
15261
15145
  getRoot: () => HTMLElement | null;
@@ -15349,19 +15233,6 @@ declare function useTriggeredOverlay<P extends BaseTriggeredOverlayProps, C exte
15349
15233
  };
15350
15234
  };
15351
15235
 
15352
- interface OverlayTriggerState {
15353
- /** Whether the overlay is currently open. */
15354
- readonly isOpen: boolean;
15355
- /** Sets whether the overlay is open. */
15356
- setOpen(isOpen: boolean): void;
15357
- /** Opens the overlay. */
15358
- open(): void;
15359
- /** Closes the overlay. */
15360
- close(): void;
15361
- /** Toggles the overlay's visibility. */
15362
- toggle(): void;
15363
- }
15364
-
15365
15236
  interface TriggeredOverlayContextValue {
15366
15237
  triggerRef: React$1.RefObject<HTMLElement>;
15367
15238
  state: OverlayTriggerState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
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",
@@ -75,7 +75,7 @@
75
75
  "scripts": {
76
76
  "build": "rollup -c && mkdir -p lib && cp src/styles/plasmic.css lib/",
77
77
  "clean": "rm -rf dist/ skinny/dist/ lib/host/*js lib/host/*.ts lib/host/*.map lib/data-sources/*js lib/data-sources/*.ts lib/data-sources/*.map lib/query/*js lib/query/*.ts lib/query/*.map lib/auth/*js lib/auth/*.ts lib/auth/*.map lib/splits/*js lib/splits/*.ts lib/splits/*.map",
78
- "test": "TEST_CWD=`pwd` yarn --cwd=../.. test",
78
+ "test": "TEST_CWD=`pwd` pnpm -w test",
79
79
  "lint": "eslint",
80
80
  "prepublishOnly": "npm run build",
81
81
  "size": "size-limit",
@@ -85,14 +85,14 @@
85
85
  "test-storybook": "test-storybook"
86
86
  },
87
87
  "dependencies": {
88
- "@plasmicapp/auth-react": "0.0.27",
89
- "@plasmicapp/data-sources": "1.0.14",
90
- "@plasmicapp/data-sources-context": "0.1.23",
91
- "@plasmicapp/host": "2.0.6",
92
- "@plasmicapp/loader-splits": "1.0.70",
93
- "@plasmicapp/nextjs-app-router": "1.0.23",
94
- "@plasmicapp/prepass": "1.0.24",
95
- "@plasmicapp/query": "0.1.84",
88
+ "@plasmicapp/auth-react": "0.0.28",
89
+ "@plasmicapp/data-sources": "1.0.15",
90
+ "@plasmicapp/data-sources-context": "0.1.24",
91
+ "@plasmicapp/host": "2.0.7",
92
+ "@plasmicapp/loader-splits": "1.0.71",
93
+ "@plasmicapp/nextjs-app-router": "1.0.24",
94
+ "@plasmicapp/prepass": "1.0.25",
95
+ "@plasmicapp/query": "0.1.85",
96
96
  "@react-aria/checkbox": "^3.15.5",
97
97
  "@react-aria/focus": "^3.20.3",
98
98
  "@react-aria/interactions": "^3.25.1",
@@ -142,5 +142,5 @@
142
142
  "react": ">=18.0.0",
143
143
  "react-dom": ">=18.0.0"
144
144
  },
145
- "gitHead": "da8b62e5312e2ba8e771e607aeb2f6c3ca5b73f1"
145
+ "gitHead": "6087f1621240c66b20d4a8fcf02c8bf889c554aa"
146
146
  }