@feltmaps/js-sdk 1.7.0-next.15 → 1.7.0-next.17

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.
@@ -9670,245 +9670,7 @@ interface UIButtonElementCreateClonable extends MakeClonableSchema<UIButtonEleme
9670
9670
  interface UIButtonElementUpdate extends MakeUpdateSchema<UIButtonElement, UIButtonElementCreate> {
9671
9671
  }
9672
9672
 
9673
- declare const uiFlexibleSpaceElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9674
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9675
- id: ZodString;
9676
- }, "strip", ZodTypeAny, {
9677
- id: string;
9678
- }, {
9679
- id: string;
9680
- }>], ZodUnknown>, ZodVoid>>;
9681
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9682
- id: ZodString;
9683
- }, "strip", ZodTypeAny, {
9684
- id: string;
9685
- }, {
9686
- id: string;
9687
- }>], ZodUnknown>, ZodVoid>>;
9688
- }, {
9689
- id: ZodString;
9690
- }>, {
9691
- type: ZodLiteral<"FlexibleSpace">;
9692
- }>, "strip", ZodTypeAny, {
9693
- type: "FlexibleSpace";
9694
- id: string;
9695
- onCreate?: ((args_0: {
9696
- id: string;
9697
- }, ...args: unknown[]) => void) | undefined;
9698
- onDestroy?: ((args_0: {
9699
- id: string;
9700
- }, ...args: unknown[]) => void) | undefined;
9701
- }, {
9702
- type: "FlexibleSpace";
9703
- id: string;
9704
- onCreate?: ((args_0: {
9705
- id: string;
9706
- }, ...args: unknown[]) => void) | undefined;
9707
- onDestroy?: ((args_0: {
9708
- id: string;
9709
- }, ...args: unknown[]) => void) | undefined;
9710
- }>;
9711
- /**
9712
- * Represents a flexible space element in a container.
9713
- *
9714
- * When rendered...
9715
- *
9716
- * - inside {@link UIGridContainerElement}, it will add extra gap between items. It can be controlled by `grid` property.
9717
- * - inside {@link UIPanelElement} `body` or `footer`, since they work as vertically stacks, it will add extra gap between items.
9718
- * - inside {@link UIButtonGroupElement}, it will take the remaining space.
9719
- *
9720
- * @example
9721
- * Buttons with a flexible space between makes them more visually separated.
9722
- * ```typescript
9723
- * {
9724
- * type: "ButtonGroup",
9725
- * items: [
9726
- * { type: "Button", label: "Button 1", onClick: () => {} },
9727
- * { type: "FlexibleSpace" },
9728
- * { type: "Button", label: "Button 2", onClick: () => {} },
9729
- * ],
9730
- * }
9731
- * ```
9732
- *
9733
- * @example
9734
- * Paragraphs with a flexible space between makes them more visually separated.
9735
- * ```typescript
9736
- * {
9737
- * type: "Panel",
9738
- * body: [
9739
- * { type: "Paragraph", text: "Paragraph 1" },
9740
- * { type: "FlexibleSpace" },
9741
- * { type: "Paragraph", text: "Paragraph 2" },
9742
- * ],
9743
- * }
9744
- * ```
9745
- *
9746
- * @example
9747
- * Horizontal stack of buttons with a flexible space between makes them more visually separated.
9748
- * ```typescript
9749
- * {
9750
- * type: "Grid",
9751
- * grid: "auto-flow / auto 1fr auto",
9752
- * items: [
9753
- * { type: "Button", label: "Button 1", onClick: () => {} },
9754
- * { type: "FlexibleSpace" },
9755
- * { type: "Button", label: "Button 2", onClick: () => {} },
9756
- * ],
9757
- * }
9758
- * ```
9759
- */
9760
- interface UIFlexibleSpaceElement extends UIElementBase, Omit<zInfer<typeof uiFlexibleSpaceElementSchema>, "onCreate" | "onDestroy"> {
9761
- }
9762
- /**
9763
- * The parameters for creating a flexible space element.
9764
- *
9765
- * @remarks
9766
- * `id` is optional but recommended if you want to be able to perform updates.
9767
- */
9768
- interface UIFlexibleSpaceElementCreate extends Omit<UIFlexibleSpaceElement, "id">, UIElementBaseCreateParams {
9769
- }
9770
- type UIFlexibleSpaceElementCreateClonable = MakeClonableSchema<UIFlexibleSpaceElementCreate>;
9771
- /**
9772
- * The parameters for updating a flexible space element.
9773
- *
9774
- * See {@link UIFlexibleSpaceElement} for more details.
9775
- *
9776
- * @remarks
9777
- * `id` and `type` are required to identify the element to update.
9778
- */
9779
- interface UIFlexibleSpaceElementUpdate extends MakeUpdateSchema<UIFlexibleSpaceElement, UIFlexibleSpaceElementCreate> {
9780
- }
9781
-
9782
- declare const uiTextElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9783
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9784
- id: ZodString;
9785
- }, "strip", ZodTypeAny, {
9786
- id: string;
9787
- }, {
9788
- id: string;
9789
- }>], ZodUnknown>, ZodVoid>>;
9790
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9791
- id: ZodString;
9792
- }, "strip", ZodTypeAny, {
9793
- id: string;
9794
- }, {
9795
- id: string;
9796
- }>], ZodUnknown>, ZodVoid>>;
9797
- }, {
9798
- id: ZodString;
9799
- }>, {
9800
- type: ZodLiteral<"Text">;
9801
- /**
9802
- * The text to display in the element.
9803
- */
9804
- content: ZodString;
9805
- }>, "strip", ZodTypeAny, {
9806
- type: "Text";
9807
- id: string;
9808
- content: string;
9809
- onCreate?: ((args_0: {
9810
- id: string;
9811
- }, ...args: unknown[]) => void) | undefined;
9812
- onDestroy?: ((args_0: {
9813
- id: string;
9814
- }, ...args: unknown[]) => void) | undefined;
9815
- }, {
9816
- type: "Text";
9817
- id: string;
9818
- content: string;
9819
- onCreate?: ((args_0: {
9820
- id: string;
9821
- }, ...args: unknown[]) => void) | undefined;
9822
- onDestroy?: ((args_0: {
9823
- id: string;
9824
- }, ...args: unknown[]) => void) | undefined;
9825
- }>;
9826
- /**
9827
- * Represents a text element in a panel.
9828
- * Markdown is supported.
9829
- *
9830
- * @example
9831
- * #### simple
9832
- * ```typescript
9833
- * {
9834
- * type: "Text",
9835
- * content: "Hello, world!",
9836
- * }
9837
- * ```
9838
- *
9839
- * @example
9840
- * #### with links
9841
- * ```typescript
9842
- * {
9843
- * type: "Text",
9844
- * content: "Fill the form https://www.google.com.",
9845
- * }
9846
- * ```
9847
- *
9848
- * @example
9849
- * #### markdown
9850
- * ```typescript
9851
- * {
9852
- * type: "Text",
9853
- * content: "**Hello**, _world_!",
9854
- * }
9855
- * ```
9856
- *
9857
- * @example
9858
- * #### complex markdown
9859
- * Complex markdown syntax is supported like tables, images, quotes, etc.
9860
- * ```typescript
9861
- * {
9862
- * type: "Text",
9863
- * content: `
9864
- *
9865
- * ## Heading
9866
- *
9867
- * This is a paragraph.
9868
- *
9869
- * ### Subheading
9870
- *
9871
- * This is a paragraph.
9872
- *
9873
- * | Name | Age |
9874
- * | ---- | --- |
9875
- * | John | 25 |
9876
- * | Jane | 30 |
9877
- *
9878
- * ![Image](https://via.placeholder.com/150)
9879
- *
9880
- * > This is a quote.
9881
- *
9882
- * [Link](https://www.google.com)
9883
- * `,
9884
- * }
9885
- * ```
9886
- */
9887
- interface UITextElement extends UIElementBase, Omit<zInfer<typeof uiTextElementSchema>, "onCreate" | "onDestroy"> {
9888
- }
9889
- /**
9890
- * The parameters for creating a text element.
9891
- *
9892
- * See {@link UITextElement} for more details.
9893
- *
9894
- * @remarks
9895
- * `id` is optional but recommended if you want to be able to perform updates.
9896
- */
9897
- interface UITextElementCreate extends Omit<UITextElement, "id">, UIElementBaseCreateParams {
9898
- }
9899
- type UITextElementCreateClonable = MakeClonableSchema<UITextElementCreate>;
9900
- /**
9901
- * The parameters for updating a text element.
9902
- *
9903
- * See {@link UITextElement} for more details.
9904
- *
9905
- * @remarks
9906
- * `id` and `type` are required to identify the element to update.
9907
- */
9908
- interface UITextElementUpdate extends MakeUpdateSchema<UITextElement, UITextElementCreate> {
9909
- }
9910
-
9911
- declare const uiButtonGroupElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9673
+ declare const uiDividerElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9912
9674
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9913
9675
  id: ZodString;
