@feltmaps/js-sdk 1.7.0-next.16 → 1.7.0-next.18

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.
@@ -9972,6 +9972,22 @@ declare const uiSelectElementSchema: ZodObject<objectUtil.extendShape<objectUtil
9972
9972
  * ```
9973
9973
  *
9974
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
9975
9991
  * #### with search
9976
9992
  * ```typescript
9977
9993
  * {
@@ -10363,6 +10379,16 @@ type ItemCreateClonableType = Exclude<UIPanelElementCreateClonable, {
10363
10379
  *
10364
10380
  * As part of CSS Grid Layout capabilities it is possible to create a horizontal stack.
10365
10381
  *
10382
+ * #### Alignment & Distribution
10383
+ *
10384
+ * On horizontal stacks, it is possible to align and distribute the items.
10385
+ *
10386
+ * `verticalAlignment` is used to align the items vertically. By default, items are aligned to the top of the container.
10387
+ * It follows the same values as CSS's `align-items` property. See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) for more details.
10388
+ *
10389
+ * `horizontalDistribution` is used to justify the items horizontally. By default, items are justified to the start of the container.
10390
+ * It follows the same values as CSS's `justify-content` property. See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) for more details.
10391
+ *
10366
10392
  * #### Equal width columns
10367
10393
  *
10368
10394
  * <figure>
@@ -10450,6 +10476,20 @@ interface UIGridContainerElement extends UIElementBase {
10450
10476
  *
10451
10477
  */
10452
10478
  grid?: string;
10479
+ /**
10480
+ * The alignment of the items in the grid.
10481
+ * Only takes effect on horizontal stacks.
10482
+ *
10483
+ * @defaultValue `"top"`
10484
+ */
10485
+ verticalAlignment?: "top" | "center" | "bottom";
10486
+ /**
10487
+ * The distribution of the items in the grid.
10488
+ * Only takes effect on horizontal stacks.
10489
+ *
10490
+ * @defaultValue `"start"`
10491
+ */
10492
+ horizontalDistribution?: "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
10453
10493
  /**
10454
10494
  * The items to add to the grid container.
10455
10495
  */
@@ -10521,7 +10561,7 @@ declare const placementForUiElementSchema: ZodUnion<[ZodObject<{
10521
10561
  at: "start" | "end";
10522
10562
  }>]>;
10523
10563
  /**
10524
- * Used in {@link UiController.createPanel} to specify the position of a panel in the stack
10564
+ * Used in {@link UiController.createOrUpdatePanel} to specify the position of a panel in the stack
10525
10565
  * and in {@link UiController.createPanelElements} to specify the position of an element in a panel.
10526
10566
  *
10527
10567
  * In both cases, the default value is `{ at: "end" }`.
@@ -10554,7 +10594,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10554
10594
  /**
10555
10595
  * The elements to add to the panel body.
10556
10596
  */
10557
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
10597
+ body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
10558
10598
  /**
10559
10599
  * The elements to add to the panel footer.
10560
10600
  */
@@ -10569,7 +10609,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10569
10609
  }>, "strip", ZodTypeAny, {
10570
10610
  type: "Panel";
10571
10611
  id: string;
10572
- body: UIPanelElement[];
10573
10612
  onCreate?: ((args_0: {
10574
10613
  id: string;
10575
10614
  }, ...args: unknown[]) => void) | undefined;
@@ -10577,6 +10616,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10577
10616
  id: string;
10578
10617
  }, ...args: unknown[]) => void) | undefined;
10579
10618
  title?: string | undefined;
10619
+ body?: UIPanelElement[] | undefined;
10580
10620
  footer?: UIPanelElement[] | undefined;
