@kubex/zinc 1.1.154 → 1.1.155

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.
@@ -28460,7 +28460,7 @@
28460
28460
  "text": "object"
28461
28461
  },
28462
28462
  "static": true,
28463
- "default": "{ 'zn-collapsible': ZnCollapsible, 'zn-icon': ZnIcon, 'zn-input': ZnInput, 'zn-page-palette-item': ZnPagePaletteItem, 'zn-page-section-card': ZnPageSectionCard, }"
28463
+ "default": "{ 'zn-collapsible': ZnCollapsible, 'zn-icon': ZnIcon, 'zn-input': ZnInput, 'zn-option': ZnOption, 'zn-page-palette-item': ZnPagePaletteItem, 'zn-page-section-card': ZnPageSectionCard, 'zn-select': ZnSelect, }"
28464
28464
  },
28465
28465
  {
28466
28466
  "kind": "field",
@@ -28527,7 +28527,7 @@
28527
28527
  "text": "string"
28528
28528
  },
28529
28529
  "default": "''",
28530
- "description": "Section type key that must lead the page. The builder hoists an existing section of\nthat type to the top, or inserts an empty one, and pins it there: it can't be\nremoved, reordered or dragged into a slot, and nothing can be dropped above it.\nIts content stays fully editable in the inspector.",
28530
+ "description": "Section type keys that may lead the page, comma separated. The builder hoists an\nexisting section of any of them to the top, or inserts an empty one of the first,\nand pins it there: it can't be removed, reordered or dragged into a slot, and\nnothing can be dropped above it. Its content stays fully editable in the\ninspector, which offers a swap between the allowed types when there is more\nthan one.",
28531
28531
  "attribute": "required-first",
28532
28532
  "reflects": true
28533
28533
  },
@@ -29043,6 +29043,16 @@
29043
29043
  "description": "Id of the section pinned to the top of the page, or null when `required-first`\nis unset. Derived from the state rather than stored on it, so nothing about the\nlock leaks into the persisted config.",
29044
29044
  "readonly": true
29045
29045
  },
29046
+ {
29047
+ "kind": "field",
29048
+ "name": "_requiredFirstTypes",
29049
+ "type": {
29050
+ "text": "string[]"
29051
+ },
29052
+ "privacy": "private",
29053
+ "description": "The types `required-first` allows to lead the page, in the order given.",
29054
+ "readonly": true
29055
+ },
29046
29056
  {
29047
29057
  "kind": "method",
29048
29058
  "name": "_isPinned",
@@ -29061,6 +29071,16 @@
29061
29071
  }
29062
29072
  ]
29063
29073
  },
29074
+ {
29075
+ "kind": "field",
29076
+ "name": "_canUnpin",
29077
+ "type": {
29078
+ "text": "boolean"
29079
+ },
29080
+ "privacy": "private",
29081
+ "description": "Whether the pinned section may be removed: only while another section can take\nthe lead in its place, so the page is never left without one. It stays undraggable\neither way — the replacement arrives by removing this one, not by reordering.",
29082
+ "readonly": true
29083
+ },
29064
29084
  {
29065
29085
  "kind": "field",
29066
29086
  "name": "_firstFreeIndex",
@@ -29088,7 +29108,7 @@
29088
29108
  }
29089
29109
  }
29090
29110
  ],
29091
- "description": "Sections reordered so `required-first` leads the page: an existing section of that\ntype is hoisted to the front, otherwise an empty one is prepended. Returns the\nargument unchanged when there is nothing to do, so callers can compare by identity."
29111
+ "description": "Sections reordered so `required-first` leads the page: an existing section of an\nallowed type is hoisted to the front, otherwise an empty one of the first type is\nprepended. Returns the\nargument unchanged when there is nothing to do, so callers can compare by identity."
29092
29112
  },
29093
29113
  {
29094
29114
  "kind": "method",
@@ -29843,6 +29863,20 @@
29843
29863
  }
29844
29864
  ]
29845
29865
  },
29866
+ {
29867
+ "kind": "method",
29868
+ "name": "_swapPinnedType",
29869
+ "privacy": "private",
29870
+ "parameters": [
29871
+ {
29872
+ "name": "type",
29873
+ "type": {
29874
+ "text": "string"
29875
+ }
29876
+ }
29877
+ ],
29878
+ "description": "Retypes the pinned section, keeping its id, name and data so the copy shared by\nthe allowed types survives; keys the new type has no field for stay unread. The\ninspector form is stamped from the type's template, so it is rebuilt by hand —\nselection has not changed."
29879
+ },
29846
29880
  {
29847
29881
  "kind": "method",
29848
29882
  "name": "_renameSection",
@@ -29901,6 +29935,20 @@
29901
29935
  "name": "_onResizeKey",
29902
29936
  "privacy": "private"
29903
29937
  },