9914
9676
  }, "strip", ZodTypeAny, {
@@ -9926,239 +9688,19 @@ declare const uiButtonGroupElementSchema: ZodObject<objectUtil.extendShape<objec
9926
9688
  }, {
9927
9689
  id: ZodString;
9928
9690
  }>, {
9929
- type: ZodLiteral<"ButtonGroup">;
9930
- /**
9931
- * The alignment of the button group.
9932
- *
9933
- * @defaultValue `"end"`
9934
- */
9935
- align: ZodOptional<ZodEnum<["start", "end"]>>;
9936
- items: ZodArray<ZodUnion<[ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9937
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9938
- id: ZodString;
9939
- }, "strip", ZodTypeAny, {
9940
- id: string;
9941
- }, {
9942
- id: string;
9943
- }>], ZodUnknown>, ZodVoid>>;
9944
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
9945
- id: ZodString;
9946
- }, "strip", ZodTypeAny, {
9947
- id: string;
9948
- }, {
9949
- id: string;
9950
- }>], ZodUnknown>, ZodVoid>>;
9951
- }, {
9952
- id: ZodString;
9953
- }>, {
9954
- type: ZodLiteral<"Button">;
9955
- label: ZodString;
9956
- variant: ZodOptional<ZodEnum<["filled", "transparent", "outlined"]>>;
9957
- tint: ZodOptional<ZodEnum<["default", "primary", "accent", "danger"]>>;
9958
- disabled: ZodOptional<ZodBoolean>;
9959
- onClick: ZodFunction<ZodTuple<[ZodObject<{
9960
- id: ZodString;
9961
- }, "strip", ZodTypeAny, {
9962
- id: string;
9963
- }, {
9964
- id: string;
9965
- }>], ZodUnknown>, ZodVoid>;
9966
- }>, "strip", ZodTypeAny, {
9967
- type: "Button";
9968
- id: string;
9969
- label: string;
9970
- onClick: (args_0: {
9971
- id: string;
9972
- }, ...args: unknown[]) => void;
9973
- onCreate?: ((args_0: {
9974
- id: string;
9975
- }, ...args: unknown[]) => void) | undefined;
9976
- onDestroy?: ((args_0: {
9977
- id: string;
9978
- }, ...args: unknown[]) => void) | undefined;
9979
- disabled?: boolean | undefined;
9980
- variant?: "filled" | "transparent" | "outlined" | undefined;
9981
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
9982
- }, {
9983
- type: "Button";
9984
- id: string;
9985
- label: string;
9986
- onClick: (args_0: {
9987
- id: string;
9988
- }, ...args: unknown[]) => void;
9989
- onCreate?: ((args_0: {
9990
- id: string;
9991
- }, ...args: unknown[]) => void) | undefined;
9992
- onDestroy?: ((args_0: {
9993
- id: string;
9994
- }, ...args: unknown[]) => void) | undefined;
9995
- disabled?: boolean | undefined;
9996
- variant?: "filled" | "transparent" | "outlined" | undefined;
9997
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
9998
- }>, ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9999
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10000
- id: ZodString;
10001
- }, "strip", ZodTypeAny, {
10002
- id: string;
10003
- }, {
10004
- id: string;
10005
- }>], ZodUnknown>, ZodVoid>>;
10006
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10007
- id: ZodString;
10008
- }, "strip", ZodTypeAny, {
10009
- id: string;
10010
- }, {
10011
- id: string;
10012
- }>], ZodUnknown>, ZodVoid>>;
10013
- }, {
10014
- id: ZodString;
10015
- }>, {
10016
- type: ZodLiteral<"Text">;
10017
- content: ZodString;
10018
- }>, "strip", ZodTypeAny, {
10019
- type: "Text";
10020
- id: string;
10021
- content: string;
10022
- onCreate?: ((args_0: {
10023
- id: string;
10024
- }, ...args: unknown[]) => void) | undefined;
10025
- onDestroy?: ((args_0: {
10026
- id: string;
10027
- }, ...args: unknown[]) => void) | undefined;
10028
- }, {
10029
- type: "Text";
10030
- id: string;
10031
- content: string;
10032
- onCreate?: ((args_0: {
10033
- id: string;
10034
- }, ...args: unknown[]) => void) | undefined;
10035
- onDestroy?: ((args_0: {
10036
- id: string;
10037
- }, ...args: unknown[]) => void) | undefined;
10038
- }>, ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
10039
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10040
- id: ZodString;
10041
- }, "strip", ZodTypeAny, {
10042
- id: string;
10043
- }, {
10044
- id: string;
10045
- }>], ZodUnknown>, ZodVoid>>;
10046
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10047
- id: ZodString;
10048
- }, "strip", ZodTypeAny, {
10049
- id: string;
10050
- }, {
10051
- id: string;
10052
- }>], ZodUnknown>, ZodVoid>>;
10053
- }, {
10054
- id: ZodString;
10055
- }>, {
10056
- type: ZodLiteral<"FlexibleSpace">;
10057
- }>, "strip", ZodTypeAny, {
10058
- type: "FlexibleSpace";
10059
- id: string;
10060
- onCreate?: ((args_0: {
10061
- id: string;
10062
- }, ...args: unknown[]) => void) | undefined;
10063
- onDestroy?: ((args_0: {
10064
- id: string;
10065
- }, ...args: unknown[]) => void) | undefined;
10066
- }, {
10067
- type: "FlexibleSpace";
10068
- id: string;
10069
- onCreate?: ((args_0: {
10070
- id: string;
10071
- }, ...args: unknown[]) => void) | undefined;
10072
- onDestroy?: ((args_0: {
10073
- id: string;
10074
- }, ...args: unknown[]) => void) | undefined;
10075
- }>]>, "many">;
9691
+ type: ZodLiteral<"Divider">;
10076
9692
  }>, "strip", ZodTypeAny, {
10077
- type: "ButtonGroup";
9693
+ type: "Divider";
10078
9694
  id: string;
10079
- items: ({
10080
- type: "Button";
10081
- id: string;
10082
- label: string;
10083
- onClick: (args_0: {
10084
- id: string;
10085
- }, ...args: unknown[]) => void;
10086
- onCreate?: ((args_0: {
10087
- id: string;
10088
- }, ...args: unknown[]) => void) | undefined;
10089
- onDestroy?: ((args_0: {
10090
- id: string;
10091
- }, ...args: unknown[]) => void) | undefined;
10092
- disabled?: boolean | undefined;
10093
- variant?: "filled" | "transparent" | "outlined" | undefined;
10094
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
10095
- } | {
10096
- type: "Text";
10097
- id: string;
10098
- content: string;
10099
- onCreate?: ((args_0: {
10100
- id: string;
10101
- }, ...args: unknown[]) => void) | undefined;
10102
- onDestroy?: ((args_0: {
10103
- id: string;
10104
- }, ...args: unknown[]) => void) | undefined;
10105
- } | {
10106
- type: "FlexibleSpace";
10107
- id: string;
10108
- onCreate?: ((args_0: {
10109
- id: string;
10110
- }, ...args: unknown[]) => void) | undefined;
10111
- onDestroy?: ((args_0: {
10112
- id: string;
10113
- }, ...args: unknown[]) => void) | undefined;
10114
- })[];
10115
- align?: "start" | "end" | undefined;
10116
9695
  onCreate?: ((args_0: {
10117
9696
  id: string;
10118
9697
  }, ...args: unknown[]) => void) | undefined;
10119
9698
  onDestroy?: ((args_0: {
10120
9699
  id: string;
10121
- }, ...args: unknown[]) => void) | undefined;
10122
- }, {
10123
- type: "ButtonGroup";
10124
- id: string;
10125
- items: ({
10126
- type: "Button";
10127
- id: string;
10128
- label: string;
10129
- onClick: (args_0: {
10130
- id: string;
10131
- }, ...args: unknown[]) => void;
10132
- onCreate?: ((args_0: {
10133
- id: string;
10134
- }, ...args: unknown[]) => void) | undefined;
10135
- onDestroy?: ((args_0: {
10136
- id: string;
10137
- }, ...args: unknown[]) => void) | undefined;
10138
- disabled?: boolean | undefined;
10139
- variant?: "filled" | "transparent" | "outlined" | undefined;
10140
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
10141
- } | {
10142
- type: "Text";
10143
- id: string;
10144
- content: string;
10145
- onCreate?: ((args_0: {
10146
- id: string;
10147
- }, ...args: unknown[]) => void) | undefined;
10148
- onDestroy?: ((args_0: {
10149
- id: string;
10150
- }, ...args: unknown[]) => void) | undefined;
10151
- } | {
10152
- type: "FlexibleSpace";
10153
- id: string;
10154
- onCreate?: ((args_0: {
10155
- id: string;
10156
- }, ...args: unknown[]) => void) | undefined;
10157
- onDestroy?: ((args_0: {
10158
- id: string;
10159
- }, ...args: unknown[]) => void) | undefined;
10160
- })[];
10161
- align?: "start" | "end" | undefined;
9700
+ }, ...args: unknown[]) => void) | undefined;
9701
+ }, {
9702
+ type: "Divider";
9703
+ id: string;
10162
9704
  onCreate?: ((args_0: {
10163
9705
  id: string;
10164
9706
  }, ...args: unknown[]) => void) | undefined;
@@ -10167,60 +9709,50 @@ declare const uiButtonGroupElementSchema: ZodObject<objectUtil.extendShape<objec
10167
9709
  }, ...args: unknown[]) => void) | undefined;
10168
9710
  }>;
10169
9711
  /**
10170
- * Represents a button group element in a panel.
10171
- * A button group is an horizontal container of buttons and text elements.
9712
+ * Represents a divider element in a panel.
9713
+ * This element is used to separate other elements in a panel.
9714
+ * It is rendered as a gray horizontal line of 1px height.
10172
9715
  *
10173
9716
  * @example
10174
- * Thanks to the FlexibleSpace element, button 1 and text 1 are aligned to the start of the panel,
10175
- * while button 2 is aligned to the end.
10176
- *
9717
+ * Divider element is useful to separate sections of a panel.
10177
9718
  * ```typescript
10178
9719
  * {
10179
- * type: "ButtonGroup",
10180
- * items: [
10181
- * { type: "Button", label: "Button 1", onClick: () => {} },
10182
- * { type: "Text", content: "Text 1" },
10183
- * { type: "FlexibleSpace" },
10184
- * { type: "Button", label: "Button 2", onClick: () => {} },
9720
+ * body: [
9721
+ * { type: "Text", content: "Contact" },
9722
+ * { type: "TextInput", placeholder: "Enter your name", ... },
9723
+ * { type: "TextInput", placeholder: "Enter your email", ... },
9724
+ * { type: "Divider" },
9725
+ * { type: "Text", content: "Address" },
9726
+ * { type: "TextInput", placeholder: "Enter your address", ... },
10185
9727
  * ],
10186
9728
  * }
10187
9729
  * ```
10188
9730
  */