10581
10621
  onClickClose?: ((args_0: {
10582
10622
  id: string;
@@ -10584,7 +10624,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10584
10624
  }, {
10585
10625
  type: "Panel";
10586
10626
  id: string;
10587
- body: UIPanelElement[];
10588
10627
  onCreate?: ((args_0: {
10589
10628
  id: string;
10590
10629
  }, ...args: unknown[]) => void) | undefined;
@@ -10592,6 +10631,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10592
10631
  id: string;
10593
10632
  }, ...args: unknown[]) => void) | undefined;
10594
10633
  title?: string | undefined;
10634
+ body?: UIPanelElement[] | undefined;
10595
10635
  footer?: UIPanelElement[] | undefined;
10596
10636
  onClickClose?: ((args_0: {
10597
10637
  id: string;
@@ -10599,7 +10639,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10599
10639
  }>;
10600
10640
  /**
10601
10641
  * Represents a panel in the UI.
10602
- * It can be added to the map by using the {@link UiController.createPanel} method.
10642
+ * It can be added to the map by using the {@link UiController.createOrUpdatePanel} method.
10603
10643
  *
10604
10644
  * A panel is a container for other UI elements.
10605
10645
  * It can have a title, a body, a footer as well as a close button.
@@ -10663,11 +10703,18 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
10663
10703
  * ```
10664
10704
  *
10665
10705
  */
10666
- interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onClickClose" | "body" | "footer" | "onCreate" | "onDestroy"> {
10706
+ interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onClickClose" | "body" | "footer" | "onCreate" | "onDestroy" | "id"> {
10707
+ /**
10708
+ * The ID of the panel obtained from {@link UiController.createPanelId}.
10709
+ *
10710
+ * @remarks
10711
+ * Custom IDs are not supported.
10712
+ */
10713
+ id: string;
10667
10714
  /**
10668
10715
  * The elements to add to the panel body.
10669
10716
  */
10670
- body: UIPanelElement[];
10717
+ body?: UIPanelElement[];
10671
10718
  /**
10672
10719
  * The elements to add to the panel footer.
10673
10720
  */
@@ -10685,7 +10732,7 @@ interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onC
10685
10732
  declare const uiPanelCreateSchema: {
10686
10733
  params: ZodObject<objectUtil.extendShape<Omit<{
10687
10734
  type: ZodOptional<ZodLiteral<"Panel">>;
10688
- id: ZodOptional<ZodString>;
10735
+ id: ZodString;
10689
10736
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10690
10737
  id: ZodString;
10691
10738
  }, "strip", ZodTypeAny, {
@@ -10701,7 +10748,7 @@ declare const uiPanelCreateSchema: {
10701
10748
  id: string;
10702
10749
  }>], ZodUnknown>, ZodVoid>>;
10703
10750
  title: ZodOptional<ZodString>;
10704
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
10751
+ body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
10705
10752
  footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
10706
10753
  onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10707
10754
  id: ZodString;
@@ -10711,12 +10758,11 @@ declare const uiPanelCreateSchema: {
10711
10758
  id: string;
10712
10759
  }>], ZodUnknown>, ZodVoid>>;
10713
10760
  }, "body" | "footer">, {
10714
- body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
10761
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
10715
10762
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
10716
10763
  }>, "strip", ZodTypeAny, {
10717
- body: UIPanelElementCreate[];
10764
+ id: string;
10718
10765
  type?: "Panel" | undefined;
10719
- id?: string | undefined;
10720
10766
  onCreate?: ((args_0: {
10721
10767
  id: string;
10722
10768
  }, ...args: unknown[]) => void) | undefined;
@@ -10724,14 +10770,14 @@ declare const uiPanelCreateSchema: {
10724
10770
  id: string;
10725
10771
  }, ...args: unknown[]) => void) | undefined;
10726
10772
  title?: string | undefined;
10773
+ body?: UIPanelElementCreate[] | undefined;
10727
10774
  footer?: UIPanelElementCreate[] | undefined;
10728
10775
  onClickClose?: ((args_0: {
10729
10776
  id: string;
10730
10777
  }, ...args: unknown[]) => void) | undefined;