29938
+ {
29939
+ "kind": "method",
29940
+ "name": "_renderSwapControl",
29941
+ "privacy": "private",
29942
+ "parameters": [
29943
+ {
29944
+ "name": "section",
29945
+ "type": {
29946
+ "text": "PageSection"
29947
+ }
29948
+ }
29949
+ ],
29950
+ "description": "Offered on the pinned section alone, and only where there is another type to take."
29951
+ },
29904
29952
  {
29905
29953
  "kind": "method",
29906
29954
  "name": "_renderInspector",
@@ -29967,7 +30015,7 @@
29967
30015
  "text": "string"
29968
30016
  },
29969
30017
  "default": "''",
29970
- "description": "Section type key that must lead the page. The builder hoists an existing section of\nthat type to the top, or inserts an empty one, and pins it there: it can't be\nremoved, reordered or dragged into a slot, and nothing can be dropped above it.\nIts content stays fully editable in the inspector.",
30018
+ "description": "Section type keys that may lead the page, comma separated. The builder hoists an\nexisting section of any of them to the top, or inserts an empty one of the first,\nand pins it there: it can't be removed, reordered or dragged into a slot, and\nnothing can be dropped above it. Its content stays fully editable in the\ninspector, which offers a swap between the allowed types when there is more\nthan one.",
29971
30019
  "fieldName": "requiredFirst"
29972
30020
  },
29973
30021
  {
@@ -53512,7 +53560,7 @@
53512
53560
  "package": {
53513
53561
  "name": "@kubex/zinc",
53514
53562
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
53515
- "version": "1.1.154",
53563
+ "version": "1.1.155",
53516
53564
  "author": "",
53517
53565
  "license": "MIT"
53518
53566
  }
@@ -2993,7 +2993,7 @@
2993
2993
  { "name": "subheading", "values": [] },
2994
2994
  {
2995
2995
  "name": "required-first",
2996
- "description": "Section type key that must lead the page. The builder hoists an existing section of\nthat type to the top, or inserts an empty one, and pins it there: it can't be\nremoved, reordered or dragged into a slot, and nothing can be dropped above it.\nIts content stays fully editable in the inspector.",
2996
+ "description": "Section type keys that may lead the page, comma separated. The builder hoists an\nexisting section of any of them to the top, or inserts an empty one of the first,\nand pins it there: it can't be removed, reordered or dragged into a slot, and\nnothing can be dropped above it. Its content stays fully editable in the\ninspector, which offers a swap between the allowed types when there is more\nthan one.",
2997
2997
  "values": []
2998
2998
  },
2999
2999
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.154",
4
+ "version": "1.1.155",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -7039,7 +7039,7 @@
7039
7039
  },
7040
7040
  {
7041
7041
  "name": "required-first",
7042
- "description": "Section type key that must lead the page. The builder hoists an existing section of\nthat type to the top, or inserts an empty one, and pins it there: it can't be\nremoved, reordered or dragged into a slot, and nothing can be dropped above it.\nIts content stays fully editable in the inspector.",
7042
+ "description": "Section type keys that may lead the page, comma separated. The builder hoists an\nexisting section of any of them to the top, or inserts an empty one of the first,\nand pins it there: it can't be removed, reordered or dragged into a slot, and\nnothing can be dropped above it. Its content stays fully editable in the\ninspector, which offers a swap between the allowed types when there is more\nthan one.",
7043
7043
  "value": { "type": "string", "default": "''" }
7044
7044
  },
