@breadstone/mosaik-elements-svelte 0.0.230 → 0.0.232
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 +61 -0
- package/flow-BYP4Q42j.mjs +396 -0
- package/index.mjs +145231 -156991
- package/package.json +3 -4
- package/flow-qEL7lfCR.mjs +0 -493
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
## 0.0.232 (2026-04-25)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **secrets-vercel-sync:** implement secrets synchronization from providers to Vercel ([09906bfba4](https://github.com/RueDeRennes/mosaik/commit/09906bfba4))
|
|
6
|
+
- **app:** add AppView and AppViewStyle for Mosaik Studio ([2fe81e7079](https://github.com/RueDeRennes/mosaik/commit/2fe81e7079))
|
|
7
|
+
- **marquee:** update article card rendering and enhance TOON format integration ([4ff2f3de21](https://github.com/RueDeRennes/mosaik/commit/4ff2f3de21))
|
|
8
|
+
- **doppler): add command configuration for Doppler integration chore(dependencies:** update archipel platform packages to version 0.0.16 ([a88f0921d9](https://github.com/RueDeRennes/mosaik/commit/a88f0921d9))
|
|
9
|
+
- **deployment:** enable corepack in install script for mosaik-blog ([0be6666537](https://github.com/RueDeRennes/mosaik/commit/0be6666537))
|
|
10
|
+
- **blog): initialize blog app with TypeScript, Vite, and ESLint configuration feat(blog): add Vercel configuration for deployment feat(blog): implement production and development Vite configurations refactor(routes): remove DocsService and related routes from RoutesService refactor(app): update AppBar and SideNav to link to external blog URL refactor(views): remove ArticlesView and related templates refactor(controllers): clean up SideNav filter controllers by removing DocsService references chore(static-content): remove static content plugin and related interfaces chore(package:** update dependencies and scripts for blog app ([2694db201b](https://github.com/RueDeRennes/mosaik/commit/2694db201b))
|
|
11
|
+
- **mcp:** implement McpThemeRegistrar for theme generation and validation tools ([75773f0d88](https://github.com/RueDeRennes/mosaik/commit/75773f0d88))
|
|
12
|
+
- **projects:** implement multi-page support in ProjectService and related components ([a77c6f1154](https://github.com/RueDeRennes/mosaik/commit/a77c6f1154))
|
|
13
|
+
- **nx-tasks): add executor for generating package documentation with TypeDoc feat(nx-tasks): create schema for generate-package-docs executor options feat(nx-tasks): implement markdown processing utilities for TypeDoc output feat(nx-tasks): add valid HTML tags for markdown processing chore(projects): configure docs-package executor for multiple libraries chore(deps:** update dependencies for TypeDoc and markdown processing ([bdac227dd0](https://github.com/RueDeRennes/mosaik/commit/bdac227dd0))
|
|
14
|
+
- **table): add caption slot and allColumnsHidden property to DataTable and Table components feat(table): implement banner for hidden columns in DataTable with actions fix(table): adjust CSS for caption and banner styling across themes refactor(table:** update DataTable and TableColumnEditor components to support new properties ([fa231e0faa](https://github.com/RueDeRennes/mosaik/commit/fa231e0faa))
|
|
15
|
+
- **table:** add multi-sort mode and display sort index in header cells ([3cb5241ab3](https://github.com/RueDeRennes/mosaik/commit/3cb5241ab3))
|
|
16
|
+
- **data-table, table, table-header-cell, table-column-editor:** add intl property for internationalization support ([11edb0198e](https://github.com/RueDeRennes/mosaik/commit/11edb0198e))
|
|
17
|
+
- **table:** enhance column visibility and styling for better UX ([f2d458ccc6](https://github.com/RueDeRennes/mosaik/commit/f2d458ccc6))
|
|
18
|
+
- **data-table): enhance IDataTableElementProps with new properties and update themes feat(table-header-cell): add hideable, autoSizeable, and columnChoosable props feat(icons): add new icons for column actions and update existing ones fix(data-table:** bind new properties in Svelte and Vue components ([fbb6e0d297](https://github.com/RueDeRennes/mosaik/commit/fbb6e0d297))
|
|
19
|
+
- **table:** implement pinable feature and enhance column management in table components ([29c66318c5](https://github.com/RueDeRennes/mosaik/commit/29c66318c5))
|
|
20
|
+
- **table:** add TableColumnEditor component and related events for column management ([79bc9b0414](https://github.com/RueDeRennes/mosaik/commit/79bc9b0414))
|
|
21
|
+
- **table:** add column pinning and resizing functionality with styles and events ([edfbcf86d7](https://github.com/RueDeRennes/mosaik/commit/edfbcf86d7))
|
|
22
|
+
- **theme:** update action bar and table components for Joy and Memphis themes ([584bd94fd7](https://github.com/RueDeRennes/mosaik/commit/584bd94fd7))
|
|
23
|
+
- **table:** add selection modes and types, enhance styling for selected and alternating rows ([57f5b6e71b](https://github.com/RueDeRennes/mosaik/commit/57f5b6e71b))
|
|
24
|
+
- **playwright-guidelines:** add Playwright test writing guidelines document ([27bf34e023](https://github.com/RueDeRennes/mosaik/commit/27bf34e023))
|
|
25
|
+
- **designer-canvas): add interaction mode for panning and cursor style docs(mosaik-wizard): enhance dir and lang property descriptions docs(mosaik-wrap): improve dir and lang property descriptions chore(cspell): add new words for artboard, pannable, and zoomable fix(designer-canvas): update cursor styles for interaction modes refactor(designer-canvas:** reorganize imports and improve code structure ([712697b80a](https://github.com/RueDeRennes/mosaik/commit/712697b80a))
|
|
26
|
+
- **designer): implement Save As Recipe dialog and functionality feat(designer): add hidden-preview class for conditional visibility fix(expander): update slot names for header and sub-header components style(playground:** correct layout spacing variable name ([5135485994](https://github.com/RueDeRennes/mosaik/commit/5135485994))
|
|
27
|
+
- **design:** add print styles for studio and designer views, include toggled event in components ([4125a87f02](https://github.com/RueDeRennes/mosaik/commit/4125a87f02))
|
|
28
|
+
- **tile:** add Tile component for React, Svelte, and Vue with theme support ([0d58f0594e](https://github.com/RueDeRennes/mosaik/commit/0d58f0594e))
|
|
29
|
+
- **code-editor:** add language support and themes for CodeMirror integration ([f96840827e](https://github.com/RueDeRennes/mosaik/commit/f96840827e))
|
|
30
|
+
- **typewriter:** add TypewriterElement component with typing animation effect ([4824c9048e](https://github.com/RueDeRennes/mosaik/commit/4824c9048e))
|
|
31
|
+
- **shared/mosaik-meta:** add vitest configuration and migration tools for components ([1e3c8f5f9c](https://github.com/RueDeRennes/mosaik/commit/1e3c8f5f9c))
|
|
32
|
+
- **styles:** add shared styles and update package dependencies ([8c63e6d5e8](https://github.com/RueDeRennes/mosaik/commit/8c63e6d5e8))
|
|
33
|
+
- **icons:** update fluent icons ([8d2104dfcf](https://github.com/RueDeRennes/mosaik/commit/8d2104dfcf))
|
|
34
|
+
- **studio): add Vite configuration and TypeScript support for Mosaik Studio feat(studio): implement localization plugin and update build settings feat(studio): enhance AppBarTemplate with designer navigation link feat(studio): add new hero images for landing pages fix(studio): correct HTML structure in carousel and wizard components style(studio): update background styles for designer canvas themes fix(studio): adjust split element thumb positioning in themes chore(studio:** update dependencies and add vitest configuration ([1eb81044ad](https://github.com/RueDeRennes/mosaik/commit/1eb81044ad))
|
|
35
|
+
- **designer): add Svelte and Vue components for designer layout and functionality feat(themes:** create tokens and JSON configurations for designer components in multiple themes ([447a42cf59](https://github.com/RueDeRennes/mosaik/commit/447a42cf59))
|
|
36
|
+
- **actionbar:** add ActionbarSeparatorComponent and related theme tokens ([813fe9918f](https://github.com/RueDeRennes/mosaik/commit/813fe9918f))
|
|
37
|
+
- **callout): update CalloutProcessor to support dynamic titles and content parsing feat(card): add CardProcessor for card layout with header, sub-header, and variant support test(card): implement tests for CardProcessor to validate various card formats feat(code-block): enhance CodeBlockProcessor to escape HTML and handle filename metadata test(code-block): add tests for CodeBlockProcessor to ensure proper rendering and escaping feat(details): introduce DetailsProcessor for collapsible sections with markdown support test(details): create tests for DetailsProcessor to validate details block rendering feat(split): implement SplitProcessor for creating split layouts with variant support test(split): add tests for SplitProcessor to ensure correct rendering and variant handling feat(steps): add StepsProcessor for vertical stepper layout with numbered steps test(steps): implement tests for StepsProcessor to validate step rendering and numbering feat(tab): introduce TabProcessor for tabbed content layout with variant support test(tab): add tests for TabProcessor to ensure correct tab rendering and content parsing fix(html:** improve html template function to handle null values correctly ([af7c11013b](https://github.com/RueDeRennes/mosaik/commit/af7c11013b))
|
|
38
|
+
- **progress-bar): enhance indeterminate state with elastic animation and style adjustments feat(progress-ring): add elastic animations for indeterminate state and improve styling fix(segment): ensure mutual exclusivity of selected items on click feat(tab-strip): implement anticipation effect for tab selection with pointer events style(breadcrumb-item): set border style to none for consistency style(checkbox): update border style to none for cleaner appearance style(choice-group): change border style to none for uniformity style(drop-zone): modify border style to dashed for visual distinction style(file-upload): adjust border style to none for a streamlined look style(radio-group): set border style to none for a cohesive design style(rating): update border style to none for aesthetic consistency fix(scheduler-event:** correct hover background color to match theme ([bc6b86cad4](https://github.com/RueDeRennes/mosaik/commit/bc6b86cad4))
|
|
39
|
+
- **api): define DEFAULT_GITHUB_REF for fetching content in GitHubContentService refactor(button): remove link part from button component and update templates docs(button): update documentation to reflect removal of link part in button feat(sandbox): add JSX support and update dependencies for Vite and Angular feat(getStarted): add MCP tools for framework guide and starter template fix(llms): simplify llms plugin file handling and remove unnecessary copying style(button:** clean up button themes by removing link styles ([8ac25a2f7a](https://github.com/RueDeRennes/mosaik/commit/8ac25a2f7a))
|
|
40
|
+
- **split-element:** add double-click functionality to expand collapsed panel ([78ff6ee475](https://github.com/RueDeRennes/mosaik/commit/78ff6ee475))
|
|
41
|
+
- **message-box:** enhance styling and properties for improved customization and themes ([4e097cadfd](https://github.com/RueDeRennes/mosaik/commit/4e097cadfd))
|
|
42
|
+
- **button:** add PressButton component with events and styles for multiple frameworks ([59dedda1f9](https://github.com/RueDeRennes/mosaik/commit/59dedda1f9))
|
|
43
|
+
- **diagram): enhance node styling and graph rendering with inheritance levels feat(meta): update graph method to return class hierarchy levels refactor(graph): improve graph rendering logic and add findNodeByLabel method fix(buttons): update button samples to include ripple effect and correct properties chore(cspell:** add new words for spell checking ([d947b4cd9b](https://github.com/RueDeRennes/mosaik/commit/d947b4cd9b))
|
|
44
|
+
|
|
45
|
+
### 🩹 Fixes
|
|
46
|
+
|
|
47
|
+
- **dependencies:** update breadstone packages to version 0.0.10 ([de299ae898](https://github.com/RueDeRennes/mosaik/commit/de299ae898))
|
|
48
|
+
- **auth:** update dependencies and refactor GitHub authentication strategy ([174d27920f](https://github.com/RueDeRennes/mosaik/commit/174d27920f))
|
|
49
|
+
- **projects:** add missing newlines in project.json files and update .gitignore ([8a9cc36342](https://github.com/RueDeRennes/mosaik/commit/8a9cc36342))
|
|
50
|
+
- **buttons): unify background property usage and adjust opacity values fix(toast): implement progress fill animation and update styles for consistency style(toast): update CSS variables for progress fill color across themes refactor(toast:** remove intervalTick property and related logic from ToastElement ([0dbbbcd78d](https://github.com/RueDeRennes/mosaik/commit/0dbbbcd78d))
|
|
51
|
+
- **tokens:** update ripple duration from 200ms to 0.20s across multiple components ([dbe821713f](https://github.com/RueDeRennes/mosaik/commit/dbe821713f))
|
|
52
|
+
|
|
53
|
+
## 0.0.231 (2026-03-14)
|
|
54
|
+
|
|
55
|
+
### 🚀 Features
|
|
56
|
+
|
|
57
|
+
- **cli:** integrate CliParser for improved argument parsing and build scripts ([23b1773dce](https://github.com/RueDeRennes/mosaik/commit/23b1773dce))
|
|
58
|
+
- **buttons): add ripple prop to button components and related updates feat(components): implement ripple behavior in various components fix(theme:** remove duplicate ripple property in theme JSON files ([d31f695f82](https://github.com/RueDeRennes/mosaik/commit/d31f695f82))
|
|
59
|
+
- **McpToolRegistrar): add overview and framework guide tools with enhanced descriptions feat(package:** update dependencies across multiple packages to latest versions ([45bc8fb4f6](https://github.com/RueDeRennes/mosaik/commit/45bc8fb4f6))
|
|
60
|
+
- **Button, Banner:** add shadow properties and update related styles and tokens ([5d69398b19](https://github.com/RueDeRennes/mosaik/commit/5d69398b19))
|
|
61
|
+
|
|
1
62
|
## 0.0.230 (2026-03-12)
|
|
2
63
|
|
|
3
64
|
### 🚀 Features
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
//#region ../../node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js
|
|
2
|
+
var e = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
this._map = /* @__PURE__ */ new Map(), this._roundAverageSize = !1, this.totalSize = 0, e?.roundAverageSize === !0 && (this._roundAverageSize = !0);
|
|
5
|
+
}
|
|
6
|
+
set(e, t) {
|
|
7
|
+
let n = this._map.get(e) || 0;
|
|
8
|
+
this._map.set(e, t), this.totalSize += t - n;
|
|
9
|
+
}
|
|
10
|
+
get averageSize() {
|
|
11
|
+
if (this._map.size > 0) {
|
|
12
|
+
let e = this.totalSize / this._map.size;
|
|
13
|
+
return this._roundAverageSize ? Math.round(e) : e;
|
|
14
|
+
}
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
getSize(e) {
|
|
18
|
+
return this._map.get(e);
|
|
19
|
+
}
|
|
20
|
+
clear() {
|
|
21
|
+
this._map.clear(), this.totalSize = 0;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region ../../node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js
|
|
26
|
+
function t(e) {
|
|
27
|
+
return e === "horizontal" ? "width" : "height";
|
|
28
|
+
}
|
|
29
|
+
var n = class {
|
|
30
|
+
_getDefaultConfig() {
|
|
31
|
+
return { direction: "vertical" };
|
|
32
|
+
}
|
|
33
|
+
constructor(e, t) {
|
|
34
|
+
this._latestCoords = {
|
|
35
|
+
left: 0,
|
|
36
|
+
top: 0
|
|
37
|
+
}, this._direction = null, this._viewportSize = {
|
|
38
|
+
width: 0,
|
|
39
|
+
height: 0
|
|
40
|
+
}, this.totalScrollSize = {
|
|
41
|
+
width: 0,
|
|
42
|
+
height: 0
|
|
43
|
+
}, this.offsetWithinScroller = {
|
|
44
|
+
left: 0,
|
|
45
|
+
top: 0
|
|
46
|
+
}, this._pendingReflow = !1, this._pendingLayoutUpdate = !1, this._pin = null, this._firstVisible = 0, this._lastVisible = 0, this._physicalMin = 0, this._physicalMax = 0, this._first = -1, this._last = -1, this._sizeDim = "height", this._secondarySizeDim = "width", this._positionDim = "top", this._secondaryPositionDim = "left", this._scrollPosition = 0, this._scrollError = 0, this._items = [], this._scrollSize = 1, this._overhang = 1e3, this._hostSink = e, Promise.resolve().then(() => this.config = t || this._getDefaultConfig());
|
|
47
|
+
}
|
|
48
|
+
set config(e) {
|
|
49
|
+
Object.assign(this, Object.assign({}, this._getDefaultConfig(), e));
|
|
50
|
+
}
|
|
51
|
+
get config() {
|
|
52
|
+
return { direction: this.direction };
|
|
53
|
+
}
|
|
54
|
+
get items() {
|
|
55
|
+
return this._items;
|
|
56
|
+
}
|
|
57
|
+
set items(e) {
|
|
58
|
+
this._setItems(e);
|
|
59
|
+
}
|
|
60
|
+
_setItems(e) {
|
|
61
|
+
e !== this._items && (this._items = e, this._scheduleReflow());
|
|
62
|
+
}
|
|
63
|
+
get direction() {
|
|
64
|
+
return this._direction;
|
|
65
|
+
}
|
|
66
|
+
set direction(e) {
|
|
67
|
+
e = e === "horizontal" ? e : "vertical", e !== this._direction && (this._direction = e, this._sizeDim = e === "horizontal" ? "width" : "height", this._secondarySizeDim = e === "horizontal" ? "height" : "width", this._positionDim = e === "horizontal" ? "left" : "top", this._secondaryPositionDim = e === "horizontal" ? "top" : "left", this._triggerReflow());
|
|
68
|
+
}
|
|
69
|
+
get viewportSize() {
|
|
70
|
+
return this._viewportSize;
|
|
71
|
+
}
|
|
72
|
+
set viewportSize(e) {
|
|
73
|
+
let { _viewDim1: t, _viewDim2: n } = this;
|
|
74
|
+
Object.assign(this._viewportSize, e), n === this._viewDim2 ? t !== this._viewDim1 && this._checkThresholds() : this._scheduleLayoutUpdate();
|
|
75
|
+
}
|
|
76
|
+
get viewportScroll() {
|
|
77
|
+
return this._latestCoords;
|
|
78
|
+
}
|
|
79
|
+
set viewportScroll(e) {
|
|
80
|
+
Object.assign(this._latestCoords, e);
|
|
81
|
+
let t = this._scrollPosition;
|
|
82
|
+
this._scrollPosition = this._latestCoords[this._positionDim], Math.abs(t - this._scrollPosition) >= 1 && this._checkThresholds();
|
|
83
|
+
}
|
|
84
|
+
reflowIfNeeded(e = !1) {
|
|
85
|
+
(e || this._pendingReflow) && (this._pendingReflow = !1, this._reflow());
|
|
86
|
+
}
|
|
87
|
+
set pin(e) {
|
|
88
|
+
this._pin = e, this._triggerReflow();
|
|
89
|
+
}
|
|
90
|
+
get pin() {
|
|
91
|
+
if (this._pin !== null) {
|
|
92
|
+
let { index: e, block: t } = this._pin;
|
|
93
|
+
return {
|
|
94
|
+
index: Math.max(0, Math.min(e, this.items.length - 1)),
|
|
95
|
+
block: t
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
_clampScrollPosition(e) {
|
|
101
|
+
return Math.max(-this.offsetWithinScroller[this._positionDim], Math.min(e, this.totalScrollSize[t(this.direction)] - this._viewDim1));
|
|
102
|
+
}
|
|
103
|
+
unpin() {
|
|
104
|
+
this._pin !== null && (this._sendUnpinnedMessage(), this._pin = null);
|
|
105
|
+
}
|
|
106
|
+
_updateLayout() {}
|
|
107
|
+
get _viewDim1() {
|
|
108
|
+
return this._viewportSize[this._sizeDim];
|
|
109
|
+
}
|
|
110
|
+
get _viewDim2() {
|
|
111
|
+
return this._viewportSize[this._secondarySizeDim];
|
|
112
|
+
}
|
|
113
|
+
_scheduleReflow() {
|
|
114
|
+
this._pendingReflow = !0;
|
|
115
|
+
}
|
|
116
|
+
_scheduleLayoutUpdate() {
|
|
117
|
+
this._pendingLayoutUpdate = !0, this._scheduleReflow();
|
|
118
|
+
}
|
|
119
|
+
_triggerReflow() {
|
|
120
|
+
this._scheduleLayoutUpdate(), Promise.resolve().then(() => this.reflowIfNeeded());
|
|
121
|
+
}
|
|
122
|
+
_reflow() {
|
|
123
|
+
this._pendingLayoutUpdate &&= (this._updateLayout(), !1), this._updateScrollSize(), this._setPositionFromPin(), this._getActiveItems(), this._updateVisibleIndices(), this._sendStateChangedMessage();
|
|
124
|
+
}
|
|
125
|
+
_setPositionFromPin() {
|
|
126
|
+
if (this.pin !== null) {
|
|
127
|
+
let e = this._scrollPosition, { index: t, block: n } = this.pin;
|
|
128
|
+
this._scrollPosition = this._calculateScrollIntoViewPosition({
|
|
129
|
+
index: t,
|
|
130
|
+
block: n || "start"
|
|
131
|
+
}) - this.offsetWithinScroller[this._positionDim], this._scrollError = e - this._scrollPosition;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
_calculateScrollIntoViewPosition(e) {
|
|
135
|
+
let { block: t } = e, n = Math.min(this.items.length, Math.max(0, e.index)), r = this._getItemPosition(n)[this._positionDim], i = r;
|
|
136
|
+
if (t !== "start") {
|
|
137
|
+
let e = this._getItemSize(n)[this._sizeDim];
|
|
138
|
+
if (t === "center") i = r - .5 * this._viewDim1 + .5 * e;
|
|
139
|
+
else {
|
|
140
|
+
let n = r - this._viewDim1 + e;
|
|
141
|
+
if (t === "end") i = n;
|
|
142
|
+
else {
|
|
143
|
+
let e = this._scrollPosition;
|
|
144
|
+
i = Math.abs(e - r) < Math.abs(e - n) ? r : n;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return i += this.offsetWithinScroller[this._positionDim], this._clampScrollPosition(i);
|
|
149
|
+
}
|
|
150
|
+
getScrollIntoViewCoordinates(e) {
|
|
151
|
+
return { [this._positionDim]: this._calculateScrollIntoViewPosition(e) };
|
|
152
|
+
}
|
|
153
|
+
_sendUnpinnedMessage() {
|
|
154
|
+
this._hostSink({ type: "unpinned" });
|
|
155
|
+
}
|
|
156
|
+
_sendVisibilityChangedMessage() {
|
|
157
|
+
this._hostSink({
|
|
158
|
+
type: "visibilityChanged",
|
|
159
|
+
firstVisible: this._firstVisible,
|
|
160
|
+
lastVisible: this._lastVisible
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
_sendStateChangedMessage() {
|
|
164
|
+
let e = /* @__PURE__ */ new Map();
|
|
165
|
+
if (this._first !== -1 && this._last !== -1) for (let t = this._first; t <= this._last; t++) e.set(t, this._getItemPosition(t));
|
|
166
|
+
let t = {
|
|
167
|
+
type: "stateChanged",
|
|
168
|
+
scrollSize: {
|
|
169
|
+
[this._sizeDim]: this._scrollSize,
|
|
170
|
+
[this._secondarySizeDim]: null
|
|
171
|
+
},
|
|
172
|
+
range: {
|
|
173
|
+
first: this._first,
|
|
174
|
+
last: this._last,
|
|
175
|
+
firstVisible: this._firstVisible,
|
|
176
|
+
lastVisible: this._lastVisible
|
|
177
|
+
},
|
|
178
|
+
childPositions: e
|
|
179
|
+
};
|
|
180
|
+
this._scrollError &&= (t.scrollError = {
|
|
181
|
+
[this._positionDim]: this._scrollError,
|
|
182
|
+
[this._secondaryPositionDim]: 0
|
|
183
|
+
}, 0), this._hostSink(t);
|
|
184
|
+
}
|
|
185
|
+
get _num() {
|
|
186
|
+
return this._first === -1 || this._last === -1 ? 0 : this._last - this._first + 1;
|
|
187
|
+
}
|
|
188
|
+
_checkThresholds() {
|
|
189
|
+
if (this._viewDim1 === 0 && this._num > 0 || this._pin !== null) this._scheduleReflow();
|
|
190
|
+
else {
|
|
191
|
+
let e = Math.max(0, this._scrollPosition - this._overhang), t = Math.min(this._scrollSize, this._scrollPosition + this._viewDim1 + this._overhang);
|
|
192
|
+
this._physicalMin > e || this._physicalMax < t ? this._scheduleReflow() : this._updateVisibleIndices({ emit: !0 });
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
_updateVisibleIndices(e) {
|
|
196
|
+
if (this._first === -1 || this._last === -1) return;
|
|
197
|
+
let t = this._first;
|
|
198
|
+
for (; t < this._last && Math.round(this._getItemPosition(t)[this._positionDim] + this._getItemSize(t)[this._sizeDim]) <= Math.round(this._scrollPosition);) t++;
|
|
199
|
+
let n = this._last;
|
|
200
|
+
for (; n > this._first && Math.round(this._getItemPosition(n)[this._positionDim]) >= Math.round(this._scrollPosition + this._viewDim1);) n--;
|
|
201
|
+
(t !== this._firstVisible || n !== this._lastVisible) && (this._firstVisible = t, this._lastVisible = n, e && e.emit && this._sendVisibilityChangedMessage());
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region ../../node_modules/@lit-labs/virtualizer/layouts/flow.js
|
|
206
|
+
function r(e) {
|
|
207
|
+
return e === "horizontal" ? "marginLeft" : "marginTop";
|
|
208
|
+
}
|
|
209
|
+
function i(e) {
|
|
210
|
+
return e === "horizontal" ? "marginRight" : "marginBottom";
|
|
211
|
+
}
|
|
212
|
+
function a(e) {
|
|
213
|
+
return e === "horizontal" ? "xOffset" : "yOffset";
|
|
214
|
+
}
|
|
215
|
+
function o(e, t) {
|
|
216
|
+
let n = [e, t].sort();
|
|
217
|
+
return n[1] <= 0 ? Math.min(...n) : n[0] >= 0 ? Math.max(...n) : n[0] + n[1];
|
|
218
|
+
}
|
|
219
|
+
var s = class {
|
|
220
|
+
constructor() {
|
|
221
|
+
this._childSizeCache = new e(), this._marginSizeCache = new e(), this._metricsCache = /* @__PURE__ */ new Map();
|
|
222
|
+
}
|
|
223
|
+
update(e, n) {
|
|
224
|
+
let a = /* @__PURE__ */ new Set();
|
|
225
|
+
Object.keys(e).forEach((r) => {
|
|
226
|
+
let i = Number(r);
|
|
227
|
+
this._metricsCache.set(i, e[i]), this._childSizeCache.set(i, e[i][t(n)]), a.add(i), a.add(i + 1);
|
|
228
|
+
});
|
|
229
|
+
for (let e of a) {
|
|
230
|
+
let t = this._metricsCache.get(e)?.[r(n)] || 0, a = this._metricsCache.get(e - 1)?.[i(n)] || 0;
|
|
231
|
+
this._marginSizeCache.set(e, o(t, a));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
get averageChildSize() {
|
|
235
|
+
return this._childSizeCache.averageSize;
|
|
236
|
+
}
|
|
237
|
+
get totalChildSize() {
|
|
238
|
+
return this._childSizeCache.totalSize;
|
|
239
|
+
}
|
|
240
|
+
get averageMarginSize() {
|
|
241
|
+
return this._marginSizeCache.averageSize;
|
|
242
|
+
}
|
|
243
|
+
get totalMarginSize() {
|
|
244
|
+
return this._marginSizeCache.totalSize;
|
|
245
|
+
}
|
|
246
|
+
getLeadingMarginValue(e, t) {
|
|
247
|
+
return this._metricsCache.get(e)?.[r(t)] || 0;
|
|
248
|
+
}
|
|
249
|
+
getChildSize(e) {
|
|
250
|
+
return this._childSizeCache.getSize(e);
|
|
251
|
+
}
|
|
252
|
+
getMarginSize(e) {
|
|
253
|
+
return this._marginSizeCache.getSize(e);
|
|
254
|
+
}
|
|
255
|
+
clear() {
|
|
256
|
+
this._childSizeCache.clear(), this._marginSizeCache.clear(), this._metricsCache.clear();
|
|
257
|
+
}
|
|
258
|
+
}, c = class extends n {
|
|
259
|
+
constructor() {
|
|
260
|
+
super(...arguments), this._itemSize = {
|
|
261
|
+
width: 100,
|
|
262
|
+
height: 100
|
|
263
|
+
}, this._physicalItems = /* @__PURE__ */ new Map(), this._newPhysicalItems = /* @__PURE__ */ new Map(), this._metricsCache = new s(), this._anchorIdx = null, this._anchorPos = null, this._stable = !0, this._measureChildren = !0, this._estimate = !0;
|
|
264
|
+
}
|
|
265
|
+
get measureChildren() {
|
|
266
|
+
return this._measureChildren;
|
|
267
|
+
}
|
|
268
|
+
updateItemSizes(e) {
|
|
269
|
+
this._metricsCache.update(e, this.direction), this._scheduleReflow();
|
|
270
|
+
}
|
|
271
|
+
_getPhysicalItem(e) {
|
|
272
|
+
return this._newPhysicalItems.get(e) ?? this._physicalItems.get(e);
|
|
273
|
+
}
|
|
274
|
+
_getSize(e) {
|
|
275
|
+
return this._getPhysicalItem(e) && this._metricsCache.getChildSize(e);
|
|
276
|
+
}
|
|
277
|
+
_getAverageSize() {
|
|
278
|
+
return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];
|
|
279
|
+
}
|
|
280
|
+
_estimatePosition(e) {
|
|
281
|
+
let t = this._metricsCache;
|
|
282
|
+
if (this._first === -1 || this._last === -1) return t.averageMarginSize + e * (t.averageMarginSize + this._getAverageSize());
|
|
283
|
+
if (e < this._first) {
|
|
284
|
+
let n = this._first - e;
|
|
285
|
+
return this._getPhysicalItem(this._first).pos - (t.getMarginSize(this._first - 1) || t.averageMarginSize) - (n * t.averageChildSize + (n - 1) * t.averageMarginSize);
|
|
286
|
+
} else {
|
|
287
|
+
let n = e - this._last;
|
|
288
|
+
return this._getPhysicalItem(this._last).pos + (t.getChildSize(this._last) || t.averageChildSize) + (t.getMarginSize(this._last) || t.averageMarginSize) + n * (t.averageChildSize + t.averageMarginSize);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
_getPosition(e) {
|
|
292
|
+
let t = this._getPhysicalItem(e), { averageMarginSize: n } = this._metricsCache;
|
|
293
|
+
return e === 0 ? this._metricsCache.getMarginSize(0) ?? n : t ? t.pos : this._estimatePosition(e);
|
|
294
|
+
}
|
|
295
|
+
_calculateAnchor(e, t) {
|
|
296
|
+
return e <= 0 ? 0 : t > this._scrollSize - this._viewDim1 ? this.items.length - 1 : Math.max(0, Math.min(this.items.length - 1, Math.floor((e + t) / 2 / this._delta)));
|
|
297
|
+
}
|
|
298
|
+
_getAnchor(e, t) {
|
|
299
|
+
if (this._physicalItems.size === 0 || this._first < 0 || this._last < 0) return this._calculateAnchor(e, t);
|
|
300
|
+
let n = this._getPhysicalItem(this._first), r = this._getPhysicalItem(this._last), i = n.pos;
|
|
301
|
+
if (r.pos + this._metricsCache.getChildSize(this._last) < e || i > t) return this._calculateAnchor(e, t);
|
|
302
|
+
let a = this._firstVisible - 1, o = -Infinity;
|
|
303
|
+
for (; o < e;) o = this._getPhysicalItem(++a).pos + this._metricsCache.getChildSize(a);
|
|
304
|
+
return a;
|
|
305
|
+
}
|
|
306
|
+
_getActiveItems() {
|
|
307
|
+
this._viewDim1 === 0 || this.items.length === 0 ? this._clearItems() : this._getItems();
|
|
308
|
+
}
|
|
309
|
+
_clearItems() {
|
|
310
|
+
this._first = -1, this._last = -1, this._physicalMin = 0, this._physicalMax = 0;
|
|
311
|
+
let e = this._newPhysicalItems;
|
|
312
|
+
this._newPhysicalItems = this._physicalItems, this._newPhysicalItems.clear(), this._physicalItems = e, this._stable = !0;
|
|
313
|
+
}
|
|
314
|
+
_getItems() {
|
|
315
|
+
let e = this._newPhysicalItems;
|
|
316
|
+
this._stable = !0;
|
|
317
|
+
let t, n;
|
|
318
|
+
if (this.pin !== null) {
|
|
319
|
+
let { index: e } = this.pin;
|
|
320
|
+
this._anchorIdx = e, this._anchorPos = this._getPosition(e);
|
|
321
|
+
}
|
|
322
|
+
if (t = this._scrollPosition - this._overhang, n = this._scrollPosition + this._viewDim1 + this._overhang, n < 0 || t > this._scrollSize) {
|
|
323
|
+
this._clearItems();
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
(this._anchorIdx === null || this._anchorPos === null) && (this._anchorIdx = this._getAnchor(t, n), this._anchorPos = this._getPosition(this._anchorIdx));
|
|
327
|
+
let r = this._getSize(this._anchorIdx);
|
|
328
|
+
r === void 0 && (this._stable = !1, r = this._getAverageSize());
|
|
329
|
+
let i = this._metricsCache.getMarginSize(this._anchorIdx) ?? this._metricsCache.averageMarginSize, a = this._metricsCache.getMarginSize(this._anchorIdx + 1) ?? this._metricsCache.averageMarginSize;
|
|
330
|
+
this._anchorIdx === 0 && (this._anchorPos = i), this._anchorIdx === this.items.length - 1 && (this._anchorPos = this._scrollSize - a - r);
|
|
331
|
+
let o = 0;
|
|
332
|
+
for (this._anchorPos + r + a < t && (o = t - (this._anchorPos + r + a)), this._anchorPos - i > n && (o = n - (this._anchorPos - i)), o && (this._scrollPosition -= o, t -= o, n -= o, this._scrollError += o), e.set(this._anchorIdx, {
|
|
333
|
+
pos: this._anchorPos,
|
|
334
|
+
size: r
|
|
335
|
+
}), this._first = this._last = this._anchorIdx, this._physicalMin = this._anchorPos - i, this._physicalMax = this._anchorPos + r + a; this._physicalMin > t && this._first > 0;) {
|
|
336
|
+
let t = this._getSize(--this._first);
|
|
337
|
+
t === void 0 && (this._stable = !1, t = this._getAverageSize());
|
|
338
|
+
let n = this._metricsCache.getMarginSize(this._first);
|
|
339
|
+
n === void 0 && (this._stable = !1, n = this._metricsCache.averageMarginSize), this._physicalMin -= t;
|
|
340
|
+
let r = this._physicalMin;
|
|
341
|
+
if (e.set(this._first, {
|
|
342
|
+
pos: r,
|
|
343
|
+
size: t
|
|
344
|
+
}), this._physicalMin -= n, this._stable === !1 && this._estimate === !1) break;
|
|
345
|
+
}
|
|
346
|
+
for (; this._physicalMax < n && this._last < this.items.length - 1;) {
|
|
347
|
+
let t = this._getSize(++this._last);
|
|
348
|
+
t === void 0 && (this._stable = !1, t = this._getAverageSize());
|
|
349
|
+
let n = this._metricsCache.getMarginSize(this._last);
|
|
350
|
+
n === void 0 && (this._stable = !1, n = this._metricsCache.averageMarginSize);
|
|
351
|
+
let r = this._physicalMax;
|
|
352
|
+
if (e.set(this._last, {
|
|
353
|
+
pos: r,
|
|
354
|
+
size: t
|
|
355
|
+
}), this._physicalMax += t + n, !this._stable && !this._estimate) break;
|
|
356
|
+
}
|
|
357
|
+
let s = this._calculateError();
|
|
358
|
+
s && (this._physicalMin -= s, this._physicalMax -= s, this._anchorPos -= s, this._scrollPosition -= s, e.forEach((e) => e.pos -= s), this._scrollError += s), this._stable && (this._newPhysicalItems = this._physicalItems, this._newPhysicalItems.clear(), this._physicalItems = e);
|
|
359
|
+
}
|
|
360
|
+
_calculateError() {
|
|
361
|
+
return this._first === 0 ? this._physicalMin : this._physicalMin <= 0 ? this._physicalMin - this._first * this._delta : this._last === this.items.length - 1 ? this._physicalMax - this._scrollSize : this._physicalMax >= this._scrollSize ? this._physicalMax - this._scrollSize + (this.items.length - 1 - this._last) * this._delta : 0;
|
|
362
|
+
}
|
|
363
|
+
_reflow() {
|
|
364
|
+
let { _first: e, _last: t } = this;
|
|
365
|
+
super._reflow(), (this._first === -1 && this._last == -1 || this._first === e && this._last === t) && this._resetReflowState();
|
|
366
|
+
}
|
|
367
|
+
_resetReflowState() {
|
|
368
|
+
this._anchorIdx = null, this._anchorPos = null, this._stable = !0;
|
|
369
|
+
}
|
|
370
|
+
_updateScrollSize() {
|
|
371
|
+
let { averageMarginSize: e } = this._metricsCache;
|
|
372
|
+
this._scrollSize = Math.max(1, this.items.length * (e + this._getAverageSize()) + e);
|
|
373
|
+
}
|
|
374
|
+
get _delta() {
|
|
375
|
+
let { averageMarginSize: e } = this._metricsCache;
|
|
376
|
+
return this._getAverageSize() + e;
|
|
377
|
+
}
|
|
378
|
+
_getItemPosition(e) {
|
|
379
|
+
return {
|
|
380
|
+
[this._positionDim]: this._getPosition(e),
|
|
381
|
+
[this._secondaryPositionDim]: 0,
|
|
382
|
+
[a(this.direction)]: -(this._metricsCache.getLeadingMarginValue(e, this.direction) ?? this._metricsCache.averageMarginSize)
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
_getItemSize(e) {
|
|
386
|
+
return {
|
|
387
|
+
[this._sizeDim]: this._getSize(e) || this._getAverageSize(),
|
|
388
|
+
[this._secondarySizeDim]: this._itemSize[this._secondarySizeDim]
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
_viewDim2Changed() {
|
|
392
|
+
this._metricsCache.clear(), this._scheduleReflow();
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
//#endregion
|
|
396
|
+
export { c as FlowLayout };
|