10731
10778
  }, {
10732
- body: UIPanelElementCreate[];
10779
+ id: string;
10733
10780
  type?: "Panel" | undefined;
10734
- id?: string | undefined;
10735
10781
  onCreate?: ((args_0: {
10736
10782
  id: string;
10737
10783
  }, ...args: unknown[]) => void) | undefined;
@@ -10739,51 +10785,21 @@ declare const uiPanelCreateSchema: {
10739
10785
  id: string;
10740
10786
  }, ...args: unknown[]) => void) | undefined;
10741
10787
  title?: string | undefined;
10788
+ body?: UIPanelElementCreate[] | undefined;
10742
10789
  footer?: UIPanelElementCreate[] | undefined;
10743
10790
  onClickClose?: ((args_0: {
10744
10791
  id: string;
10745
10792
  }, ...args: unknown[]) => void) | undefined;
10746
10793
  }>;
10747
- clonable: ZodObject<objectUtil.extendShape<objectUtil.extendShape<objectUtil.extendShape<Omit<{
10794
+ clonable: ZodObject<objectUtil.extendShape<{
10748
10795
  type: ZodOptional<ZodLiteral<"Panel">>;
10749
- id: ZodOptional<ZodString>;
10750
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10751
- id: ZodString;
10752
- }, "strip", ZodTypeAny, {
10753
- id: string;
10754
- }, {
10755
- id: string;
10756
- }>], ZodUnknown>, ZodVoid>>;
10757
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10758
- id: ZodString;
10759
- }, "strip", ZodTypeAny, {
10760
- id: string;
10761
- }, {
10762
- id: string;
10763
- }>], ZodUnknown>, ZodVoid>>;
10796
+ id: ZodString;
10797
+ onCreate: ZodOptional<ZodString>;
10798
+ onDestroy: ZodOptional<ZodString>;
10764
10799
  title: ZodOptional<ZodString>;
10765
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
10766
- footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
10767
- onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10768
- id: ZodString;
10769
- }, "strip", ZodTypeAny, {
10770
- id: string;
10771
- }, {
10772
- id: string;
10773
- }>], ZodUnknown>, ZodVoid>>;
10774
- }, "body" | "footer">, {
10775
- body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
10800
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
10776
10801
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
10777
- }>, objectUtil.extendShape<{
10778
- id: ZodOptional<ZodString>;
10779
- onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10780
- id: ZodString;
10781
- }, "strip", ZodTypeAny, {
10782
- id: string;
10783
- }, {
10784
- id: string;
10785
- }>], ZodUnknown>, ZodVoid>>;
10786
- onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10802
+ onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10787
10803
  id: ZodString;
10788
10804
  }, "strip", ZodTypeAny, {
10789
10805
  id: string;
@@ -10791,46 +10807,40 @@ declare const uiPanelCreateSchema: {
10791
10807
  id: string;
10792
10808
  }>], ZodUnknown>, ZodVoid>>;
10793
10809
  }, {
10794
- onCreate: ZodOptional<ZodString>;
10795
- onDestroy: ZodOptional<ZodString>;
10796
- }>>, {
10797
10810
  onClickClose: ZodOptional<ZodString>;
10798
- body: ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">;
10811
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">>;
10799
10812
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">>;
10800
10813
  }>, "strip", ZodTypeAny, {
10801
- body: UIPanelElementCreateClonable[];
10814
+ id: string;
10802
10815
  type?: "Panel" | undefined;
10803
- id?: string | undefined;
10804
10816
  onCreate?: string | undefined;
10805
10817
  onDestroy?: string | undefined;
10806
10818
  title?: string | undefined;
10819
+ body?: UIPanelElementCreateClonable[] | undefined;
10807
10820
  footer?: UIPanelElementCreateClonable[] | undefined;
10808
10821
  onClickClose?: string | undefined;
10809
10822
  }, {
10810
- body: UIPanelElementCreateClonable[];
10823
+ id: string;
10811
10824
  type?: "Panel" | undefined;
10812
- id?: string | undefined;
10813
10825
  onCreate?: string | undefined;
10814
10826
  onDestroy?: string | undefined;
10815
10827
  title?: string | undefined;
10828
+ body?: UIPanelElementCreateClonable[] | undefined;
10816
10829
  footer?: UIPanelElementCreateClonable[] | undefined;
10817
10830
  onClickClose?: string | undefined;
10818
10831
  }>;