10189
- interface UIButtonGroupElement extends UIElementBase, Omit<zInfer<typeof uiButtonGroupElementSchema>, "onCreate" | "onDestroy"> {
10190
- /**
10191
- * The items to add to the button group.
10192
- */
10193
- items: Array<UIButtonElement | UITextElement | UIFlexibleSpaceElement>;
9731
+ interface UIDividerElement extends UIElementBase, Omit<zInfer<typeof uiDividerElementSchema>, "onCreate" | "onDestroy"> {
10194
9732
  }
10195
9733
  /**
10196
- * The parameters for creating a button group element.
9734
+ * The parameters for creating a divider element.
10197
9735
  *
10198
- * See {@link UIButtonGroupElement} for more details.
9736
+ * See {@link UIDividerElement} for more details.
10199
9737
  *
10200
9738
  * @remarks
10201
- * `id` is optional but recommended if you want to be able to perform updates.
9739
+ * `id` is optional but recommended if you want to be able to delete the element.
10202
9740
  */
10203
- interface UIButtonGroupElementCreate extends Omit<UIButtonGroupElement, "id" | "items">, UIElementBaseCreateParams {
10204
- /**
10205
- * The items to add to the button group.
10206
- */
10207
- items: Array<UIButtonElementCreate | UITextElementCreate | UIFlexibleSpaceElementCreate>;
9741
+ interface UIDividerElementCreate extends Omit<UIDividerElement, "id">, UIElementBaseCreateParams {
10208
9742
  }
10209
- type UIButtonGroupElementCreateClonable = Omit<MakeClonableSchema<UIButtonGroupElementCreate>, "items"> & {
10210
- items: Array<UIButtonElementCreateClonable | UITextElementCreateClonable | UIFlexibleSpaceElementCreateClonable>;
10211
- };
9743
+ type UIDividerElementCreateClonable = MakeClonableSchema<UIDividerElementCreate>;
10212
9744
  /**
10213
- * The parameters for updating a button group element.
9745
+ * The parameters for updating a divider element.
10214
9746
  *
10215
- * See {@link UIButtonGroupElement} for more details.
9747
+ * See {@link UIDividerElement} for more details.
10216
9748
  *
10217
9749
  * @remarks
10218
- * `id` and `type` are required to update the button group element.
9750
+ * `id` and `type` are required to identify the element to update.
10219
9751
  */
10220
- interface UIButtonGroupElementUpdate extends MakeUpdateSchema<UIButtonGroupElement, UIButtonGroupElementCreate> {
9752
+ interface UIDividerElementUpdate extends MakeUpdateSchema<UIDividerElement, UIDividerElementCreate> {
10221
9753
  }
10222
9754
 
10223
- declare const uiDividerElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
9755
+ declare const uiFlexibleSpaceElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
10224
9756
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10225
9757
  id: ZodString;
10226
9758
  }, "strip", ZodTypeAny, {
@@ -10238,9 +9770,9 @@ declare const uiDividerElementSchema: ZodObject<objectUtil.extendShape<objectUti
10238
9770
  }, {
10239
9771
  id: ZodString;
10240
9772
  }>, {
10241
- type: ZodLiteral<"Divider">;
9773
+ type: ZodLiteral<"FlexibleSpace">;
10242
9774
  }>, "strip", ZodTypeAny, {
10243
- type: "Divider";
9775
+ type: "FlexibleSpace";
10244
9776
  id: string;
10245
9777
  onCreate?: ((args_0: {
10246
9778
  id: string;
@@ -10249,7 +9781,7 @@ declare const uiDividerElementSchema: ZodObject<objectUtil.extendShape<objectUti
10249
9781
  id: string;
10250
9782
  }, ...args: unknown[]) => void) | undefined;
10251
9783
  }, {
10252
- type: "Divider";
9784
+ type: "FlexibleSpace";
10253
9785
  id: string;
10254
9786
  onCreate?: ((args_0: {
10255
9787
  id: string;
@@ -10259,47 +9791,60 @@ declare const uiDividerElementSchema: ZodObject<objectUtil.extendShape<objectUti
10259
9791
  }, ...args: unknown[]) => void) | undefined;
10260
9792
  }>;
10261
9793
  /**
10262
- * Represents a divider element in a panel.
10263
- * This element is used to separate other elements in a panel.
10264
- * It is rendered as a gray horizontal line of 1px height.
9794
+ * Represents a flexible space element in a container.
9795
+ *
9796
+ * When rendered...
9797
+ *
9798
+ * - inside {@link UIGridContainerElement}, it will add extra gap between items. It can be controlled by `grid` property.
9799
+ * - inside {@link UIPanelElement} `body` or `footer`, since they work as vertically stacks, it will add extra gap between items.
10265
9800
  *
10266
9801
  * @example
10267
- * Divider element is useful to separate sections of a panel.
9802
+ * Paragraphs with a flexible space between makes them more visually separated.
10268
9803
  * ```typescript
10269
9804
  * {
9805
+ * type: "Panel",
10270
9806
  * body: [
10271
- * { type: "Text", content: "Contact" },
10272
- * { type: "TextInput", placeholder: "Enter your name", ... },
10273
- * { type: "TextInput", placeholder: "Enter your email", ... },
10274
- * { type: "Divider" },
10275
- * { type: "Text", content: "Address" },
10276
- * { type: "TextInput", placeholder: "Enter your address", ... },
9807
+ * { type: "Paragraph", text: "Paragraph 1" },
9808
+ * { type: "FlexibleSpace" },
9809
+ * { type: "Paragraph", text: "Paragraph 2" },
9810
+ * ],
9811
+ * }
9812
+ * ```
9813
+ *
9814
+ * @example
9815
+ * Horizontal stack of buttons with a flexible space between makes them more visually separated.
9816
+ * ```typescript
9817
+ * {
9818
+ * type: "Grid",
9819
+ * grid: "auto-flow / auto 1fr auto",
9820
+ * items: [
9821
+ * { type: "Button", label: "Button 1", onClick: () => {} },
9822
+ * { type: "FlexibleSpace" },
9823
+ * { type: "Button", label: "Button 2", onClick: () => {} },
10277
9824
  * ],
10278
9825
  * }
10279
9826
  * ```
10280
9827
  */
10281
- interface UIDividerElement extends UIElementBase, Omit<zInfer<typeof uiDividerElementSchema>, "onCreate" | "onDestroy"> {
9828
+ interface UIFlexibleSpaceElement extends UIElementBase, Omit<zInfer<typeof uiFlexibleSpaceElementSchema>, "onCreate" | "onDestroy"> {
10282
9829
  }
10283
9830
  /**
10284
- * The parameters for creating a divider element.
10285
- *
10286
- * See {@link UIDividerElement} for more details.
9831
+ * The parameters for creating a flexible space element.
10287
9832
  *
10288
9833
  * @remarks
10289
- * `id` is optional but recommended if you want to be able to delete the element.
9834
+ * `id` is optional but recommended if you want to be able to perform updates.
10290
9835
  */
10291
- interface UIDividerElementCreate extends Omit<UIDividerElement, "id">, UIElementBaseCreateParams {
9836
+ interface UIFlexibleSpaceElementCreate extends Omit<UIFlexibleSpaceElement, "id">, UIElementBaseCreateParams {
10292
9837
  }
10293
- type UIDividerElementCreateClonable = MakeClonableSchema<UIDividerElementCreate>;
9838
+ type UIFlexibleSpaceElementCreateClonable = MakeClonableSchema<UIFlexibleSpaceElementCreate>;
10294
9839
  /**
10295
- * The parameters for updating a divider element.
9840
+ * The parameters for updating a flexible space element.
10296
9841
  *
10297
- * See {@link UIDividerElement} for more details.
9842
+ * See {@link UIFlexibleSpaceElement} for more details.
10298
9843
  *
10299
9844
  * @remarks
10300
9845
  * `id` and `type` are required to identify the element to update.
10301
9846
  */
10302
- interface UIDividerElementUpdate extends MakeUpdateSchema<UIDividerElement, UIDividerElementCreate> {
9847
+ interface UIFlexibleSpaceElementUpdate extends MakeUpdateSchema<UIFlexibleSpaceElement, UIFlexibleSpaceElementCreate> {
10303
9848
  }
10304
9849
 
10305
9850
  declare const uiSelectElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<objectUtil.extendShape<{
@@ -10427,6 +9972,22 @@ declare const uiSelectElementSchema: ZodObject<objectUtil.extendShape<objectUtil
10427
9972
  * ```
10428
9973
  *
10429
9974
  * @example
9975
+ * #### with label
9976
+ * `label` is displayed above the select and used for screen readers.
9977
+ * `placeholder` is displayed in the select when no value is selected.
9978
+ *
9979
+ * ```typescript
9980
+ * {
9981
+ * type: "Select",
9982
+ * label: "Fruit",
9983
+ * options: [{ label: "Apple", value: "apple" }, { label: "Banana", value: "banana" }],
9984
+ * value: undefined,
9985
+ * placeholder: "Select a fruit",
9986
+ * onChange: (args) => console.log(args.value),
9987
+ * }
9988
+ * ```
9989
+ *
9990
+ * @example
10430
9991
  * #### with search
10431
9992
  * ```typescript
10432
9993
  * {
@@ -10601,72 +10162,201 @@ declare const uiTextInputElementSchema: ZodObject<objectUtil.extendShape<objectU
10601
10162
  * ```
10602
10163
  *
10603
10164
  * @example
10604
- * #### with label
10165
+ * #### with label
10166
+ * ```typescript
10167
+ * {
10168
+ * type: "TextInput",
10169
+ * label: "Name",
10170
+ * value: "Hello",
10171
+ * onChange: (args) => console.log(args.value),
10172
+ * placeholder: "Enter your name",
10173
+ * }
10174
+ * ```
10175
+ */
10176
+ interface UITextInputElement extends UILabelReadyElement, Omit<zInfer<typeof uiTextInputElementSchema>, "onChange" | "onBlur" | "onFocus" | "onCreate" | "onDestroy"> {
10177
+ /**
10178
+ * The function to call when the value of the input changes.
10179
+ *
10180
+ * @param args - The arguments passed to the function.
10181
+ * @param args.value - The value of the input.
10182
+ * @param args.id - The id of the input element.
10183
+ */
10184
+ onChange?: (args: {
10185
+ value: string;
10186
+ id: string;
10187
+ }) => void;
10188
+ /**
10189
+ * The function to call when the input is blurred.
10190
+ *
10191
+ * @param args - The arguments passed to the function.
10192
+ * @param args.value - The value of the input.
10193
+ * @param args.id - The id of the input element.
10194
+ */
10195
+ onBlur?: (args: {
10196
+ value: string;
10197
+ id: string;
10198
+ }) => void;
10199
+ /**
10200
+ * The function to call when the input is focused.
10201
+ *
10202
+ * @param args - The arguments passed to the function.
10203
+ * @param args.value - The value of the input.
10204
+ * @param args.id - The id of the input element.
10205
+ */
10206
+ onFocus?: (args: {
10207
+ value: string;
10208
+ id: string;
10209
+ }) => void;
10210
+ }
10211
+ /**
10212
+ * The parameters for creating a text input element.
10213
+ *
10214
+ * See {@link UITextInputElement} for more details.
10215
+ *
10216
+ * @remarks
10217
+ * `id` is optional but recommended if you want to be able to perform updates.
10218
+ */
10219
+ interface UITextInputElementCreate extends Omit<UITextInputElement, "id">, UILabelReadyElementCreateParams {
10220
+ }
10221
+ type UITextInputElementCreateClonable = MakeClonableSchema<UITextInputElementCreate>;
10222
+ /**
10223
+ * The parameters for updating a text input element.
10224
+ *
10225
+ * See {@link UITextInputElement} for more details.
10226
+ *
10227
+ * @remarks
10228
+ * `id` and `type` are required to identify the element to update.
10229
+ */
10230
+ interface UITextInputElementUpdate extends MakeUpdateSchema<UITextInputElement, UITextInputElementCreate> {
10231
+ }
10232
+
10233
+ declare const uiTextElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
10234
+ onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10235
+ id: ZodString;
10236
+ }, "strip", ZodTypeAny, {
10237
+ id: string;
10238
+ }, {
10239
+ id: string;
10240
+ }>], ZodUnknown>, ZodVoid>>;
10241
+ onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10242
+ id: ZodString;
10243
+ }, "strip", ZodTypeAny, {
10244
+ id: string;
10245
+ }, {
10246
+ id: string;
10247
+ }>], ZodUnknown>, ZodVoid>>;
10248
+ }, {
10249
+ id: ZodString;
10250
+ }>, {
10251
+ type: ZodLiteral<"Text">;
10252
+ /**
10253
+ * The text to display in the element.
10254
+ */
10255
+ content: ZodString;
10256
+ }>, "strip", ZodTypeAny, {
10257
+ type: "Text";
10258
+ id: string;
10259
+ content: string;
10260
+ onCreate?: ((args_0: {
10261
+ id: string;
10262
+ }, ...args: unknown[]) => void) | undefined;
10263
+ onDestroy?: ((args_0: {
10264
+ id: string;
10265
+ }, ...args: unknown[]) => void) | undefined;
10266
+ }, {
10267
+ type: "Text";
10268
+ id: string;
10269
+ content: string;
10270
+ onCreate?: ((args_0: {
10271
+ id: string;
10272
+ }, ...args: unknown[]) => void) | undefined;
10273
+ onDestroy?: ((args_0: {
10274
+ id: string;
10275
+ }, ...args: unknown[]) => void) | undefined;
10276
+ }>;
10277
+ /**
10278
+ * Represents a text element in a panel.
10279
+ * Markdown is supported.
10280
+ *
10281
+ * @example
10282
+ * #### simple
10283
+ * ```typescript
10284
+ * {
10285
+ * type: "Text",
10286
+ * content: "Hello, world!",
10287
+ * }
10288
+ * ```
10289
+ *
10290
+ * @example
10291
+ * #### with links
10292
+ * ```typescript
10293
+ * {
10294
+ * type: "Text",
10295
+ * content: "Fill the form https://www.google.com.",
10296
+ * }
10297
+ * ```
10298
+ *
10299
+ * @example
10300
+ * #### markdown
10301
+ * ```typescript
10302
+ * {
10303
+ * type: "Text",
10304
+ * content: "**Hello**, _world_!",
10305
+ * }
10306
+ * ```
10307
+ *
10308
+ * @example
10309
+ * #### complex markdown
10310
+ * Complex markdown syntax is supported like tables, images, quotes, etc.
10605
10311
  * ```typescript
10606
10312
  * {
10607
- * type: "TextInput",
10608
- * label: "Name",
10609
- * value: "Hello",
10610
- * onChange: (args) => console.log(args.value),
10611
- * placeholder: "Enter your name",
10313
+ * type: "Text",
10314
+ * content: `
10315
+ *
10316
+ * ## Heading
10317
+ *
10318
+ * This is a paragraph.
10319
+ *
10320
+ * ### Subheading
10321
+ *
10322
+ * This is a paragraph.
10323
+ *
10324
+ * | Name | Age |
10325
+ * | ---- | --- |
10326
+ * | John | 25 |
10327
+ * | Jane | 30 |
10328
+ *
10329
+ * ![Image](https://via.placeholder.com/150)
10330
+ *
10331
+ * > This is a quote.
10332
+ *
10333
+ * [Link](https://www.google.com)
10334
+ * `,
10612
10335
  * }
10613
10336
  * ```
10614
10337
  */
10615
- interface UITextInputElement extends UILabelReadyElement, Omit<zInfer<typeof uiTextInputElementSchema>, "onChange" | "onBlur" | "onFocus" | "onCreate" | "onDestroy"> {
10616
- /**
10617
- * The function to call when the value of the input changes.
10618
- *
10619
- * @param args - The arguments passed to the function.
10620
- * @param args.value - The value of the input.
10621
- * @param args.id - The id of the input element.
10622
- */
10623
- onChange?: (args: {
10624
- value: string;
10625
- id: string;
10626
- }) => void;
10627
- /**
10628
- * The function to call when the input is blurred.
10629
- *
10630
- * @param args - The arguments passed to the function.
10631
- * @param args.value - The value of the input.
10632
- * @param args.id - The id of the input element.
10633
- */
10634
- onBlur?: (args: {
10635
- value: string;
10636
- id: string;
10637
- }) => void;
10638
- /**
10639
- * The function to call when the input is focused.
10640
- *
10641
- * @param args - The arguments passed to the function.
10642
- * @param args.value - The value of the input.
10643
- * @param args.id - The id of the input element.
10644
- */
10645
- onFocus?: (args: {
10646
- value: string;
10647
- id: string;
10648
- }) => void;
10338
+ interface UITextElement extends UIElementBase, Omit<zInfer<typeof uiTextElementSchema>, "onCreate" | "onDestroy"> {
10649
10339
  }
10650
10340
  /**
10651
- * The parameters for creating a text input element.
10341
+ * The parameters for creating a text element.
10652
10342
  *
10653
- * See {@link UITextInputElement} for more details.
10343
+ * See {@link UITextElement} for more details.
10654
10344
  *
10655
10345
  * @remarks
10656
10346
  * `id` is optional but recommended if you want to be able to perform updates.
10657
10347
  */
10658
- interface UITextInputElementCreate extends Omit<UITextInputElement, "id">, UILabelReadyElementCreateParams {
10348
+ interface UITextElementCreate extends Omit<UITextElement, "id">, UIElementBaseCreateParams {
10659
10349
  }
10660
- type UITextInputElementCreateClonable = MakeClonableSchema<UITextInputElementCreate>;
10350
+ type UITextElementCreateClonable = MakeClonableSchema<UITextElementCreate>;
10661
10351
  /**
10662
- * The parameters for updating a text input element.
10352
+ * The parameters for updating a text element.
10663
10353
  *
10664
- * See {@link UITextInputElement} for more details.
10354
+ * See {@link UITextElement} for more details.
10665
10355
  *
10666
10356
  * @remarks
10667
10357
  * `id` and `type` are required to identify the element to update.
10668
10358
  */
10669
- interface UITextInputElementUpdate extends MakeUpdateSchema<UITextInputElement, UITextInputElementCreate> {
10359
+ interface UITextElementUpdate extends MakeUpdateSchema<UITextElement, UITextElementCreate> {
10670
10360
  }
10671
10361
 
10672
10362
  type ItemCreateClonableType = Exclude<UIPanelElementCreateClonable, {
@@ -10810,22 +10500,22 @@ type UIGridContainerElementCreateClonable = Omit<MakeClonableSchema<UIGridContai
10810
10500
  interface UIGridContainerElementUpdate extends MakeUpdateSchema<UIGridContainerElement, UIGridContainerElementCreate> {
10811
10501
  }
10812
10502
 
10813
- type UIPanelElement = UIButtonElement | UITextElement | UIButtonGroupElement | UIDividerElement | UITextInputElement | UISelectElement | UIFlexibleSpaceElement | UIGridContainerElement;
10503
+ type UIPanelElement = UIButtonElement | UITextElement | UIDividerElement | UITextInputElement | UISelectElement | UIFlexibleSpaceElement | UIGridContainerElement;
10814
10504
  /**
10815
10505
  * This is a union of all the possible elements that can be created inside panel's body or footer.
10816
10506
  *
10817
10507
  * @remarks
10818
10508
  * For the sake of convenience, `id` is optional but recommended if you want to be able to perform updates.
10819
10509
  */
10820
- type UIPanelElementCreate = UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIGridContainerElementCreate;
10821
- type UIPanelElementCreateClonable = UIButtonElementCreateClonable | UITextElementCreateClonable | UIButtonGroupElementCreateClonable | UIDividerElementCreateClonable | UITextInputElementCreateClonable | UISelectElementCreateClonable | UIFlexibleSpaceElementCreateClonable | UIGridContainerElementCreateClonable;
10510
+ type UIPanelElementCreate = UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIGridContainerElementCreate;
10511
+ type UIPanelElementCreateClonable = UIButtonElementCreateClonable | UITextElementCreateClonable | UIDividerElementCreateClonable | UITextInputElementCreateClonable | UISelectElementCreateClonable | UIFlexibleSpaceElementCreateClonable | UIGridContainerElementCreateClonable;
10822
10512
  /**
10823
10513
  * This is a union of all the possible elements that can be updated inside panel's body or footer (excluding Divider and FlexibleSpace elements because they cannot be updated).
10824
10514
  *
10825
10515
  * @remarks
10826
10516
  * `id` and `type` are required to identify the element to update.
10827
10517
  */
10828
- type UIPanelElementUpdate = UIButtonElementUpdate | UITextElementUpdate | UIButtonGroupElementUpdate | UITextInputElementUpdate | UISelectElementUpdate | UIDividerElementUpdate | UIGridContainerElementUpdate | UIFlexibleSpaceElementUpdate;
10518
+ type UIPanelElementUpdate = UIButtonElementUpdate | UITextElementUpdate | UITextInputElementUpdate | UISelectElementUpdate | UIDividerElementUpdate | UIGridContainerElementUpdate | UIFlexibleSpaceElementUpdate;
10829
10519
 
10830
10520
  declare const placementForUiElementSchema: ZodUnion<[ZodObject<{
10831
10521
  after: ZodString;
@@ -10847,7 +10537,7 @@ declare const placementForUiElementSchema: ZodUnion<[ZodObject<{
10847
10537
  at: "start" | "end";
10848
10538
  }>]>;
10849
10539
  /**
10850
- * Used in {@link UiController.createPanel} to specify the position of a panel in the stack
10540
+ * Used in {@link UiController.createOrUpdatePanel} to specify the position of a panel in the stack
10851
10541
  * and in {@link UiController.createPanelElements} to specify the position of an element in a panel.
10852
10542
  *
10853
10543
  * In both cases, the default value is `{ at: "end" }`.
@@ -10880,7 +10570,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10880
10570
  /**
10881
10571
  * The elements to add to the panel body.
10882
10572
  */
10883
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
10573
+ body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
10884
10574
  /**
10885
10575
  * The elements to add to the panel footer.
10886
10576
  */
@@ -10895,7 +10585,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10895
10585
  }>, "strip", ZodTypeAny, {
10896
10586
  type: "Panel";
10897
10587
  id: string;
10898
- body: UIPanelElement[];
10899
10588
  onCreate?: ((args_0: {
10900
10589
  id: string;
10901
10590
  }, ...args: unknown[]) => void) | undefined;
@@ -10903,6 +10592,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10903
10592
  id: string;
10904
10593
  }, ...args: unknown[]) => void) | undefined;
10905
10594
  title?: string | undefined;
10595
+ body?: UIPanelElement[] | undefined;
10906
10596
  footer?: UIPanelElement[] | undefined;
10907
10597
  onClickClose?: ((args_0: {
10908
10598
  id: string;
@@ -10910,7 +10600,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10910
10600
  }, {
10911
10601
  type: "Panel";
10912
10602
  id: string;
10913
- body: UIPanelElement[];
10914
10603
  onCreate?: ((args_0: {
10915
10604
  id: string;
10916
10605
  }, ...args: unknown[]) => void) | undefined;
@@ -10918,6 +10607,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10918
10607
  id: string;
10919
10608
  }, ...args: unknown[]) => void) | undefined;
10920
10609
  title?: string | undefined;
10610
+ body?: UIPanelElement[] | undefined;
10921
10611
  footer?: UIPanelElement[] | undefined;
10922
10612
  onClickClose?: ((args_0: {
10923
10613
  id: string;
@@ -10925,7 +10615,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10925
10615
  }>;
10926
10616
  /**
10927
10617
  * Represents a panel in the UI.
10928
- * It can be added to the map by using the {@link UiController.createPanel} method.
10618
+ * It can be added to the map by using the {@link UiController.createOrUpdatePanel} method.
10929
10619
  *
10930
10620
  * A panel is a container for other UI elements.
10931
10621
  * It can have a title, a body, a footer as well as a close button.
@@ -10943,8 +10633,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10943
10633
  *
10944
10634
  * #### Footer
10945
10635
  * Footer is sticky to the bottom of the panel, and can be used to add actions to the panel (e.g. save, cancel, etc.).
10946
- * Normally, it should contain a `ButtonGroup` element with a `Cancel` and `Save` button. Using `ButtonGroup` is recommended
10947
- * because it will automatically align the buttons to the end of the panel giving it a nice look.
10948
10636
  *
10949
10637
  * @example
10950
10638
  * #### basic
@@ -10977,20 +10665,32 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10977
10665
  * { type: "TextInput", label: "Last name", value: "", placeholder: "Doe", onChange: (value) => setLastName(value) },
10978
10666
  * ],
10979
10667
  * footer: [
10980
- * { type: "ButtonGroup", items: [
10981
- * { type: "Button", label: "Reset", onClick: () => alert("Reset") },
10982
- * { type: "Button", label: "Save", onClick: () => alert("Save") },
10983
- * ] },
10668
+ * {
10669
+ * type: "Grid",
10670
+ * grid: "auto-flow / 1fr auto auto",
10671
+ * items: [
10672
+ * { type: "FlexibleSpace" }, // this will make the buttons to be aligned to the end of the panel
10673
+ * { type: "Button", label: "Reset", onClick: () => alert("Reset") },
10674
+ * { type: "Button", label: "Save", onClick: () => alert("Save") },
10675
+ * ],
10676
+ * },
10984
10677
  * ],
10985
10678
  * }
10986
10679
  * ```
10987
10680
  *
10988
10681
  */
10989
- interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onClickClose" | "body" | "footer" | "onCreate" | "onDestroy"> {
10682
+ interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onClickClose" | "body" | "footer" | "onCreate" | "onDestroy" | "id"> {
10683
+ /**
10684
+ * The ID of the panel obtained from {@link UiController.createPanelId}.
10685
+ *
10686
+ * @remarks
10687
+ * Custom IDs are not supported.
10688
+ */
10689
+ id: string;
10990
10690
  /**
10991
10691
  * The elements to add to the panel body.
10992
10692
  */
10993
- body: UIPanelElement[];
10693
+ body?: UIPanelElement[];
10994
10694
  /**
10995
10695
  * The elements to add to the panel footer.
10996
10696
  */
@@ -11008,7 +10708,7 @@ interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onC
11008
10708
  declare const uiPanelCreateSchema: {
11009
10709
  params: ZodObject<objectUtil.extendShape<Omit<{
11010
10710
  type: ZodOptional<ZodLiteral<"Panel">>;
11011
- id: ZodOptional<ZodString>;
10711
+ id: ZodString;
11012
10712
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11013
10713
  id: ZodString;
11014
10714
  }, "strip", ZodTypeAny, {
@@ -11024,7 +10724,7 @@ declare const uiPanelCreateSchema: {
11024
10724
  id: string;
11025
10725
  }>], ZodUnknown>, ZodVoid>>;
11026
10726
  title: ZodOptional<ZodString>;
11027
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
10727
+ body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11028
10728
  footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11029
10729
  onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11030
10730
  id: ZodString;
@@ -11034,12 +10734,11 @@ declare const uiPanelCreateSchema: {
11034
10734
  id: string;
11035
10735
  }>], ZodUnknown>, ZodVoid>>;
11036
10736
  }, "body" | "footer">, {
11037
- body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
10737
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11038
10738
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11039
10739
  }>, "strip", ZodTypeAny, {
11040
- body: UIPanelElementCreate[];
10740
+ id: string;
11041
10741
  type?: "Panel" | undefined;
11042
- id?: string | undefined;
11043
10742
  onCreate?: ((args_0: {
11044
10743
  id: string;
11045
10744
  }, ...args: unknown[]) => void) | undefined;
@@ -11047,14 +10746,14 @@ declare const uiPanelCreateSchema: {
11047
10746
  id: string;
11048
10747
  }, ...args: unknown[]) => void) | undefined;
11049
10748
  title?: string | undefined;
10749
+ body?: UIPanelElementCreate[] | undefined;
11050
10750
  footer?: UIPanelElementCreate[] | undefined;
11051
10751
  onClickClose?: ((args_0: {
11052
10752
  id: string;
11053
10753
  }, ...args: unknown[]) => void) | undefined;
11054
10754
  }, {
11055
- body: UIPanelElementCreate[];
10755
+ id: string;
11056
10756
  type?: "Panel" | undefined;
11057
- id?: string | undefined;
11058
10757
  onCreate?: ((args_0: {
11059
10758
  id: string;
11060
10759
  }, ...args: unknown[]) => void) | undefined;
@@ -11062,51 +10761,21 @@ declare const uiPanelCreateSchema: {
11062
10761
  id: string;
11063
10762
  }, ...args: unknown[]) => void) | undefined;
11064
10763
  title?: string | undefined;
10764
+ body?: UIPanelElementCreate[] | undefined;
11065
10765
  footer?: UIPanelElementCreate[] | undefined;
11066
10766
  onClickClose?: ((args_0: {
11067
10767
  id: string;
11068
10768
  }, ...args: unknown[]) => void) | undefined;
11069
10769
  }>;
11070
- clonable: ZodObject<objectUtil.extendShape<objectUtil.extendShape<objectUtil.extendShape<Omit<{
10770
+ clonable: ZodObject<objectUtil.extendShape<{
11071
10771
  type: ZodOptional<ZodLiteral<"Panel">>;
11072
- id: ZodOptional<ZodString>;
11073
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11074
- id: ZodString;
11075
- }, "strip", ZodTypeAny, {
11076
- id: string;
11077
- }, {
11078
- id: string;
11079
- }>], ZodUnknown>, ZodVoid>>;
11080
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11081
- id: ZodString;
11082
- }, "strip", ZodTypeAny, {
11083
- id: string;
11084
- }, {
11085
- id: string;
11086
- }>], ZodUnknown>, ZodVoid>>;
10772
+ id: ZodString;
10773
+ onCreate: ZodOptional<ZodString>;
10774
+ onDestroy: ZodOptional<ZodString>;
11087
10775
  title: ZodOptional<ZodString>;
