@mintplayer/web-components 3.7.0 → 3.9.0

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.
@@ -1,16 +1,17 @@
1
1
  import { CoreController as e, LightChildren as t, booleanAttribute as n, numberAttribute as r, props as i, stringAttribute as a } from "../machine/index.mjs";
2
2
  import { LitElement as o, html as s, nothing as c } from "lit";
3
3
  import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
4
- import { splitterCore as u, splitterPanelCore as d, splitterScopedStyles as f } from "@mintplayer/ui-core/splitter";
4
+ import { styleMap as u } from "lit/directives/style-map.js";
5
+ import { splitterCore as d, splitterPanelCore as f, splitterScopedStyles as p } from "@mintplayer/ui-core/splitter";
5
6
  //#region libs/mintplayer-web-components/splitter/src/generated/splitter.view.generated.ts
6
- function p({ view: e, slots: t = {} }) {
7
+ function m({ view: e, slots: t = {} }) {
7
8
  return s`
8
9
  ${t.default === void 0 ? c : t.default}
9
10
  `;
10
11
  }
11
12
  //#endregion
12
13
  //#region libs/mintplayer-web-components/splitter/src/generated/mp-splitter.generated.ts
13
- var m = class extends o {
14
+ var h = class extends o {
14
15
  static {
15
16
  this.properties = {
16
17
  orientation: {
@@ -32,7 +33,7 @@ var m = class extends o {
32
33
  };
33
34
  }
34
35
  #e = new t(this);
35
- #t = new e(this, u, {
36
+ #t = new e(this, d, {
36
37
  idPrefix: "mp-splitter",
37
38
  inputs: () => ({
38
39
  orientation: this.orientation,
@@ -55,7 +56,7 @@ var m = class extends o {
55
56
  this.#e.capture();
56
57
  }
57
58
  render() {
58
- return p({
59
+ return m({
59
60
  ...this.#t.props(),
60
61
  slots: {
61
62
  ...this.#e.slots,
@@ -73,32 +74,52 @@ var m = class extends o {
73
74
  return this.#t.call("resizeDividerBy", e);
74
75
  }
75
76
  };
76
- typeof document < "u" && document.head && l("splitter", f), customElements.get("mp-splitter") || customElements.define("mp-splitter", m);
77
+ typeof document < "u" && document.head && l("splitter", p), customElements.get("mp-splitter") || customElements.define("mp-splitter", h);
77
78
  //#endregion
78
79
  //#region libs/mintplayer-web-components/splitter/src/generated/splitter-panel.view.generated.ts
79
- function h({ view: e, slots: t = {} }) {
80
+ function g({ view: e, slots: t = {} }) {
80
81
  return s`
81
82
  <div data-mps="splitter" ${i(e.divider)}></div>
82
- <div data-mps="splitter" ${i(e.pane)}>
83
+ <div data-mps="splitter" ${i(e.pane)} style=${u(e.paneStyle)}>
83
84
  ${t.default === void 0 ? c : t.default}
84
85
  </div>
85
86
  `;
86
87
  }
87
88
  //#endregion
88
89
  //#region libs/mintplayer-web-components/splitter/src/generated/mp-splitter-panel.generated.ts
89
- var g = class extends o {
90
+ var _ = class extends o {
90
91
  static {
91
- this.properties = { defaultRenderer: { attribute: !1 } };
92
+ this.properties = {
93
+ size: { attribute: !1 },
94
+ minSize: {
95
+ type: Number,
96
+ converter: r(null),
97
+ attribute: "min-size"
98
+ },
99
+ maxSize: {
100
+ type: Number,
101
+ converter: r(null),
102
+ attribute: "max-size"
103
+ },
104
+ defaultRenderer: { attribute: !1 }
105
+ };
92
106
  }
93
107
  #e = new t(this);
94
- #t = new e(this, d, {
108
+ #t = new e(this, f, {
95
109
  idPrefix: "mp-splitter-panel",
96
- inputs: () => ({}),
110
+ inputs: () => ({
111
+ size: this.size,
112
+ minSize: this.minSize,
113
+ maxSize: this.maxSize
114
+ }),
97
115
  hostBag: (e) => ({
98
116
  ...e.view.root,
99
117
  "data-mps": "splitter"
100
118
  })
101
119
  });
120
+ constructor() {
121
+ super(), this.size = null, this.minSize = null, this.maxSize = null;
122
+ }
102
123
  createRenderRoot() {
103
124
  return this;
104
125
  }
@@ -106,7 +127,7 @@ var g = class extends o {
106
127
  this.#e.capture();
107
128
  }
108
129
  render() {
109
- return h({
130
+ return g({
110
131
  ...this.#t.props(),
111
132
  slots: {
112
133
  ...this.#e.slots,
@@ -115,6 +136,6 @@ var g = class extends o {
115
136
  });
116
137
  }
117
138
  };
118
- typeof document < "u" && document.head && l("splitter", f), customElements.get("mp-splitter-panel") || customElements.define("mp-splitter-panel", g);
139
+ typeof document < "u" && document.head && l("splitter", p), customElements.get("mp-splitter-panel") || customElements.define("mp-splitter-panel", _);
119
140
  //#endregion
120
- export { m as n, g as t };
141
+ export { h as n, _ as t };