10819
10832
  };
10820
10833
  /**
10821
- * The parameters for creating a panel by using {@link UiController.createPanel}.
10834
+ * The parameters for creating a panel by using {@link UiController.createOrUpdatePanel}.
10822
10835
  *
10823
10836
  * @see {@link UIPanel} for more information about panels.
10824
- *
10825
- * @remarks
10826
- * `id` is optional but recommended if you want to be able to perform updates.
10827
10837
  */
10828
- interface UIPanelCreate extends Omit<UIPanel, "id" | "body" | "footer" | "type">, UIElementBaseCreateParams {
10838
+ interface UIPanelCreateOrUpdate extends Omit<UIPanel, "body" | "footer" | "type">, Omit<UIElementBaseCreateParams, "id"> {
10829
10839
  type?: "Panel";
10830
10840
  /**
10831
10841
  * The elements to add to the panel body.
10832
10842
  */
10833
- body: UIPanelElementCreate[];
10843
+ body?: UIPanelElementCreate[];
10834
10844
  /**
10835
10845
  * The elements to add to the panel footer.
10836
10846
  */
@@ -11225,10 +11235,10 @@ declare const UpdateActionTriggerParamsSchema: ZodObject<{
11225
11235
  interface UpdateActionTriggerParams extends Omit<Partial<UIActionTriggerCreate>, "id"> {
11226
11236
  id: zInfer<typeof UpdateActionTriggerParamsSchema>["id"];
11227
11237
  }
11228
- declare const CreatePanelParamsSchema: ZodObject<{
11238
+ declare const CreateOrUpdatePanelParamsSchema: ZodObject<{
11229
11239
  panel: ZodObject<objectUtil.extendShape<Omit<{
11230
11240
  type: ZodOptional<ZodLiteral<"Panel">>;
11231
- id: ZodOptional<ZodString>;
11241
+ id: ZodString;
11232
11242
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11233
11243
  id: ZodString;
11234
11244
  }, "strip", ZodTypeAny, {
@@ -11244,7 +11254,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11244
11254
  id: string;
11245
11255
  }>], ZodUnknown>, ZodVoid>>;
11246
11256
  title: ZodOptional<ZodString>;
11247
- body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">;
11257
+ body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11248
11258
  footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
11249
11259
  onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
11250
11260
  id: ZodString;
@@ -11254,12 +11264,11 @@ declare const CreatePanelParamsSchema: ZodObject<{
11254
11264
  id: string;
11255
11265
  }>], ZodUnknown>, ZodVoid>>;
11256
11266
  }, "body" | "footer">, {
11257
- body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
11267
+ body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11258
11268
  footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
11259
11269
  }>, "strip", ZodTypeAny, {
11260
- body: UIPanelElementCreate[];
11270
+ id: string;
11261
11271
  type?: "Panel" | undefined;
11262
- id?: string | undefined;
11263
11272
  onCreate?: ((args_0: {
11264
11273
  id: string;
11265
11274
  }, ...args: unknown[]) => void) | undefined;
@@ -11267,14 +11276,14 @@ declare const CreatePanelParamsSchema: ZodObject<{
11267
11276
  id: string;
11268
11277
  }, ...args: unknown[]) => void) | undefined;
11269
11278
  title?: string | undefined;
11279
+ body?: UIPanelElementCreate[] | undefined;
11270
11280
  footer?: UIPanelElementCreate[] | undefined;
11271
11281
  onClickClose?: ((args_0: {
11272
11282
  id: string;
11273
11283
  }, ...args: unknown[]) => void) | undefined;
11274
11284
  }, {
11275
- body: UIPanelElementCreate[];
11285
+ id: string;
11276
11286
  type?: "Panel" | undefined;
11277
- id?: string | undefined;
11278
11287
  onCreate?: ((args_0: {
11279
11288
  id: string;
11280
11289
  }, ...args: unknown[]) => void) | undefined;
@@ -11282,6 +11291,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11282
11291
  id: string;
11283
11292
  }, ...args: unknown[]) => void) | undefined;