11088
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
11089
- footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11090
- onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11091
- id: ZodString;
11092
- }, "strip", ZodTypeAny, {
11093
- id: string;
11094
- }, {
11095
- id: string;
11096
- }>], ZodUnknown>, ZodVoid>>;
11097
- }, "body" | "footer">, {
11098
- body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
10776
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11099
10777
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11100
- }>, objectUtil.extendShape<{
11101
- id: ZodOptional<ZodString>;
11102
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11103
- id: ZodString;
11104
- }, "strip", ZodTypeAny, {
11105
- id: string;
11106
- }, {
11107
- id: string;
11108
- }>], ZodUnknown>, ZodVoid>>;
11109
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10778
+ onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11110
10779
  id: ZodString;
11111
10780
  }, "strip", ZodTypeAny, {
11112
10781
  id: string;
@@ -11114,46 +10783,40 @@ declare const uiPanelCreateSchema: {
11114
10783
  id: string;
11115
10784
  }>], ZodUnknown>, ZodVoid>>;
11116
10785
  }, {
11117
- onCreate: ZodOptional<ZodString>;
11118
- onDestroy: ZodOptional<ZodString>;
11119
- }>>, {
11120
10786
  onClickClose: ZodOptional<ZodString>;
11121
- body: ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">;
10787
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">>;
11122
10788
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">>;
11123
10789
  }>, "strip", ZodTypeAny, {
11124
- body: UIPanelElementCreateClonable[];
10790
+ id: string;
11125
10791
  type?: "Panel" | undefined;
11126
- id?: string | undefined;
11127
10792
  onCreate?: string | undefined;
11128
10793
  onDestroy?: string | undefined;
11129
10794
  title?: string | undefined;
10795
+ body?: UIPanelElementCreateClonable[] | undefined;
11130
10796
  footer?: UIPanelElementCreateClonable[] | undefined;
11131
10797
  onClickClose?: string | undefined;
11132
10798
  }, {
11133
- body: UIPanelElementCreateClonable[];
10799
+ id: string;
11134
10800
  type?: "Panel" | undefined;
11135
- id?: string | undefined;
11136
10801
  onCreate?: string | undefined;
11137
10802
  onDestroy?: string | undefined;
11138
10803
  title?: string | undefined;
10804
+ body?: UIPanelElementCreateClonable[] | undefined;
11139
10805
  footer?: UIPanelElementCreateClonable[] | undefined;
11140
10806
  onClickClose?: string | undefined;
11141
10807
  }>;