7045
7045
  {
@@ -7103,7 +7103,7 @@
7103
7103
  { "name": "subheading", "type": "string" },
7104
7104
  {
7105
7105
  "name": "requiredFirst",
7106
- "description": "Section type key that must lead the page. The builder hoists an existing section of\nthat type to the top, or inserts an empty one, and pins it there: it can't be\nremoved, reordered or dragged into a slot, and nothing can be dropped above it.\nIts content stays fully editable in the inspector.",
7106
+ "description": "Section type keys that may lead the page, comma separated. The builder hoists an\nexisting section of any of them to the top, or inserts an empty one of the first,\nand pins it there: it can't be removed, reordered or dragged into a slot, and\nnothing can be dropped above it. Its content stays fully editable in the\ninspector, which offers a swap between the allowed types when there is more\nthan one.",
7107
7107
  "type": "string"
7108
7108
  },
7109
7109
  {
package/dist/zn.d.ts CHANGED
@@ -11696,8 +11696,10 @@ declare module "components/page-builder/page-builder.component" {
11696
11696
  import ZnCollapsible from "components/collapsible/index";
11697
11697
  import ZnIcon from "components/icon/index";
11698
11698
  import ZnInput from "components/input/index";
11699
+ import ZnOption from "components/option/index";
11699
11700
  import ZnPagePaletteItem from "components/page-builder/modules/page-palette-item/index";
11700
11701
  import ZnPageSectionCard from "components/page-builder/modules/page-section-card/index";
11702
+ import ZnSelect from "components/select/index";
11701
11703
  /**
11702
11704
  * @summary A config-driven page composer: a palette of predefined section types, a linear
11703
11705
  * canvas of section cards, and an inspector for editing each section's content.
@@ -11737,8 +11739,10 @@ declare module "components/page-builder/page-builder.component" {
11737
11739
  'zn-collapsible': typeof ZnCollapsible;
11738
11740
  'zn-icon': typeof ZnIcon;
11739
11741
  'zn-input': typeof ZnInput;
11742
+ 'zn-option': typeof ZnOption;
11740
11743
  'zn-page-palette-item': typeof ZnPagePaletteItem;
11741
11744
  'zn-page-section-card': typeof ZnPageSectionCard;
11745
+ 'zn-select': typeof ZnSelect;
11742
11746
  };
11743
11747
  private readonly formControlController;
11744
11748
  /** The name of the control, submitted as a name/value pair with form data. */
@@ -11750,10 +11754,12 @@ declare module "components/page-builder/page-builder.component" {
11750
11754
  heading: string;
11751
11755
  subheading: string;
11752
11756
  /**
11753
- * Section type key that must lead the page. The builder hoists an existing section of
11754
- * that type to the top, or inserts an empty one, and pins it there: it can't be
11755
- * removed, reordered or dragged into a slot, and nothing can be dropped above it.
11756
- * Its content stays fully editable in the inspector.
11757
+ * Section type keys that may lead the page, comma separated. The builder hoists an
11758
+ * existing section of any of them to the top, or inserts an empty one of the first,
11759
+ * and pins it there: it can't be removed, reordered or dragged into a slot, and
11760
+ * nothing can be dropped above it. Its content stays fully editable in the
11761
+ * inspector, which offers a swap between the allowed types when there is more
11762
+ * than one.
11757
11763
  */
11758
11764
  requiredFirst: string;
11759
11765
  /** Section types to make available, registered into the internal registry. */
@@ -11870,12 +11876,21 @@ declare module "components/page-builder/page-builder.component" {
11870
11876
  * lock leaks into the persisted config.
11871
11877
  */
11872
11878
  private get _pinnedId();
11879
+ /** The types `required-first` allows to lead the page, in the order given. */
11880
+ private get _requiredFirstTypes();
11873
11881
  private _isPinned;
11882
+ /**
11883
+ * Whether the pinned section may be removed: only while another section can take
11884
+ * the lead in its place, so the page is never left without one. It stays undraggable
11885
+ * either way — the replacement arrives by removing this one, not by reordering.
11886
+ */
11887
+ private get _canUnpin();
11874
11888
  /** Lowest top-level index a section may be added or moved to. */
11875
11889
  private get _firstFreeIndex();
11876
11890
  /**
11877
- * Sections reordered so `required-first` leads the page: an existing section of that
11878
- * type is hoisted to the front, otherwise an empty one is prepended. Returns the
11891
+ * Sections reordered so `required-first` leads the page: an existing section of an
11892
+ * allowed type is hoisted to the front, otherwise an empty one of the first type is
11893
+ * prepended. Returns the
11879
11894
  * argument unchanged when there is nothing to do, so callers can compare by identity.
11880
11895
  */
11881
11896
  private _requireFirst;
@@ -11971,12 +11986,21 @@ declare module "components/page-builder/page-builder.component" {
11971
11986
  /** Handles change/input events bubbling from stamped form controls. */
11972
11987
  private _onInspectorInput;
11973
11988
  private _updateSectionData;
11989
+ /**
11990
+ * Retypes the pinned section, keeping its id, name and data so the copy shared by
11991
+ * the allowed types survives; keys the new type has no field for stay unread. The
11992
+ * inspector form is stamped from the type's template, so it is rebuilt by hand —
11993
+ * selection has not changed.
11994
+ */
11995
+ private _swapPinnedType;
11974
11996
  private _renameSection;
11975
11997
  /** Width the inspector may be dragged to, against the builder's own width. */
11976
11998
  private _clampInspector;
11977
11999
  private _inspectorRect;
11978
12000
  private _onResizeStart;
11979
12001
  private _onResizeKey;
12002
+ /** Offered on the pinned section alone, and only where there is another type to take. */
12003
+ private _renderSwapControl;
11980
12004
  private _renderInspector;
11981
12005
  render(): import("lit-html").TemplateResult<1>;
11982
12006
  }