11284
11293
  title?: string | undefined;
11294
+ body?: UIPanelElementCreate[] | undefined;
11285
11295
  footer?: UIPanelElementCreate[] | undefined;
11286
11296
  onClickClose?: ((args_0: {
11287
11297
  id: string;
@@ -11308,9 +11318,8 @@ declare const CreatePanelParamsSchema: ZodObject<{
11308
11318
  }>]>>;
11309
11319
  }, "strip", ZodTypeAny, {
11310
11320
  panel: {
11311
- body: UIPanelElementCreate[];
11321
+ id: string;
11312
11322
  type?: "Panel" | undefined;
11313
- id?: string | undefined;
11314
11323
  onCreate?: ((args_0: {
11315
11324
  id: string;
11316
11325
  }, ...args: unknown[]) => void) | undefined;
@@ -11318,6 +11327,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11318
11327
  id: string;
11319
11328
  }, ...args: unknown[]) => void) | undefined;
11320
11329
  title?: string | undefined;
11330
+ body?: UIPanelElementCreate[] | undefined;
11321
11331
  footer?: UIPanelElementCreate[] | undefined;
11322
11332
  onClickClose?: ((args_0: {
11323
11333
  id: string;
@@ -11332,9 +11342,8 @@ declare const CreatePanelParamsSchema: ZodObject<{
11332
11342
  } | undefined;
11333
11343
  }, {
11334
11344
  panel: {
11335
- body: UIPanelElementCreate[];
11345
+ id: string;
11336
11346
  type?: "Panel" | undefined;
11337
- id?: string | undefined;
11338
11347
  onCreate?: ((args_0: {
11339
11348
  id: string;
11340
11349
  }, ...args: unknown[]) => void) | undefined;
@@ -11342,6 +11351,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
11342
11351
  id: string;
11343
11352
  }, ...args: unknown[]) => void) | undefined;
11344
11353
  title?: string | undefined;
11354
+ body?: UIPanelElementCreate[] | undefined;
11345
11355
  footer?: UIPanelElementCreate[] | undefined;
11346
11356
  onClickClose?: ((args_0: {
11347
11357
  id: string;
@@ -11356,26 +11366,21 @@ declare const CreatePanelParamsSchema: ZodObject<{
11356
11366
  } | undefined;
11357
11367
  }>;
11358
11368
  /**
11359
- * The parameters for adding a panel to the map by using {@link UiController.createPanel}.
11369
+ * The parameters for creating or updating a panel by using {@link UiController.createOrUpdatePanel}.
11360
11370
  *
11361
11371
  * @public
11362
11372
  */
11363
- interface CreatePanelParams extends zInfer<typeof CreatePanelParamsSchema> {
11373
+ interface CreateOrUpdatePanelParams extends zInfer<typeof CreateOrUpdatePanelParamsSchema> {
11364
11374
  /**
11365
11375
  * The panel to add.
11366
11376
  */
11367
- panel: UIPanelCreate;
11377
+ panel: UIPanelCreateOrUpdate;
11368
11378
  /**
11369
11379
  * The placement of the panel on the right sidebar stack.
11370
11380
  *
11371
11381
  * @defaultValue `{ at: "end" }`
11372
11382
  */
11373
- placement?: PlacementForUIElement;
11374
- }
11375
- /**
11376
- * @public
11377
- */
11378
- interface UpdatePanelParams extends Omit<Partial<UIPanelCreate>, "id">, UIElementBase {
11383
+ initialPlacement?: PlacementForUIElement;
11379
11384
  }
11380
11385
  declare const CreatePanelElementsParamsSchema: ZodObject<{
11381
11386
  panelId: ZodString;
@@ -11860,6 +11865,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
11860
11865
  id: string;
11861
11866
  }>], ZodUnknown>, ZodVoid>>>;
11862
11867
  grid: ZodOptional<ZodOptional<ZodString>>;
11868
+ verticalAlignment: ZodOptional<ZodOptional<ZodEnum<["top", "center", "bottom"]>>>;
11869
+ horizontalDistribution: ZodOptional<ZodOptional<ZodEnum<["start", "center", "end", "space-between", "space-around", "space-evenly"]>>>;
11863
11870
  items: ZodOptional<ZodType<(UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[], ZodTypeDef, (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate)[]>>;
11864
11871
  }, UnknownKeysParam, ZodTypeAny, {
11865
11872
  type: "Grid";
@@ -11872,6 +11879,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
11872
11879
  id: string;
11873
11880
  }, ...args: unknown[]) => void) | undefined;
11874
11881
  grid?: string | undefined;
11882
+ verticalAlignment?: "center" | "top" | "bottom" | undefined;
11883
+ horizontalDistribution?: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly" | undefined;
11875
11884
  }, {
11876
11885
  type: "Grid";
11877
11886
  id: string;
@@ -11883,6 +11892,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
11883
11892
  id: string;
11884
11893
  }, ...args: unknown[]) => void) | undefined;