11142
10808
  };
11143
10809
  /**
11144
- * The parameters for creating a panel by using {@link UiController.createPanel}.
10810
+ * The parameters for creating a panel by using {@link UiController.createOrUpdatePanel}.
11145
10811
  *
11146
10812
  * @see {@link UIPanel} for more information about panels.
11147
- *
11148
- * @remarks
11149
- * `id` is optional but recommended if you want to be able to perform updates.
11150
10813
  */
11151
- interface UIPanelCreate extends Omit<UIPanel, "id" | "body" | "footer" | "type">, UIElementBaseCreateParams {
10814
+ interface UIPanelCreateOrUpdate extends Omit<UIPanel, "body" | "footer" | "type">, Omit<UIElementBaseCreateParams, "id"> {
11152
10815
  type?: "Panel";
11153
10816
  /**
11154
10817
  * The elements to add to the panel body.
11155
10818
  */
11156
- body: UIPanelElementCreate[];
10819
+ body?: UIPanelElementCreate[];
11157
10820
  /**
11158
10821
  * The elements to add to the panel footer.
11159
10822
  */
@@ -11548,10 +11211,10 @@ declare const UpdateActionTriggerParamsSchema: ZodObject<{
11548
11211
  interface UpdateActionTriggerParams extends Omit<Partial<UIActionTriggerCreate>, "id"> {
11549
11212
  id: zInfer<typeof UpdateActionTriggerParamsSchema>["id"];
11550
11213
  }
11551
- declare const CreatePanelParamsSchema: ZodObject<{
11214
+ declare const CreateOrUpdatePanelParamsSchema: ZodObject<{
11552
11215
  panel: ZodObject<objectUtil.extendShape<Omit<{
11553
11216
  type: ZodOptional<ZodLiteral<"Panel">>;
11554
- id: ZodOptional<ZodString>;
11217
+ id: ZodString;
11555
11218
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11556
11219
  id: ZodString;
11557
11220
  }, "strip", ZodTypeAny, {
@@ -11567,7 +11230,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11567
11230
  id: string;
11568
11231
  }>], ZodUnknown>, ZodVoid>>;
11569
11232
  title: ZodOptional<ZodString>;
11570
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
11233
+ body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11571
11234
  footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11572
11235
  onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11573
11236
  id: ZodString;
@@ -11577,12 +11240,11 @@ declare const CreatePanelParamsSchema: ZodObject<{
11577
11240
  id: string;
11578
11241
  }>], ZodUnknown>, ZodVoid>>;
11579
11242
  }, "body" | "footer">, {
11580
- body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
11243
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11581
11244
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11582
11245
  }>, "strip", ZodTypeAny, {
11583
- body: UIPanelElementCreate[];
11246
+ id: string;
11584
11247
  type?: "Panel" | undefined;
11585
- id?: string | undefined;
11586
11248
  onCreate?: ((args_0: {
11587
11249
  id: string;
11588
11250
  }, ...args: unknown[]) => void) | undefined;
@@ -11590,14 +11252,14 @@ declare const CreatePanelParamsSchema: ZodObject<{
11590
11252
  id: string;
11591
11253
  }, ...args: unknown[]) => void) | undefined;
11592
11254
  title?: string | undefined;
11255
+ body?: UIPanelElementCreate[] | undefined;
11593
11256
  footer?: UIPanelElementCreate[] | undefined;
11594
11257
  onClickClose?: ((args_0: {
11595
11258
  id: string;
11596
11259
  }, ...args: unknown[]) => void) | undefined;
11597
11260
  }, {
11598
- body: UIPanelElementCreate[];
11261
+ id: string;
11599
11262
  type?: "Panel" | undefined;
11600
- id?: string | undefined;
11601
11263
  onCreate?: ((args_0: {
11602
11264
  id: string;
11603
11265
  }, ...args: unknown[]) => void) | undefined;
@@ -11605,6 +11267,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11605
11267
  id: string;
11606
11268
  }, ...args: unknown[]) => void) | undefined;
11607
11269
  title?: string | undefined;
11270
+ body?: UIPanelElementCreate[] | undefined;
11608
11271
  footer?: UIPanelElementCreate[] | undefined;
11609
11272
  onClickClose?: ((args_0: {
11610
11273
  id: string;
@@ -11631,9 +11294,8 @@ declare const CreatePanelParamsSchema: ZodObject<{
11631
11294
  }>]>>;
11632
11295
  }, "strip", ZodTypeAny, {
11633
11296
  panel: {
11634
- body: UIPanelElementCreate[];
11297
+ id: string;
11635
11298
  type?: "Panel" | undefined;
11636
- id?: string | undefined;
11637
11299
  onCreate?: ((args_0: {
11638
11300
  id: string;
11639
11301
  }, ...args: unknown[]) => void) | undefined;
@@ -11641,6 +11303,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11641
11303
  id: string;
11642
11304
  }, ...args: unknown[]) => void) | undefined;
11643
11305
  title?: string | undefined;
11306
+ body?: UIPanelElementCreate[] | undefined;
11644
11307
  footer?: UIPanelElementCreate[] | undefined;
