@breadstone/mosaik-elements-svelte 0.0.65 → 0.0.67
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.
- package/CHANGELOG.md +118 -0
- package/README.md +66 -0
- package/{flow-D-0MTYCm.mjs → flow-gcpXucZv.mjs} +35 -37
- package/index.mjs +31479 -32133
- package/package.json +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
## 0.0.67 (2025-06-26)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.66 (2025-06-25)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 0.0.65 (2025-06-25)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
13
|
+
## 0.0.64 (2025-06-25)
|
|
14
|
+
|
|
15
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
16
|
+
|
|
17
|
+
## 0.0.63 (2025-06-24)
|
|
18
|
+
|
|
19
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
20
|
+
|
|
21
|
+
## 0.0.62 (2025-06-24)
|
|
22
|
+
|
|
23
|
+
### 🚀 Features
|
|
24
|
+
|
|
25
|
+
- add slot definitions for Jumbotron component and update related documentation ([b739040f6f](https://github.com/RueDeRennes/mosaik/commit/b739040f6f))
|
|
26
|
+
|
|
27
|
+
## 0.0.61 (2025-06-24)
|
|
28
|
+
|
|
29
|
+
### 🚀 Features
|
|
30
|
+
|
|
31
|
+
- Add formatter property to Jumbotron components and update related files ([9ae59c7ff9](https://github.com/RueDeRennes/mosaik/commit/9ae59c7ff9))
|
|
32
|
+
|
|
33
|
+
## 0.0.60 (2025-06-23)
|
|
34
|
+
|
|
35
|
+
### 🚀 Features
|
|
36
|
+
|
|
37
|
+
- Add Jumbotron component and related styles for multiple frameworks ([41d4601e08](https://github.com/RueDeRennes/mosaik/commit/41d4601e08))
|
|
38
|
+
|
|
39
|
+
## 0.0.59 (2025-06-23)
|
|
40
|
+
|
|
41
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
42
|
+
|
|
43
|
+
## 0.0.58 (2025-06-23)
|
|
44
|
+
|
|
45
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
46
|
+
|
|
47
|
+
## 0.0.57 (2025-06-23)
|
|
48
|
+
|
|
49
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
50
|
+
|
|
51
|
+
## 0.0.56 (2025-06-23)
|
|
52
|
+
|
|
53
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
54
|
+
|
|
55
|
+
## 0.0.55 (2025-06-23)
|
|
56
|
+
|
|
57
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
58
|
+
|
|
59
|
+
## 0.0.54 (2025-06-23)
|
|
60
|
+
|
|
61
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
62
|
+
|
|
63
|
+
## 0.0.53 (2025-06-23)
|
|
64
|
+
|
|
65
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
66
|
+
|
|
67
|
+
## 0.0.52 (2025-06-23)
|
|
68
|
+
|
|
69
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
70
|
+
|
|
71
|
+
## 0.0.51 (2025-06-23)
|
|
72
|
+
|
|
73
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
74
|
+
|
|
75
|
+
## 0.0.50 (2025-06-23)
|
|
76
|
+
|
|
77
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
78
|
+
|
|
79
|
+
## 0.0.49 (2025-06-22)
|
|
80
|
+
|
|
81
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
82
|
+
|
|
83
|
+
## 0.0.48 (2025-06-22)
|
|
84
|
+
|
|
85
|
+
### 🚀 Features
|
|
86
|
+
|
|
87
|
+
- Introduce Indicator component across multiple frameworks ([7ef850c39d](https://github.com/RueDeRennes/mosaik/commit/7ef850c39d))
|
|
88
|
+
|
|
89
|
+
## 0.0.47 (2025-06-22)
|
|
90
|
+
|
|
91
|
+
### 🩹 Fixes
|
|
92
|
+
|
|
93
|
+
- update release version to 0.0.47 in package.json ([5a277d2d1d](https://github.com/RueDeRennes/mosaik/commit/5a277d2d1d))
|
|
94
|
+
- correct spelling of 'HTML' in keywords and add new article on `part` attributes ([cd5b688a5c](https://github.com/RueDeRennes/mosaik/commit/cd5b688a5c))
|
|
95
|
+
- correct quotation marks in attribute selector examples for consistency ([078a6c9289](https://github.com/RueDeRennes/mosaik/commit/078a6c9289))
|
|
96
|
+
- correct quotation marks in markdown article and improve blockquote rendering in MarkdownRenderer ([09442e4509](https://github.com/RueDeRennes/mosaik/commit/09442e4509))
|
|
97
|
+
|
|
98
|
+
## 0.0.46 (2025-06-20)
|
|
99
|
+
|
|
100
|
+
### 🚀 Features
|
|
101
|
+
|
|
102
|
+
- implement animation directive and provider with presets ([09550b6633](https://github.com/RueDeRennes/mosaik/commit/09550b6633))
|
|
103
|
+
|
|
104
|
+
## 0.0.45 (2025-06-20)
|
|
105
|
+
|
|
106
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
107
|
+
|
|
108
|
+
## 0.0.44 (2025-06-20)
|
|
109
|
+
|
|
110
|
+
This was a version bump only for mosaik-elements-svelte to align it with other projects, there were no code changes.
|
|
111
|
+
|
|
112
|
+
## 0.0.43 (2025-06-20)
|
|
113
|
+
|
|
114
|
+
### 🚀 Features
|
|
115
|
+
|
|
116
|
+
- Add Svelte menu items to AppSideNavTemplate and update build script ([d1a2fe7972](https://github.com/RueDeRennes/mosaik/commit/d1a2fe7972))
|
|
117
|
+
- Add Svelte support with SvelteCodeGenerator and update build scripts ([955cb75cb6](https://github.com/RueDeRennes/mosaik/commit/955cb75cb6))
|
|
118
|
+
- Add new Svelte components for menu, segment, tab, table, tree, wizard, and shell ([e6de8f0553](https://github.com/RueDeRennes/mosaik/commit/e6de8f0553))
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# 📦 @breadstone/mosaik-elements-svelte
|
|
2
|
+
|
|
3
|
+
| Package Status | Source |
|
|
4
|
+
|----------------|--------|
|
|
5
|
+
| [](https://www.npmjs.com/package/@breadstone/mosaik-elements-svelte) | [libs/mosaik-elements-svelte](../../libs/mosaik-elements-svelte) |
|
|
6
|
+
|
|
7
|
+
> Svelte bindings for the Mosaik web components.
|
|
8
|
+
> Use Mosaik design system components in Svelte projects with full type safety and integration.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 📁 Project Structure
|
|
13
|
+
|
|
14
|
+
Part of the monorepo [`mosaik`](https://github.com/RueDeRennes/mosaik)
|
|
15
|
+
Package path: `libs/mosaik-elements-svelte`
|
|
16
|
+
Version: see [npm](https://www.npmjs.com/package/@breadstone/mosaik-elements-svelte)
|
|
17
|
+
License: MIT
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 📦 Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yarn add @breadstone/mosaik-elements-svelte
|
|
25
|
+
# or
|
|
26
|
+
npm install @breadstone/mosaik-elements-svelte
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🔧 Usage
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import * from '@breadstone/mosaik-elements-svelte';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## ⚙️ Features
|
|
40
|
+
|
|
41
|
+
- Svelte wrappers for all Mosaik web components
|
|
42
|
+
- TypeScript types and Svelte components
|
|
43
|
+
- Automatic manifest and proxy generation
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🛠 Recommendations
|
|
48
|
+
|
|
49
|
+
- Use with the main `mosaik-elements` package for full design system support.
|
|
50
|
+
- Integrate into Svelte projects for seamless web component usage.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 📦 Publishing
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
yarn nx run mosaik-elements-svelte:publish
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 📄 License
|
|
63
|
+
|
|
64
|
+
MIT © Breadstone
|
|
65
|
+
|
|
66
|
+
---
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
class g {
|
|
7
7
|
constructor(i) {
|
|
8
|
-
this._map = /* @__PURE__ */ new Map(), this._roundAverageSize = !1, this.totalSize = 0,
|
|
8
|
+
this._map = /* @__PURE__ */ new Map(), this._roundAverageSize = !1, this.totalSize = 0, i?.roundAverageSize === !0 && (this._roundAverageSize = !0);
|
|
9
9
|
}
|
|
10
10
|
set(i, t) {
|
|
11
11
|
const s = this._map.get(i) || 0;
|
|
@@ -30,8 +30,8 @@ class g {
|
|
|
30
30
|
* Copyright 2021 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
32
|
*/
|
|
33
|
-
function f(
|
|
34
|
-
return
|
|
33
|
+
function f(n) {
|
|
34
|
+
return n === "horizontal" ? "width" : "height";
|
|
35
35
|
}
|
|
36
36
|
class d {
|
|
37
37
|
_getDefaultConfig() {
|
|
@@ -178,23 +178,23 @@ class d {
|
|
|
178
178
|
* that support virtualization in two dimensions.
|
|
179
179
|
*/
|
|
180
180
|
_calculateScrollIntoViewPosition(i) {
|
|
181
|
-
const { block: t } = i, s = Math.min(this.items.length, Math.max(0, i.index)),
|
|
182
|
-
let
|
|
181
|
+
const { block: t } = i, s = Math.min(this.items.length, Math.max(0, i.index)), e = this._getItemPosition(s)[this._positionDim];
|
|
182
|
+
let h = e;
|
|
183
183
|
if (t !== "start") {
|
|
184
|
-
const
|
|
184
|
+
const o = this._getItemSize(s)[this._sizeDim];
|
|
185
185
|
if (t === "center")
|
|
186
|
-
|
|
186
|
+
h = e - 0.5 * this._viewDim1 + 0.5 * o;
|
|
187
187
|
else {
|
|
188
|
-
const
|
|
188
|
+
const l = e - this._viewDim1 + o;
|
|
189
189
|
if (t === "end")
|
|
190
|
-
|
|
190
|
+
h = l;
|
|
191
191
|
else {
|
|
192
192
|
const r = this._scrollPosition;
|
|
193
|
-
|
|
193
|
+
h = Math.abs(r - e) < Math.abs(r - l) ? e : l;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
return
|
|
197
|
+
return h += this.offsetWithinScroller[this._positionDim], this._clampScrollPosition(h);
|
|
198
198
|
}
|
|
199
199
|
getScrollIntoViewCoordinates(i) {
|
|
200
200
|
return {
|
|
@@ -272,17 +272,17 @@ class d {
|
|
|
272
272
|
* Copyright 2021 Google LLC
|
|
273
273
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
274
274
|
*/
|
|
275
|
-
function m(
|
|
276
|
-
return
|
|
275
|
+
function m(n) {
|
|
276
|
+
return n === "horizontal" ? "marginLeft" : "marginTop";
|
|
277
277
|
}
|
|
278
|
-
function u(
|
|
279
|
-
return
|
|
278
|
+
function u(n) {
|
|
279
|
+
return n === "horizontal" ? "marginRight" : "marginBottom";
|
|
280
280
|
}
|
|
281
|
-
function S(
|
|
282
|
-
return
|
|
281
|
+
function S(n) {
|
|
282
|
+
return n === "horizontal" ? "xOffset" : "yOffset";
|
|
283
283
|
}
|
|
284
|
-
function z(
|
|
285
|
-
const t = [
|
|
284
|
+
function z(n, i) {
|
|
285
|
+
const t = [n, i].sort();
|
|
286
286
|
return t[1] <= 0 ? Math.min(...t) : t[0] >= 0 ? Math.max(...t) : t[0] + t[1];
|
|
287
287
|
}
|
|
288
288
|
class p {
|
|
@@ -290,15 +290,14 @@ class p {
|
|
|
290
290
|
this._childSizeCache = new g(), this._marginSizeCache = new g(), this._metricsCache = /* @__PURE__ */ new Map();
|
|
291
291
|
}
|
|
292
292
|
update(i, t) {
|
|
293
|
-
var h, n;
|
|
294
293
|
const s = /* @__PURE__ */ new Set();
|
|
295
|
-
Object.keys(i).forEach((
|
|
296
|
-
const
|
|
297
|
-
this._metricsCache.set(
|
|
294
|
+
Object.keys(i).forEach((e) => {
|
|
295
|
+
const h = Number(e);
|
|
296
|
+
this._metricsCache.set(h, i[h]), this._childSizeCache.set(h, i[h][f(t)]), s.add(h), s.add(h + 1);
|
|
298
297
|
});
|
|
299
|
-
for (const
|
|
300
|
-
const
|
|
301
|
-
this._marginSizeCache.set(
|
|
298
|
+
for (const e of s) {
|
|
299
|
+
const h = this._metricsCache.get(e)?.[m(t)] || 0, o = this._metricsCache.get(e - 1)?.[u(t)] || 0;
|
|
300
|
+
this._marginSizeCache.set(e, z(h, o));
|
|
302
301
|
}
|
|
303
302
|
}
|
|
304
303
|
get averageChildSize() {
|
|
@@ -314,8 +313,7 @@ class p {
|
|
|
314
313
|
return this._marginSizeCache.totalSize;
|
|
315
314
|
}
|
|
316
315
|
getLeadingMarginValue(i, t) {
|
|
317
|
-
|
|
318
|
-
return ((s = this._metricsCache.get(i)) == null ? void 0 : s[m(t)]) || 0;
|
|
316
|
+
return this._metricsCache.get(i)?.[m(t)] || 0;
|
|
319
317
|
}
|
|
320
318
|
getChildSize(i) {
|
|
321
319
|
return this._childSizeCache.getSize(i);
|
|
@@ -393,10 +391,10 @@ class M extends d {
|
|
|
393
391
|
return this._calculateAnchor(i, t);
|
|
394
392
|
if (this._last < 0)
|
|
395
393
|
return this._calculateAnchor(i, t);
|
|
396
|
-
const s = this._getPhysicalItem(this._first),
|
|
397
|
-
if (
|
|
394
|
+
const s = this._getPhysicalItem(this._first), e = this._getPhysicalItem(this._last), h = s.pos;
|
|
395
|
+
if (e.pos + this._metricsCache.getChildSize(this._last) < i)
|
|
398
396
|
return this._calculateAnchor(i, t);
|
|
399
|
-
if (
|
|
397
|
+
if (h > t)
|
|
400
398
|
return this._calculateAnchor(i, t);
|
|
401
399
|
let r = this._firstVisible - 1, a = -1 / 0;
|
|
402
400
|
for (; a < i; )
|
|
@@ -434,12 +432,12 @@ class M extends d {
|
|
|
434
432
|
return;
|
|
435
433
|
}
|
|
436
434
|
(this._anchorIdx === null || this._anchorPos === null) && (this._anchorIdx = this._getAnchor(t, s), this._anchorPos = this._getPosition(this._anchorIdx));
|
|
437
|
-
let
|
|
438
|
-
|
|
439
|
-
const
|
|
440
|
-
this._anchorIdx === 0 && (this._anchorPos =
|
|
441
|
-
let
|
|
442
|
-
for (this._anchorPos +
|
|
435
|
+
let e = this._getSize(this._anchorIdx);
|
|
436
|
+
e === void 0 && (this._stable = !1, e = this._getAverageSize());
|
|
437
|
+
const h = this._metricsCache.getMarginSize(this._anchorIdx) ?? this._metricsCache.averageMarginSize, o = this._metricsCache.getMarginSize(this._anchorIdx + 1) ?? this._metricsCache.averageMarginSize;
|
|
438
|
+
this._anchorIdx === 0 && (this._anchorPos = h), this._anchorIdx === this.items.length - 1 && (this._anchorPos = this._scrollSize - o - e);
|
|
439
|
+
let l = 0;
|
|
440
|
+
for (this._anchorPos + e + o < t && (l = t - (this._anchorPos + e + o)), this._anchorPos - h > s && (l = s - (this._anchorPos - h)), l && (this._scrollPosition -= l, t -= l, s -= l, this._scrollError += l), i.set(this._anchorIdx, { pos: this._anchorPos, size: e }), this._first = this._last = this._anchorIdx, this._physicalMin = this._anchorPos - h, this._physicalMax = this._anchorPos + e + o; this._physicalMin > t && this._first > 0; ) {
|
|
443
441
|
let a = this._getSize(--this._first);
|
|
444
442
|
a === void 0 && (this._stable = !1, a = this._getAverageSize());
|
|
445
443
|
let _ = this._metricsCache.getMarginSize(this._first);
|