11885
11894
  grid?: string | undefined;
11895
+ verticalAlignment?: "center" | "top" | "bottom" | undefined;
11896
+ horizontalDistribution?: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly" | undefined;
11886
11897
  }>]>;
11887
11898
  }, "strip", ZodTypeAny, {
11888
11899
  element: {
@@ -11985,6 +11996,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
11985
11996
  id: string;
11986
11997
  }, ...args: unknown[]) => void) | undefined;
11987
11998
  grid?: string | undefined;
11999
+ verticalAlignment?: "center" | "top" | "bottom" | undefined;
12000
+ horizontalDistribution?: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly" | undefined;
11988
12001
  };
11989
12002
  }, {
11990
12003
  element: {
@@ -12087,6 +12100,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12087
12100
  id: string;
12088
12101
  }, ...args: unknown[]) => void) | undefined;
12089
12102
  grid?: string | undefined;
12103
+ verticalAlignment?: "center" | "top" | "bottom" | undefined;
12104
+ horizontalDistribution?: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly" | undefined;
12090
12105
  };
12091
12106
  }>, "many">;
12092
12107
  }, "strip", ZodTypeAny, {
@@ -12192,6 +12207,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12192
12207
  id: string;
12193
12208
  }, ...args: unknown[]) => void) | undefined;
12194
12209
  grid?: string | undefined;
12210
+ verticalAlignment?: "center" | "top" | "bottom" | undefined;
12211
+ horizontalDistribution?: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly" | undefined;
12195
12212
  };
12196
12213
  }[];
12197
12214
  }, {
@@ -12297,6 +12314,8 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12297
12314
  id: string;
12298
12315
  }, ...args: unknown[]) => void) | undefined;
12299
12316
  grid?: string | undefined;
12317
+ verticalAlignment?: "center" | "top" | "bottom" | undefined;
12318
+ horizontalDistribution?: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly" | undefined;
12300
12319
  };
12301
12320
  }[];
12302
12321
  }>;