11645
11308
  onClickClose?: ((args_0: {
11646
11309
  id: string;
@@ -11655,9 +11318,8 @@ declare const CreatePanelParamsSchema: ZodObject<{
11655
11318
  } | undefined;
11656
11319
  }, {
11657
11320
  panel: {
11658
- body: UIPanelElementCreate[];
11321
+ id: string;
11659
11322
  type?: "Panel" | undefined;
11660
- id?: string | undefined;
11661
11323
  onCreate?: ((args_0: {
11662
11324
  id: string;
11663
11325
  }, ...args: unknown[]) => void) | undefined;
@@ -11665,6 +11327,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11665
11327
  id: string;
11666
11328
  }, ...args: unknown[]) => void) | undefined;
11667
11329
  title?: string | undefined;
11330
+ body?: UIPanelElementCreate[] | undefined;
11668
11331
  footer?: UIPanelElementCreate[] | undefined;
11669
11332
  onClickClose?: ((args_0: {
11670
11333
  id: string;
@@ -11679,26 +11342,21 @@ declare const CreatePanelParamsSchema: ZodObject<{
11679
11342
  } | undefined;
11680
11343
  }>;
11681
11344
  /**
11682
- * The parameters for adding a panel to the map by using {@link UiController.createPanel}.
11345
+ * The parameters for creating or updating a panel by using {@link UiController.createOrUpdatePanel}.
11683
11346
  *
11684
11347
  * @public
11685
11348
  */
11686
- interface CreatePanelParams extends zInfer<typeof CreatePanelParamsSchema> {
11349
+ interface CreateOrUpdatePanelParams extends zInfer<typeof CreateOrUpdatePanelParamsSchema> {
11687
11350
  /**
11688
11351
  * The panel to add.
11689
11352
  */
11690
- panel: UIPanelCreate;
11353
+ panel: UIPanelCreateOrUpdate;
11691
11354
  /**
11692
11355
  * The placement of the panel on the right sidebar stack.
11693
11356
  *
11694
11357
  * @defaultValue `{ at: "end" }`
11695
11358
  */
11696
- placement?: PlacementForUIElement;
11697
- }
11698
- /**
11699
- * @public
11700
- */
11701
- interface UpdatePanelParams extends Omit<Partial<UIPanelCreate>, "id">, UIElementBase {
11359
+ initialPlacement?: PlacementForUIElement;
11702
11360
  }
11703
11361
  declare const CreatePanelElementsParamsSchema: ZodObject<{
11704
11362
  panelId: ZodString;
@@ -11795,7 +11453,7 @@ interface CreatePanelElementsParams extends zInfer<typeof CreatePanelElementsPar
11795
11453
  /**
11796
11454
  * The section of the panel to add the element to.
11797
11455
  * It can be either one of the top-level sections of the panel (`"body"` or `"footer"`)
11798
- * or a specific container (like `ButtonGroup`) in the panel (`{ id: string }`).
11456
+ * or a specific container (like {@link UIGridContainerElement}) in the panel (`{ id: string }`).
11799
11457
  *
11800
11458
  * @defaultValue `"body"`
11801
11459
  */
@@ -11914,286 +11572,6 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
11914
11572
  id: string;
11915
11573
  }, ...args: unknown[]) => void) | undefined;
11916
11574
  content?: string | undefined;
11917
- }>, ZodObject<{
11918
- type: ZodLiteral<"ButtonGroup">;
11919
- id: ZodString;
11920
- align: ZodOptional<ZodOptional<ZodEnum<["start", "end"]>>>;
11921
- onCreate: ZodOptional<ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11922
- id: ZodString;
11923
- }, "strip", ZodTypeAny, {
11924
- id: string;
11925
- }, {
11926
- id: string;
11927
- }>], ZodUnknown>, ZodVoid>>>;
11928
- onDestroy: ZodOptional<ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11929
- id: ZodString;
11930
- }, "strip", ZodTypeAny, {
11931
- id: string;
11932
- }, {
11933
- id: string;
11934
- }>], ZodUnknown>, ZodVoid>>>;
11935
- items: ZodOptional<ZodArray<ZodUnion<[ZodObject<objectUtil.extendShape<objectUtil.extendShape<objectUtil.extendShape<{
11936
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11937
- id: ZodString;
11938
- }, "strip", ZodTypeAny, {
11939
- id: string;
11940
- }, {
11941
- id: string;
11942
- }>], ZodUnknown>, ZodVoid>>;
11943
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11944
- id: ZodString;
11945
- }, "strip", ZodTypeAny, {
11946
- id: string;
11947
- }, {
11948
- id: string;
11949
- }>], ZodUnknown>, ZodVoid>>;
11950
- }, {
11951
- id: ZodString;
11952
- }>, {
11953
- type: ZodLiteral<"Button">;
11954
- label: ZodString;
11955
- variant: ZodOptional<ZodEnum<["filled", "transparent", "outlined"]>>;
11956
- tint: ZodOptional<ZodEnum<["default", "primary", "accent", "danger"]>>;
11957
- disabled: ZodOptional<ZodBoolean>;
11958
- onClick: ZodFunction<ZodTuple<[ZodObject<{
11959
- id: ZodString;
11960
- }, "strip", ZodTypeAny, {
11961
- id: string;
11962
- }, {
11963
- id: string;
11964
- }>], ZodUnknown>, ZodVoid>;
11965
- }>, {
11966
- id: ZodOptional<ZodString>;
11967
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11968
- id: ZodString;
11969
- }, "strip", ZodTypeAny, {
11970
- id: string;
11971
- }, {
11972
- id: string;
11973
- }>], ZodUnknown>, ZodVoid>>;
11974
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11975
- id: ZodString;
11976
- }, "strip", ZodTypeAny, {
11977
- id: string;
11978
- }, {
11979
- id: string;
11980
- }>], ZodUnknown>, ZodVoid>>;
11981
- }>, "strip", ZodTypeAny, {
11982
- type: "Button";
11983
- label: string;
11984
- onClick: (args_0: {
11985
- id: string;
11986
- }, ...args: unknown[]) => void;
11987
- id?: string | undefined;
11988
- onCreate?: ((args_0: {
11989
- id: string;
11990
- }, ...args: unknown[]) => void) | undefined;
11991
- onDestroy?: ((args_0: {
11992
- id: string;
11993
- }, ...args: unknown[]) => void) | undefined;
11994
- disabled?: boolean | undefined;
11995
- variant?: "filled" | "transparent" | "outlined" | undefined;
11996
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
11997
- }, {
11998
- type: "Button";
11999
- label: string;
12000
- onClick: (args_0: {
12001
- id: string;
12002
- }, ...args: unknown[]) => void;
12003
- id?: string | undefined;
12004
- onCreate?: ((args_0: {
12005
- id: string;
12006
- }, ...args: unknown[]) => void) | undefined;
12007
- onDestroy?: ((args_0: {
12008
- id: string;
12009
- }, ...args: unknown[]) => void) | undefined;
12010
- disabled?: boolean | undefined;
12011
- variant?: "filled" | "transparent" | "outlined" | undefined;
12012
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12013
- }>, ZodObject<objectUtil.extendShape<objectUtil.extendShape<objectUtil.extendShape<{
12014
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
12015
- id: ZodString;
12016
- }, "strip", ZodTypeAny, {
12017
- id: string;
12018
- }, {
12019
- id: string;
12020
- }>], ZodUnknown>, ZodVoid>>;
12021
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
12022
- id: ZodString;
12023
- }, "strip", ZodTypeAny, {
12024
- id: string;
12025
- }, {
12026
- id: string;
12027
- }>], ZodUnknown>, ZodVoid>>;
12028
- }, {
12029
- id: ZodString;
12030
- }>, {
12031
- type: ZodLiteral<"Text">;
12032
- content: ZodString;
12033
- }>, {
12034
- id: ZodOptional<ZodString>;
12035
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
12036
- id: ZodString;
12037
- }, "strip", ZodTypeAny, {
12038
- id: string;
12039
- }, {
12040
- id: string;
12041
- }>], ZodUnknown>, ZodVoid>>;
12042
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
12043
- id: ZodString;
12044
- }, "strip", ZodTypeAny, {
12045
- id: string;
12046
- }, {
12047
- id: string;
12048
- }>], ZodUnknown>, ZodVoid>>;
12049
- }>, "strip", ZodTypeAny, {
12050
- type: "Text";
12051
- content: string;
12052
- id?: string | undefined;
12053
- onCreate?: ((args_0: {
12054
- id: string;
12055
- }, ...args: unknown[]) => void) | undefined;
12056
- onDestroy?: ((args_0: {
12057
- id: string;
12058
- }, ...args: unknown[]) => void) | undefined;
12059
- }, {
12060
- type: "Text";
12061
- content: string;
12062
- id?: string | undefined;
12063
- onCreate?: ((args_0: {
12064
- id: string;
12065
- }, ...args: unknown[]) => void) | undefined;
12066
- onDestroy?: ((args_0: {
12067
- id: string;
12068
- }, ...args: unknown[]) => void) | undefined;
12069
- }>, ZodObject<{
12070
- type: ZodLiteral<"FlexibleSpace">;
12071
- id: ZodOptional<ZodString>;
12072
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
12073
- id: ZodString;
12074
- }, "strip", ZodTypeAny, {
12075
- id: string;
12076
- }, {
12077
- id: string;
12078
- }>], ZodUnknown>, ZodVoid>>;
12079
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
12080
- id: ZodString;
12081
- }, "strip", ZodTypeAny, {
12082
- id: string;
12083
- }, {
12084
- id: string;
12085
- }>], ZodUnknown>, ZodVoid>>;
12086
- }, "strip", ZodTypeAny, {
12087
- type: "FlexibleSpace";
12088
- id?: string | undefined;
12089
- onCreate?: ((args_0: {
12090
- id: string;
12091
- }, ...args: unknown[]) => void) | undefined;
12092
- onDestroy?: ((args_0: {
12093
- id: string;
12094
- }, ...args: unknown[]) => void) | undefined;
12095
- }, {
12096
- type: "FlexibleSpace";
12097
- id?: string | undefined;
12098
- onCreate?: ((args_0: {
12099
- id: string;
12100
- }, ...args: unknown[]) => void) | undefined;
12101
- onDestroy?: ((args_0: {
12102
- id: string;
12103
- }, ...args: unknown[]) => void) | undefined;
12104
- }>]>, "many">>;
12105
- }, UnknownKeysParam, ZodTypeAny, {
12106
- type: "ButtonGroup";
12107
- id: string;
12108
- align?: "start" | "end" | undefined;
12109
- items?: ({
12110
- type: "Button";
12111
- label: string;
12112
- onClick: (args_0: {
12113
- id: string;
12114
- }, ...args: unknown[]) => void;
12115
- id?: string | undefined;
12116
- onCreate?: ((args_0: {
12117
- id: string;
12118
- }, ...args: unknown[]) => void) | undefined;
12119
- onDestroy?: ((args_0: {
12120
- id: string;
12121
- }, ...args: unknown[]) => void) | undefined;
12122
- disabled?: boolean | undefined;
12123
- variant?: "filled" | "transparent" | "outlined" | undefined;
12124
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12125
- } | {
12126
- type: "Text";
12127
- content: string;
12128
- id?: string | undefined;
12129
- onCreate?: ((args_0: {
12130
- id: string;
12131
- }, ...args: unknown[]) => void) | undefined;
12132
- onDestroy?: ((args_0: {
12133
- id: string;
12134
- }, ...args: unknown[]) => void) | undefined;
12135
- } | {
12136
- type: "FlexibleSpace";
12137
- id?: string | undefined;
12138
- onCreate?: ((args_0: {
12139
- id: string;
12140
- }, ...args: unknown[]) => void) | undefined;
12141
- onDestroy?: ((args_0: {
12142
- id: string;
12143
- }, ...args: unknown[]) => void) | undefined;
12144
- })[] | undefined;
12145
- onCreate?: ((args_0: {
12146
- id: string;
12147
- }, ...args: unknown[]) => void) | undefined;
12148
- onDestroy?: ((args_0: {
12149
- id: string;
12150
- }, ...args: unknown[]) => void) | undefined;
12151
- }, {
12152
- type: "ButtonGroup";
12153
- id: string;
12154
- align?: "start" | "end" | undefined;
12155
- items?: ({
12156
- type: "Button";
12157
- label: string;
12158
- onClick: (args_0: {
12159
- id: string;
12160
- }, ...args: unknown[]) => void;
12161
- id?: string | undefined;
12162
- onCreate?: ((args_0: {
12163
- id: string;
12164
- }, ...args: unknown[]) => void) | undefined;
12165
- onDestroy?: ((args_0: {
12166
- id: string;
12167
- }, ...args: unknown[]) => void) | undefined;
12168
- disabled?: boolean | undefined;
12169
- variant?: "filled" | "transparent" | "outlined" | undefined;
12170
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12171
- } | {
12172
- type: "Text";
12173
- content: string;
12174
- id?: string | undefined;
12175
- onCreate?: ((args_0: {
12176
- id: string;
12177
- }, ...args: unknown[]) => void) | undefined;
12178
- onDestroy?: ((args_0: {
12179
- id: string;
12180
- }, ...args: unknown[]) => void) | undefined;
12181
- } | {
12182
- type: "FlexibleSpace";
12183
- id?: string | undefined;
12184
- onCreate?: ((args_0: {
12185
- id: string;
12186
- }, ...args: unknown[]) => void) | undefined;
12187
- onDestroy?: ((args_0: {
12188
- id: string;
12189
- }, ...args: unknown[]) => void) | undefined;
12190
- })[] | undefined;
12191
- onCreate?: ((args_0: {
12192
- id: string;
12193
- }, ...args: unknown[]) => void) | undefined;
12194
- onDestroy?: ((args_0: {
12195
- id: string;
12196
- }, ...args: unknown[]) => void) | undefined;
12197
11575
  }>, ZodObject<{
12198
11576
  type: ZodLiteral<"TextInput">;
12199
11577
  value: ZodOptional<ZodString>;
@@ -12463,11 +11841,11 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12463
11841
  id: string;
12464
11842
  }>], ZodUnknown>, ZodVoid>>>;
12465
11843
  grid: ZodOptional<ZodOptional<ZodString>>;
12466
- items: ZodOptional<ZodType<(UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[], ZodTypeDef, (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[]>>;
11844
+ items: ZodOptional<ZodType<(UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[], ZodTypeDef, (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[]>>;
12467
11845
  }, UnknownKeysParam, ZodTypeAny, {
12468
11846
  type: "Grid";
12469
11847
  id: string;
12470
- items?: (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
11848
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12471
11849
  onCreate?: ((args_0: {
12472
11850
  id: string;
12473
11851
  }, ...args: unknown[]) => void) | undefined;
@@ -12478,7 +11856,7 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12478
11856
  }, {
12479
11857
  type: "Grid";
12480
11858
  id: string;
12481
- items?: (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
11859
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12482
11860
  onCreate?: ((args_0: {
12483
11861
  id: string;
12484
11862
  }, ...args: unknown[]) => void) | undefined;
@@ -12514,52 +11892,6 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12514
11892
  id: string;
12515
11893
  }, ...args: unknown[]) => void) | undefined;
12516
11894
  content?: string | undefined;
12517
- } | {
12518
- type: "ButtonGroup";
12519
- id: string;
12520
- align?: "start" | "end" | undefined;
12521
- items?: ({
12522
- type: "Button";
12523
- label: string;
12524
- onClick: (args_0: {
12525
- id: string;
12526
- }, ...args: unknown[]) => void;
12527
- id?: string | undefined;
12528
- onCreate?: ((args_0: {
12529
- id: string;
12530
- }, ...args: unknown[]) => void) | undefined;
12531
- onDestroy?: ((args_0: {
12532
- id: string;
12533
- }, ...args: unknown[]) => void) | undefined;
12534
- disabled?: boolean | undefined;
12535
- variant?: "filled" | "transparent" | "outlined" | undefined;
12536
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12537
- } | {
12538
- type: "Text";
12539
- content: string;
12540
- id?: string | undefined;
12541
- onCreate?: ((args_0: {
12542
- id: string;
12543
- }, ...args: unknown[]) => void) | undefined;
12544
- onDestroy?: ((args_0: {
12545
- id: string;
12546
- }, ...args: unknown[]) => void) | undefined;
12547
- } | {
12548
- type: "FlexibleSpace";
12549
- id?: string | undefined;
12550
- onCreate?: ((args_0: {
12551
- id: string;
12552
- }, ...args: unknown[]) => void) | undefined;
12553
- onDestroy?: ((args_0: {
12554
- id: string;
12555
- }, ...args: unknown[]) => void) | undefined;
12556
- })[] | undefined;
12557
- onCreate?: ((args_0: {
12558
- id: string;
12559
- }, ...args: unknown[]) => void) | undefined;
12560
- onDestroy?: ((args_0: {
12561
- id: string;
12562
- }, ...args: unknown[]) => void) | undefined;
12563
11895
  } | {
12564
11896
  type: "TextInput";
12565
11897
  id: string;
@@ -12626,7 +11958,7 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12626
11958
  } | {
12627
11959
  type: "Grid";
12628
11960
  id: string;
12629
- items?: (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
11961
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12630
11962
  onCreate?: ((args_0: {
12631
11963
  id: string;
12632
11964
  }, ...args: unknown[]) => void) | undefined;
@@ -12662,52 +11994,6 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12662
11994
  id: string;
12663
11995
  }, ...args: unknown[]) => void) | undefined;
12664
11996
  content?: string | undefined;
12665
- } | {
12666
- type: "ButtonGroup";
12667
- id: string;
12668
- align?: "start" | "end" | undefined;
12669
- items?: ({
12670
- type: "Button";
12671
- label: string;
12672
- onClick: (args_0: {
12673
- id: string;
12674
- }, ...args: unknown[]) => void;
12675
- id?: string | undefined;
12676
- onCreate?: ((args_0: {
12677
- id: string;
12678
- }, ...args: unknown[]) => void) | undefined;
12679
- onDestroy?: ((args_0: {
12680
- id: string;
12681
- }, ...args: unknown[]) => void) | undefined;
12682
- disabled?: boolean | undefined;
12683
- variant?: "filled" | "transparent" | "outlined" | undefined;
12684
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12685
- } | {
12686
- type: "Text";
12687
- content: string;
12688
- id?: string | undefined;
12689
- onCreate?: ((args_0: {
12690
- id: string;
12691
- }, ...args: unknown[]) => void) | undefined;
12692
- onDestroy?: ((args_0: {
12693
- id: string;
12694
- }, ...args: unknown[]) => void) | undefined;
12695
- } | {
12696
- type: "FlexibleSpace";
12697
- id?: string | undefined;
12698
- onCreate?: ((args_0: {
12699
- id: string;
12700
- }, ...args: unknown[]) => void) | undefined;
12701
- onDestroy?: ((args_0: {
12702
- id: string;
12703
- }, ...args: unknown[]) => void) | undefined;
12704
- })[] | undefined;
12705
- onCreate?: ((args_0: {
12706
- id: string;
12707
- }, ...args: unknown[]) => void) | undefined;
12708
- onDestroy?: ((args_0: {
12709
- id: string;
12710
- }, ...args: unknown[]) => void) | undefined;
12711
11997
  } | {
12712
11998
  type: "TextInput";
12713
11999
  id: string;
@@ -12774,7 +12060,7 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12774
12060
  } | {
12775
12061
  type: "Grid";
12776
12062
  id: string;
12777
- items?: (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12063
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12778
12064
  onCreate?: ((args_0: {
12779
12065
  id: string;
12780
12066
  }, ...args: unknown[]) => void) | undefined;
@@ -12813,52 +12099,6 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12813
12099
  id: string;
12814
12100
  }, ...args: unknown[]) => void) | undefined;
12815
12101
  content?: string | undefined;
12816
- } | {
12817
- type: "ButtonGroup";
12818
- id: string;
12819
- align?: "start" | "end" | undefined;
12820
- items?: ({
12821
- type: "Button";
12822
- label: string;
12823
- onClick: (args_0: {
12824
- id: string;
12825
- }, ...args: unknown[]) => void;
12826
- id?: string | undefined;
12827
- onCreate?: ((args_0: {
12828
- id: string;
12829
- }, ...args: unknown[]) => void) | undefined;
12830
- onDestroy?: ((args_0: {
12831
- id: string;
12832
- }, ...args: unknown[]) => void) | undefined;
12833
- disabled?: boolean | undefined;
12834
- variant?: "filled" | "transparent" | "outlined" | undefined;
12835
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12836
- } | {
12837
- type: "Text";
12838
- content: string;
12839
- id?: string | undefined;
12840
- onCreate?: ((args_0: {
12841
- id: string;
12842
- }, ...args: unknown[]) => void) | undefined;
12843
- onDestroy?: ((args_0: {
12844
- id: string;
12845
- }, ...args: unknown[]) => void) | undefined;
12846
- } | {
12847
- type: "FlexibleSpace";
12848
- id?: string | undefined;
12849
- onCreate?: ((args_0: {
12850
- id: string;
12851
- }, ...args: unknown[]) => void) | undefined;
12852
- onDestroy?: ((args_0: {
12853
- id: string;
12854
- }, ...args: unknown[]) => void) | undefined;
12855
- })[] | undefined;
12856
- onCreate?: ((args_0: {
12857
- id: string;
12858
- }, ...args: unknown[]) => void) | undefined;
12859
- onDestroy?: ((args_0: {
12860
- id: string;
12861
- }, ...args: unknown[]) => void) | undefined;
12862
12102
  } | {
12863
12103
  type: "TextInput";
12864
12104
  id: string;
@@ -12925,7 +12165,7 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12925
12165
  } | {
12926
12166
  type: "Grid";
12927
12167
  id: string;
12928
- items?: (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12168
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12929
12169
  onCreate?: ((args_0: {
12930
12170
  id: string;
12931
12171
  }, ...args: unknown[]) => void) | undefined;
@@ -12964,52 +12204,6 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12964
12204
  id: string;
12965
12205
  }, ...args: unknown[]) => void) | undefined;
12966
12206
  content?: string | undefined;