@@ -12541,29 +12560,44 @@ interface UiController {
12541
12560
  */
12542
12561
  deleteActionTrigger(id: string): void;
12543
12562
  /**
12544
- * Creates a panel on map's right sidebar.
12563
+ * Creates a panel ID.
12564
+ *
12565
+ * In order to create a panel using {@link createOrUpdatePanel}, you need to create a panel ID first.
12566
+ *
12567
+ * @example
12568
+ * ```typescript
12569
+ * const panelId = await felt.createPanelId();
12570
+ * ```
12571
+ */
12572
+ createPanelId(): Promise<string>;
12573
+ /**
12574
+ * Creates or updates a panel.
12575
+ *
12576
+ * Panels are rendered on map's right sidebar and are useful to extend Felt UI for your own use cases
12577
+ * (e.g. a form, a settings panel, etc.) using Felt UI elements (e.g. Text, Button, etc.).
12578
+ * This way it is possible to cover new use cases while keeping the user experience consistent with the rest of Felt.
12545
12579
  *
12546
- * Panels are useful to extend Felt UI for your own use cases (e.g. a form, a settings panel, etc.)
12547
- * by using Felt UI elements (e.g. Text, Button, etc.). This way the user experience is consistent
12548
- * with the rest of Felt.
12580
+ * A panel is identified by its ID and must come from {@link createPanelId}.
12581
+ * Custom IDs are not supported in order to prevent conflicts with other panels.
12549
12582
  *
12550
12583
  * Panels have two sections:
12551
12584
  * - `body` - Body of the panel, scrollable.
12552
12585
  * - `footer` - It sticks to the bottom of the panel, useful to add submit buttons.
12553
12586
  *
12554
- * By default, the panel will be added to the end of the stack but you can
12555
- * specify a placement to add it at a specific position in the stack.
12587
+ * Regarding panel placement, by default it is added to the end of the panels stack but you can
12588
+ * specify a different placement by using the `initialPlacement` parameter.
12589
+ * This placement cannot be updated later.
12556
12590
  *
12557
- * Once created, you can add elements to the panel by using the {@link createPanelElements} method or
12558
- * perform partial updates of elements by using the {@link updatePanelElements} method.
12559
- *
12560
- * When adding a panel, its id is optional as well as its elements' ids.
12561
- * It is recommended to provide an id for the panel and its elements to make
12591
+ * When adding a panel, its elements' ids are optional though it is recommended to make
12562
12592
  * it easier to update or delete them later.
12563
12593
  *
12594
+ * Once created, you can add elements to the panel by using the {@link createPanelElements} method,
12595
+ * perform partial updates of elements by using the {@link updatePanelElements} method or
12596
+ * delete elements by using the {@link deletePanelElements} method.
12597
+ *
12564
12598
  * @param args - The arguments for the method.
12565
12599
  * @param args.panel - The panel to add.
12566
- * @param args.placement - The placement of the panel. Optional. Defaults to `{ at: "end" }`.
12600
+ * @param args.initialPlacement - The placement of the panel when added. Optional. Defaults to `{ at: "end" }`.
12567
12601
  * - `{ at: "start" }` - Add the panel to the start of the stack.
12568
12602
  * - `{ at: "end" }` - Add the panel to the end of the stack.
12569
12603
  * - `{ after: "panel-1" }` - Add the panel after the panel with the id `panel-1`.
@@ -12571,9 +12605,11 @@ interface UiController {
12571
12605
  *
12572
12606
  * @example
12573
12607
  * ```typescript
12574
- * await felt.createPanel({
12608
+ * const id = await felt.createPanelId();
12609
+ *
12610
+ * await felt.createOrUpdatePanel({
12575
12611
  * panel: {
12576
- * id: "panel-1", // not required but useful for further updates
12612
+ * id,
12577
12613
  * title: "My Panel",
12578
12614
  * body: [
12579
12615
  * {
@@ -12596,32 +12632,11 @@ interface UiController {
12596
12632
  * },
12597
12633
  * ],
12598
12634
  * },
12599
- * placement: { at: "start" }, // add the panel to the start of the stack
12600
- * });
12601
- * ```
12602
- */
12603
- createPanel(args: CreatePanelParams): Promise<UIPanel>;
12604
- /**
12605
- * Updates a panel.
12606
- *
12607
- * Panel to update is identified by the `id` property.
12608
- *
12609
- * @remarks
12610
- * Properties provided will override the existing properties.
12611
- * Override is done at Panel level, so if you want to update a specific element,
12612
- * you need to provide the entire element. For partial updates of elements, use
12613
- * {@link updatePanelElements} instead.
12614
- *
12615
- * @param panel - The panel to update.
12616
- * @example
12617
- * ```typescript
12618
- * await felt.updatePanel({
12619
- * id: "panel-1",
12620
- * title: "A new title for my panel", // only title changes
12635
+ * initialPlacement: { at: "start" }, // when added, the panel will be added to the start of the stack
12621
12636
  * });
12622
12637
  * ```
12623
12638
  */
12624
- updatePanel(panel: UpdatePanelParams): Promise<UIPanel>;
12639
+ createOrUpdatePanel(args: CreateOrUpdatePanelParams): Promise<UIPanel>;
12625
12640
  /**
12626
12641
  * Deletes a panel.
12627
12642
  *
@@ -12657,7 +12672,7 @@ interface UiController {
12657
12672
  * @example
12658
12673
  * ```typescript
12659
12674
  * await felt.createPanelElements({
12660
- * panelId: "panel-1",
12675
+ * panelId,
12661
12676
  * elements: [
12662
12677
  * {
12663
12678
  * element: { type: "Text", content: "Hello, world!" },
@@ -12679,7 +12694,7 @@ interface UiController {
12679
12694
  * @example
12680
12695
  * ```typescript
12681
12696
  * await felt.updatePanelElements({
12682
- * panelId: "panel-1",
12697
+ * panelId,
12683
12698
  * elements: [
12684
12699
  * {
12685
12700
  * element: {
@@ -12702,7 +12717,7 @@ interface UiController {
12702
12717
  * @example
12703
12718
  * ```typescript
12704
12719
  * await felt.deletePanelElements({
12705
- * panelId: "panel-1",
12720
+ * panelId,
12706
12721
  * elements: ["element-1", "element-2"],
12707
12722
  * });
12708
12723
  * ```
@@ -13126,4 +13141,4 @@ interface FeltController extends ViewportController, UiController, LayersControl
13126
13141
  iframe: HTMLIFrameElement | null;
13127
13142
  }
13128
13143
 
13129
- 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 ViewportConstraints 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 UIFlexibleSpaceElement as bG, type UIFlexibleSpaceElementCreate as bH, type UIFlexibleSpaceElementUpdate as bI, type UIDividerElement as bJ, type UIDividerElementCreate as bK, type UIDividerElementUpdate as bL, type UITextInputElement as bM, type UITextInputElementCreate as bN, type UITextInputElementUpdate as bO, type UISelectElement as bP, type UISelectElementCreate as bQ, type UISelectElementUpdate as bR, type UIPanelElement as bS, type UIPanelElementCreate as bT, type UIPanelElementUpdate as bU, type UIGridContainerElement as bV, type UIGridContainerElementCreate as bW, type UIGridContainerElementUpdate as bX, type UIActionTriggerCreate as bY, type UiController as bZ, type SetViewportCenterZoomParams 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 ViewportFitBoundsParams as c0, type ViewportState as c1, type ViewportController as c2, type UnwrapPromise as c3, uiActionTriggerSchema as c4, type UIPanelElementCreateClonable as c5, uiPanelCreateSchema as c6, type UIButtonElementCreateClonable as c7, type MakeClonableSchema as c8, type PromiseOrNot as c9, type UnionToIntersection as ca, 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 };
13144
+ 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 };