12967
- } | {
12968
- type: "ButtonGroup";
12969
- id: string;
12970
- align?: "start" | "end" | undefined;
12971
- items?: ({
12972
- type: "Button";
12973
- label: string;
12974
- onClick: (args_0: {
12975
- id: string;
12976
- }, ...args: unknown[]) => void;
12977
- id?: string | undefined;
12978
- onCreate?: ((args_0: {
12979
- id: string;
12980
- }, ...args: unknown[]) => void) | undefined;
12981
- onDestroy?: ((args_0: {
12982
- id: string;
12983
- }, ...args: unknown[]) => void) | undefined;
12984
- disabled?: boolean | undefined;
12985
- variant?: "filled" | "transparent" | "outlined" | undefined;
12986
- tint?: "default" | "primary" | "accent" | "danger" | undefined;
12987
- } | {
12988
- type: "Text";
12989
- content: string;
12990
- id?: string | undefined;
12991
- onCreate?: ((args_0: {
12992
- id: string;
12993
- }, ...args: unknown[]) => void) | undefined;
12994
- onDestroy?: ((args_0: {
12995
- id: string;
12996
- }, ...args: unknown[]) => void) | undefined;
12997
- } | {
12998
- type: "FlexibleSpace";
12999
- id?: string | undefined;
13000
- onCreate?: ((args_0: {
13001
- id: string;
13002
- }, ...args: unknown[]) => void) | undefined;
13003
- onDestroy?: ((args_0: {
13004
- id: string;
13005
- }, ...args: unknown[]) => void) | undefined;
13006
- })[] | undefined;
13007
- onCreate?: ((args_0: {
13008
- id: string;
13009
- }, ...args: unknown[]) => void) | undefined;
13010
- onDestroy?: ((args_0: {
13011
- id: string;
13012
- }, ...args: unknown[]) => void) | undefined;
13013
12207
  } | {
13014
12208
  type: "TextInput";
13015
12209
  id: string;
@@ -13076,7 +12270,7 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
13076
12270
  } | {
13077
12271
  type: "Grid";
13078
12272
  id: string;
13079
- items?: (UIButtonElementCreate | UITextElementCreate | UIButtonGroupElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
12273
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[] | undefined;
13080
12274
  onCreate?: ((args_0: {
13081
12275
  id: string;
13082
12276
  }, ...args: unknown[]) => void) | undefined;
@@ -13328,29 +12522,44 @@ interface UiController {
13328
12522
  */
13329
12523
  deleteActionTrigger(id: string): void;
13330
12524
  /**
13331
- * Creates a panel on map's right sidebar.
12525
+ * Creates a panel ID.
12526
+ *
12527
+ * In order to create a panel using {@link createOrUpdatePanel}, you need to create a panel ID first.
12528
+ *
12529
+ * @example
12530
+ * ```typescript
12531
+ * const panelId = await felt.createPanelId();
12532
+ * ```
12533
+ */
12534
+ createPanelId(): Promise<string>;
12535
+ /**
12536
+ * Creates or updates a panel.
12537
+ *
12538
+ * Panels are rendered on map's right sidebar and are useful to extend Felt UI for your own use cases
12539
+ * (e.g. a form, a settings panel, etc.) using Felt UI elements (e.g. Text, Button, etc.).
12540
+ * This way it is possible to cover new use cases while keeping the user experience consistent with the rest of Felt.
13332
12541
  *
13333
- * Panels are useful to extend Felt UI for your own use cases (e.g. a form, a settings panel, etc.)
13334
- * by using Felt UI elements (e.g. Text, Button, etc.). This way the user experience is consistent
13335
- * with the rest of Felt.
12542
+ * A panel is identified by its ID and must come from {@link createPanelId}.
12543
+ * Custom IDs are not supported in order to prevent conflicts with other panels.
13336
12544
  *
13337
12545
  * Panels have two sections:
13338
12546
  * - `body` - Body of the panel, scrollable.
13339
12547
  * - `footer` - It sticks to the bottom of the panel, useful to add submit buttons.
13340
12548
  *
13341
- * By default, the panel will be added to the end of the stack but you can
13342
- * specify a placement to add it at a specific position in the stack.
12549
+ * Regarding panel placement, by default it is added to the end of the panels stack but you can
12550
+ * specify a different placement by using the `initialPlacement` parameter.
12551
+ * This placement cannot be updated later.
13343
12552
  *
13344
- * Once created, you can add elements to the panel by using the {@link createPanelElements} method or
13345
- * perform partial updates of elements by using the {@link updatePanelElements} method.
13346
- *
13347
- * When adding a panel, its id is optional as well as its elements' ids.
13348
- * It is recommended to provide an id for the panel and its elements to make
12553
+ * When adding a panel, its elements' ids are optional though it is recommended to make
13349
12554
  * it easier to update or delete them later.
13350
12555
  *
12556
+ * Once created, you can add elements to the panel by using the {@link createPanelElements} method,
12557
+ * perform partial updates of elements by using the {@link updatePanelElements} method or
12558
+ * delete elements by using the {@link deletePanelElements} method.
12559
+ *
13351
12560
  * @param args - The arguments for the method.
13352
12561
  * @param args.panel - The panel to add.
13353
- * @param args.placement - The placement of the panel. Optional. Defaults to `{ at: "end" }`.
12562
+ * @param args.initialPlacement - The placement of the panel when added. Optional. Defaults to `{ at: "end" }`.
13354
12563
  * - `{ at: "start" }` - Add the panel to the start of the stack.
13355
12564
  * - `{ at: "end" }` - Add the panel to the end of the stack.
13356
12565
  * - `{ after: "panel-1" }` - Add the panel after the panel with the id `panel-1`.
@@ -13358,9 +12567,11 @@ interface UiController {
13358
12567
  *
13359
12568
  * @example
13360
12569
  * ```typescript
13361
- * await felt.createPanel({
12570
+ * const id = await felt.createPanelId();
12571
+ *
12572
+ * await felt.createOrUpdatePanel({
13362
12573
  * panel: {
13363
- * id: "panel-1", // not required but useful for further updates
12574
+ * id,
13364
12575
  * title: "My Panel",
13365
12576
  * body: [
13366
12577
  * {
@@ -13383,32 +12594,11 @@ interface UiController {
13383
12594
  * },
13384
12595
  * ],
13385
12596
  * },
13386
- * placement: { at: "start" }, // add the panel to the start of the stack
13387
- * });
13388
- * ```
13389
- */
13390
- createPanel(args: CreatePanelParams): Promise<UIPanel>;
13391
- /**
13392
- * Updates a panel.
13393
- *
13394
- * Panel to update is identified by the `id` property.
13395
- *
13396
- * @remarks
13397
- * Properties provided will override the existing properties.
13398
- * Override is done at Panel level, so if you want to update a specific element,
13399
- * you need to provide the entire element. For partial updates of elements, use
13400
- * {@link updatePanelElements} instead.
13401
- *
13402
- * @param panel - The panel to update.
13403
- * @example
13404
- * ```typescript
13405
- * await felt.updatePanel({
13406
- * id: "panel-1",
13407
- * title: "A new title for my panel", // only title changes
12597
+ * initialPlacement: { at: "start" }, // when added, the panel will be added to the start of the stack
13408
12598
  * });
13409
12599
  * ```
13410
12600
  */
13411
- updatePanel(panel: UpdatePanelParams): Promise<UIPanel>;
12601
+ createOrUpdatePanel(args: CreateOrUpdatePanelParams): Promise<UIPanel>;
13412
12602
  /**
13413
12603
  * Deletes a panel.
13414
12604
  *
@@ -13444,7 +12634,7 @@ interface UiController {
13444
12634
  * @example
13445
12635
  * ```typescript
13446
12636
  * await felt.createPanelElements({
13447
- * panelId: "panel-1",
12637
+ * panelId,
13448
12638
  * elements: [
13449
12639
  * {
13450
12640
  * element: { type: "Text", content: "Hello, world!" },
@@ -13466,7 +12656,7 @@ interface UiController {
13466
12656
  * @example
13467
12657
  * ```typescript
13468
12658
  * await felt.updatePanelElements({
13469
- * panelId: "panel-1",
12659
+ * panelId,
13470
12660
  * elements: [
13471
12661
  * {
13472
12662
  * element: {
@@ -13489,7 +12679,7 @@ interface UiController {
13489
12679
  * @example
13490
12680
  * ```typescript
13491
12681
  * await felt.deletePanelElements({
13492
- * panelId: "panel-1",
12682
+ * panelId,
13493
12683
  * elements: ["element-1", "element-2"],
13494
12684
  * });
13495
12685
  * ```
@@ -13913,4 +13103,4 @@ interface FeltController extends ViewportController, UiController, LayersControl
13913
13103
  iframe: HTMLIFrameElement | null;
13914
13104
  }
13915
13105
 
13916
- export { type LayerChangeCallbackParams as $, type TextElementUpdate as A, type ElementsController as B, type CircleElementCreate as C, type MapInteractionEvent as D, type Element as E, type FeltController as F, type GetElementGroupsConstraint as G, type HighlighterElementCreate as H, type ImageElementCreate as I, type InteractionsController as J, type CreateLayersFromGeoJsonParams as K, type LinkElementRead as L, type MarkerElementCreate as M, type NoteElementCreate as N, type DataOnlyLayer as O, type PathElementCreate as P, type FeltTiledVectorSource as Q, type GeoJsonDataVectorSource as R, type GeoJsonFileVectorSource as S, type TextElementCreate as T, type UiControlsOptions as U, type ViewportCenterZoom as V, type GeoJsonUrlVectorSource as W, type GetLayerGroupsConstraint as X, type GetLayersConstraint as Y, type GetRenderedFeaturesConstraint as Z, type Layer as _, type CircleElementRead as a, type LngLatTuple as a$, type LayerCommon as a0, type LayerGroup as a1, type LayerGroupChangeCallbackParams as a2, type LayerProcessingStatus as a3, type LegendItem as a4, type LegendItemChangeCallbackParams as a5, type LegendItemIdentifier as a6, type LegendItemsConstraint as a7, type RasterBand as a8, type RasterLayer as a9, type GetLayerCategoriesParams as aA, type GetLayerHistogramBin as aB, type GetLayerHistogramParams as aC, type GetLayerPrecomputedCalculationParams as aD, type GridConfig as aE, type GridType as aF, type MultiAggregationConfig as aG, type PrecomputedAggregationMethod as aH, type ValueConfiguration as aI, type LayersController as aJ, type MapDetails as aK, type MiscController as aL, type ElementGroupNode as aM, type ElementNode as aN, type EntityNode as aO, type FeatureNode as aP, type FeatureSelection as aQ, type LayerGroupNode as aR, type LayerNode as aS, type SelectionController as aT, type FeltBoundary as aU, type FeltZoom as aV, type GeoJsonFeature as aW, type GeoJsonGeometry as aX, type GeoJsonProperties as aY, type LatLng as aZ, type LineStringGeometry as a_, type RasterLayerSource as aa, type UpdateLayerParams as ab, type VectorLayer as ac, type LayerFeature as ad, type RasterValue as ae, type LayerSchema as af, type LayerSchemaAttribute as ag, type LayerSchemaBooleanAttribute as ah, type LayerSchemaCommonAttribute as ai, type LayerSchemaDateAttribute as aj, type LayerSchemaDateTimeAttribute as ak, type LayerSchemaNumericAttribute as al, type LayerSchemaTextAttribute as am, type FilterExpression as an, type FilterLogicGate as ao, type FilterTernary as ap, type Filters as aq, type GeometryFilter as ar, type LayerBoundaries as as, type LayerFilters as at, type AggregatedGridConfig as au, type AggregationConfig as av, type AggregationMethod as aw, type CountGridConfig as ax, type GetLayerCalculationParams as ay, type GetLayerCategoriesGroup as az, type CircleElementUpdate as b, type UIActionTriggerCreate as b$, type MultiLineStringGeometry as b0, type MultiPointGeometry as b1, type MultiPolygonGeometry as b2, type PointGeometry as b3, type PolygonGeometry as b4, type SetVisibilityRequest as b5, type SortConfig as b6, type SortDirection as b7, type CircleToolSettings as b8, type ConfigurableToolType as b9, type UIButtonElement as bA, type UIButtonElementCreate as bB, type UIButtonElementUpdate as bC, type UITextElement as bD, type UITextElementCreate as bE, type UITextElementUpdate as bF, type UIButtonGroupElement as bG, type UIButtonGroupElementCreate as bH, type UIButtonGroupElementUpdate as bI, type UIFlexibleSpaceElement as bJ, type UIFlexibleSpaceElementCreate as bK, type UIFlexibleSpaceElementUpdate as bL, type UIDividerElement as bM, type UIDividerElementCreate as bN, type UIDividerElementUpdate as bO, type UITextInputElement as bP, type UITextInputElementCreate as bQ, type UITextInputElementUpdate as bR, type UISelectElement as bS, type UISelectElementCreate as bT, type UISelectElementUpdate as bU, type UIPanelElement as bV, type UIPanelElementCreate as bW, type UIPanelElementUpdate as bX, type UIGridContainerElement as bY, type UIGridContainerElementCreate as bZ, type UIGridContainerElementUpdate as b_, type HighlighterToolSettings as ba, type InputToolSettings as bb, type LineToolSettings as bc, type MarkerToolSettings as bd, type NoteToolSettings as be, type PinToolSettings as bf, type PlaceFrame as bg, type PlaceSymbol as bh, type PolygonToolSettings as bi, type RouteToolSettings as bj, type TextToolSettings as bk, type ToolSettingsChangeEvent as bl, type ToolSettingsMap as bm, type ToolType as bn, type ToolsController as bo, type CreateActionTriggerParams as bp, type CreatePanelElementsParams as bq, type CreatePanelParams as br, type DeletePanelElementsParams as bs, type UiOnMapInteractionsOptions as bt, type UpdateActionTriggerParams as bu, type UpdatePanelElementsParams as bv, type UpdatePanelParams as bw, type PlacementForUIElement as bx, type UIPanel as by, type UIPanelCreate as bz, type ElementChangeCallbackParams as c, type UiController as c0, type SetViewportCenterZoomParams as c1, type ViewportConstraints as c2, type ViewportFitBoundsParams as c3, type ViewportState as c4, type ViewportController as c5, type UnwrapPromise as c6, uiActionTriggerSchema as c7, type UIPanelElementCreateClonable as c8, uiPanelCreateSchema as c9, type UIButtonElementCreateClonable as ca, type MakeClonableSchema as cb, type UIButtonGroupElementCreateClonable as cc, type PromiseOrNot as cd, type UnionToIntersection as ce, type ElementCreate as d, type ElementGroup as e, type ElementGroupChangeCallbackParams as f, type ElementUpdate as g, type GetElementsConstraint as h, type HighlighterElementRead as i, type HighlighterElementUpdate as j, type ImageElementRead as k, type ImageElementUpdate as l, type MarkerElementRead as m, type MarkerElementUpdate as n, type NoteElementRead as o, type NoteElementUpdate as p, type PathElementRead as q, type PathElementUpdate as r, type PlaceElementCreate as s, type PlaceElementRead as t, type PlaceElementUpdate as u, type PolygonElementCreate as v, type PolygonElementRead as w, type PolygonElementUpdate as x, type TextElementRead as y, type zInfer as z };
13106
+ export { type LayerChangeCallbackParams as $, type TextElementUpdate as A, type ElementsController as B, type CircleElementCreate as C, type MapInteractionEvent as D, type Element as E, type FeltController as F, type GetElementGroupsConstraint as G, type HighlighterElementCreate as H, type ImageElementCreate as I, type InteractionsController as J, type CreateLayersFromGeoJsonParams as K, type LinkElementRead as L, type MarkerElementCreate as M, type NoteElementCreate as N, type DataOnlyLayer as O, type PathElementCreate as P, type FeltTiledVectorSource as Q, type GeoJsonDataVectorSource as R, type GeoJsonFileVectorSource as S, type TextElementCreate as T, type UiControlsOptions as U, type ViewportCenterZoom as V, type GeoJsonUrlVectorSource as W, type GetLayerGroupsConstraint as X, type GetLayersConstraint as Y, type GetRenderedFeaturesConstraint as Z, type Layer as _, type CircleElementRead as a, type LngLatTuple as a$, type LayerCommon as a0, type LayerGroup as a1, type LayerGroupChangeCallbackParams as a2, type LayerProcessingStatus as a3, type LegendItem as a4, type LegendItemChangeCallbackParams as a5, type LegendItemIdentifier as a6, type LegendItemsConstraint as a7, type RasterBand as a8, type RasterLayer as a9, type GetLayerCategoriesParams as aA, type GetLayerHistogramBin as aB, type GetLayerHistogramParams as aC, type GetLayerPrecomputedCalculationParams as aD, type GridConfig as aE, type GridType as aF, type MultiAggregationConfig as aG, type PrecomputedAggregationMethod as aH, type ValueConfiguration as aI, type LayersController as aJ, type MapDetails as aK, type MiscController as aL, type ElementGroupNode as aM, type ElementNode as aN, type EntityNode as aO, type FeatureNode as aP, type FeatureSelection as aQ, type LayerGroupNode as aR, type LayerNode as aS, type SelectionController as aT, type FeltBoundary as aU, type FeltZoom as aV, type GeoJsonFeature as aW, type GeoJsonGeometry as aX, type GeoJsonProperties as aY, type LatLng as aZ, type LineStringGeometry as a_, type RasterLayerSource as aa, type UpdateLayerParams as ab, type VectorLayer as ac, type LayerFeature as ad, type RasterValue as ae, type LayerSchema as af, type LayerSchemaAttribute as ag, type LayerSchemaBooleanAttribute as ah, type LayerSchemaCommonAttribute as ai, type LayerSchemaDateAttribute as aj, type LayerSchemaDateTimeAttribute as ak, type LayerSchemaNumericAttribute as al, type LayerSchemaTextAttribute as am, type FilterExpression as an, type FilterLogicGate as ao, type FilterTernary as ap, type Filters as aq, type GeometryFilter as ar, type LayerBoundaries as as, type LayerFilters as at, type AggregatedGridConfig as au, type AggregationConfig as av, type AggregationMethod as aw, type CountGridConfig as ax, type GetLayerCalculationParams as ay, type GetLayerCategoriesGroup as az, type CircleElementUpdate as b, type ViewportFitBoundsParams as b$, type MultiLineStringGeometry as b0, type MultiPointGeometry as b1, type MultiPolygonGeometry as b2, type PointGeometry as b3, type PolygonGeometry as b4, type SetVisibilityRequest as b5, type SortConfig as b6, type SortDirection as b7, type CircleToolSettings as b8, type ConfigurableToolType as b9, type UIButtonElementCreate as bA, type UIButtonElementUpdate as bB, type UITextElement as bC, type UITextElementCreate as bD, type UITextElementUpdate as bE, type UIFlexibleSpaceElement as bF, type UIFlexibleSpaceElementCreate as bG, type UIFlexibleSpaceElementUpdate as bH, type UIDividerElement as bI, type UIDividerElementCreate as bJ, type UIDividerElementUpdate as bK, type UITextInputElement as bL, type UITextInputElementCreate as bM, type UITextInputElementUpdate as bN, type UISelectElement as bO, type UISelectElementCreate as bP, type UISelectElementUpdate as bQ, type UIPanelElement as bR, type UIPanelElementCreate as bS, type UIPanelElementUpdate as bT, type UIGridContainerElement as bU, type UIGridContainerElementCreate as bV, type UIGridContainerElementUpdate as bW, type UIActionTriggerCreate as bX, type UiController as bY, type SetViewportCenterZoomParams as bZ, type ViewportConstraints as b_, type HighlighterToolSettings as ba, type InputToolSettings as bb, type LineToolSettings as bc, type MarkerToolSettings as bd, type NoteToolSettings as be, type PinToolSettings as bf, type PlaceFrame as bg, type PlaceSymbol as bh, type PolygonToolSettings as bi, type RouteToolSettings as bj, type TextToolSettings as bk, type ToolSettingsChangeEvent as bl, type ToolSettingsMap as bm, type ToolType as bn, type ToolsController as bo, type CreateActionTriggerParams as bp, type CreateOrUpdatePanelParams as bq, type CreatePanelElementsParams as br, type DeletePanelElementsParams as bs, type UiOnMapInteractionsOptions as bt, type UpdateActionTriggerParams as bu, type UpdatePanelElementsParams as bv, type PlacementForUIElement as bw, type UIPanel as bx, type UIPanelCreateOrUpdate as by, type UIButtonElement as bz, type ElementChangeCallbackParams as c, type ViewportState as c0, type ViewportController as c1, type UnwrapPromise as c2, uiActionTriggerSchema as c3, type UIPanelElementCreateClonable as c4, uiPanelCreateSchema as c5, type UIButtonElementCreateClonable as c6, type MakeClonableSchema as c7, type PromiseOrNot as c8, type UnionToIntersection as c9, type ElementCreate as d, type ElementGroup as e, type ElementGroupChangeCallbackParams as f, type ElementUpdate as g, type GetElementsConstraint as h, type HighlighterElementRead as i, type HighlighterElementUpdate as j, type ImageElementRead as k, type ImageElementUpdate as l, type MarkerElementRead as m, type MarkerElementUpdate as n, type NoteElementRead as o, type NoteElementUpdate as p, type PathElementRead as q, type PathElementUpdate as r, type PlaceElementCreate as s, type PlaceElementRead as t, type PlaceElementUpdate as u, type PolygonElementCreate as v, type PolygonElementRead as w, type PolygonElementUpdate as x, type TextElementRead as y, type zInfer as z };