ember-nativescript 0.2.0 → 0.3.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.
Files changed (49) hide show
  1. package/README.md +6 -1
  2. package/dist/components/RouteError.d.ts +8 -0
  3. package/dist/components/RouteError.d.ts.map +1 -0
  4. package/dist/components/RouteError.js +13 -0
  5. package/dist/components/RouteError.js.map +1 -0
  6. package/dist/src/application-entry.d.ts +4 -0
  7. package/dist/src/application-entry.d.ts.map +1 -0
  8. package/dist/src/application-entry.js +4 -0
  9. package/dist/src/application-testing.d.ts +19 -0
  10. package/dist/src/application-testing.d.ts.map +1 -0
  11. package/dist/src/application-testing.js +32 -0
  12. package/dist/src/application-testing.js.map +1 -0
  13. package/dist/src/application.d.ts +45 -0
  14. package/dist/src/application.d.ts.map +1 -0
  15. package/dist/src/application.js +136 -0
  16. package/dist/src/application.js.map +1 -0
  17. package/dist/src/nativescript-application.d.ts +8 -0
  18. package/dist/src/nativescript-application.d.ts.map +1 -0
  19. package/dist/src/nativescript-application.js +23 -0
  20. package/dist/src/nativescript-application.js.map +1 -0
  21. package/dist/src/testing.d.ts +2 -0
  22. package/dist/src/testing.d.ts.map +1 -1
  23. package/dist/src/testing.js +7 -2
  24. package/dist/src/testing.js.map +1 -1
  25. package/dist/src/web-adapter.d.ts +1 -1
  26. package/dist/src/web-adapter.d.ts.map +1 -1
  27. package/dist/src/web-adapter.js +6 -43
  28. package/dist/src/web-adapter.js.map +1 -1
  29. package/dist/src/web-app.d.ts +6 -0
  30. package/dist/src/web-app.d.ts.map +1 -1
  31. package/dist/src/web-app.js +26 -18
  32. package/dist/src/web-app.js.map +1 -1
  33. package/dist/src/web-application.d.ts +10 -0
  34. package/dist/src/web-application.d.ts.map +1 -0
  35. package/dist/src/web-application.js +37 -0
  36. package/dist/src/web-application.js.map +1 -0
  37. package/dist/src/web-host.d.ts +9 -2
  38. package/dist/src/web-host.d.ts.map +1 -1
  39. package/dist/src/web-host.js +10 -3
  40. package/dist/src/web-host.js.map +1 -1
  41. package/dist/src/web-list.d.ts +18 -0
  42. package/dist/src/web-list.d.ts.map +1 -0
  43. package/dist/src/web-list.js +224 -0
  44. package/dist/src/web-list.js.map +1 -0
  45. package/dist/src/web-styles.d.ts +1 -1
  46. package/dist/src/web-styles.d.ts.map +1 -1
  47. package/dist/src/web-styles.js +6 -3
  48. package/dist/src/web-styles.js.map +1 -1
  49. package/package.json +11 -2
@@ -0,0 +1,224 @@
1
+ // src/web-list.ts
2
+ /** How far past the screen, above and below, rows are kept ready, in pixels. */
3
+ var MARGIN = 600;
4
+ /** The height of a row until one of its kind is measured. */
5
+ var FIRST_ESTIMATE = 44;
6
+ /** How close to the end a scroll asks for more rows, in pixels. */
7
+ var LOAD_MORE_WITHIN = 400;
8
+ var WebList = class {
9
+ #view;
10
+ #content;
11
+ #show;
12
+ #kindOf;
13
+ #hooks;
14
+ #count = 0;
15
+ /** Each row's measured height; a hole for a row not measured yet. */
16
+ #measured = [];
17
+ /** Each row's top, and the end of the last row at `#offsets[count]`. Rebuilt when `#dirty`. */
18
+ #offsets = [0];
19
+ #dirty = true;
20
+ /** Running mean of measured heights per kind, for rows not shown yet. */
21
+ #means = /* @__PURE__ */ new Map();
22
+ #active = /* @__PURE__ */ new Map();
23
+ #free = /* @__PURE__ */ new Map();
24
+ #cells = /* @__PURE__ */ new WeakMap();
25
+ /** Pixels to scroll by on the next layout, from rows above the screen that changed height. */
26
+ #anchor = 0;
27
+ #frame = 0;
28
+ #askedAt = -1;
29
+ #released = false;
30
+ #resizes;
31
+ constructor(view, show, options, hooks) {
32
+ this.#view = view;
33
+ this.#show = show;
34
+ this.#hooks = hooks;
35
+ const kindOf = options.kindOf;
36
+ this.#kindOf = kindOf ? (index) => kindOf(index) : () => "row";
37
+ this.#content = document.createElement("div");
38
+ this.#content.className = "ns-listView-content";
39
+ view.append(this.#content);
40
+ view.addEventListener("scroll", this.#schedule, { passive: true });
41
+ this.#resizes = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver((entries) => {
42
+ for (const entry of entries) {
43
+ if (entry.target === view) {
44
+ this.#schedule();
45
+ continue;
46
+ }
47
+ const cell = this.#cells.get(entry.target);
48
+ if (!cell || !this.#active.has(cell.index) || this.#active.get(cell.index) !== cell) continue;
49
+ const height = entry.borderBoxSize?.[0]?.blockSize ?? entry.target.offsetHeight;
50
+ if (this.#record(cell, height)) this.#schedule();
51
+ }
52
+ });
53
+ this.#resizes?.observe(view);
54
+ }
55
+ setCount(count) {
56
+ this.#count = count;
57
+ this.#measured.length = Math.min(this.#measured.length, count);
58
+ if (this.#askedAt >= count) this.#askedAt = -1;
59
+ for (const [index, cell] of [...this.#active]) if (index >= count || this.#kindOf(index) !== cell.kind) this.#release(cell);
60
+ else this.#show(cell.container, index);
61
+ this.#dirty = true;
62
+ this.#layout();
63
+ this.#schedule();
64
+ }
65
+ release() {
66
+ this.#released = true;
67
+ cancelAnimationFrame(this.#frame);
68
+ this.#view.removeEventListener("scroll", this.#schedule);
69
+ this.#resizes?.disconnect();
70
+ }
71
+ /** How many cells exist, on screen or waiting in a pool. */
72
+ get cellCount() {
73
+ let pooled = 0;
74
+ for (const cells of this.#free.values()) pooled += cells.length;
75
+ return this.#active.size + pooled;
76
+ }
77
+ #schedule = () => {
78
+ if (this.#frame || this.#released) return;
79
+ this.#frame = requestAnimationFrame(() => {
80
+ this.#frame = 0;
81
+ this.#layout();
82
+ this.#maybeLoadMore();
83
+ });
84
+ };
85
+ #layout() {
86
+ if (this.#released) return;
87
+ for (let pass = 0; pass < 4; pass++) if (!this.#place()) break;
88
+ }
89
+ /** Shows the rows in view and places them. True if what was measured calls for another pass. */
90
+ #place() {
91
+ const view = this.#view;
92
+ this.#rebuild();
93
+ if (this.#anchor !== 0) {
94
+ this.#content.style.height = `${this.#offsets[this.#count]}px`;
95
+ view.scrollTop += this.#anchor;
96
+ this.#anchor = 0;
97
+ }
98
+ const top = view.scrollTop;
99
+ const height = this.#screen();
100
+ const count = this.#count;
101
+ const first = count === 0 ? 0 : this.#rowAt(Math.max(0, top - MARGIN));
102
+ const last = count === 0 ? -1 : this.#rowAt(top + height + MARGIN);
103
+ for (const [index, cell] of [...this.#active]) if (index < first || index > last) this.#release(cell);
104
+ const shown = [];
105
+ for (let index = first; index <= last; index++) {
106
+ if (this.#active.has(index)) continue;
107
+ const cell = this.#take(this.#kindOf(index), index);
108
+ this.#active.set(index, cell);
109
+ this.#show(cell.container, index);
110
+ shown.push(cell);
111
+ }
112
+ let changed = false;
113
+ for (const cell of shown) changed = this.#record(cell, cell.container.getBoundingClientRect().height) || changed;
114
+ this.#rebuild();
115
+ this.#content.style.height = `${this.#offsets[count]}px`;
116
+ for (const [index, cell] of this.#active) {
117
+ cell.container.style.transform = `translateY(${this.#offsets[index]}px)`;
118
+ cell.container.setAttribute("aria-posinset", String(index + 1));
119
+ cell.container.setAttribute("aria-setsize", String(count));
120
+ }
121
+ const end = this.#offsets[Math.min(last + 1, count)];
122
+ return this.#anchor !== 0 || changed && last < count - 1 && end < top + height + MARGIN;
123
+ }
124
+ #maybeLoadMore() {
125
+ const view = this.#view;
126
+ const count = this.#count;
127
+ if (count === 0 || this.#askedAt === count || !view.isConnected || view.clientHeight === 0) return;
128
+ if (!this.#active.has(count - 1)) return;
129
+ if (view.scrollTop + this.#screen() < this.#offsets[count] - LOAD_MORE_WITHIN) return;
130
+ this.#askedAt = count;
131
+ this.#hooks.emit("loadMoreItems");
132
+ }
133
+ #screen() {
134
+ return Math.min(this.#view.clientHeight || innerHeight, innerHeight);
135
+ }
136
+ #take(kind, index) {
137
+ const pooled = this.#free.get(kind)?.pop();
138
+ if (pooled) {
139
+ pooled.index = index;
140
+ pooled.container.hidden = false;
141
+ return pooled;
142
+ }
143
+ const container = this.#hooks.createCell();
144
+ container.classList.add("ns-listView-cell");
145
+ container.setAttribute("role", "listitem");
146
+ const cell = {
147
+ container,
148
+ kind,
149
+ index
150
+ };
151
+ this.#cells.set(container, cell);
152
+ container.addEventListener("click", (click) => {
153
+ if (click.target.closest("button, input, select, textarea, a") !== null) return;
154
+ this.#hooks.emit("itemTap", { index: cell.index });
155
+ });
156
+ this.#content.append(container);
157
+ this.#resizes?.observe(container);
158
+ return cell;
159
+ }
160
+ #release(cell) {
161
+ this.#active.delete(cell.index);
162
+ cell.container.hidden = true;
163
+ cell.container.removeAttribute("aria-posinset");
164
+ cell.container.removeAttribute("aria-setsize");
165
+ const pool = this.#free.get(cell.kind) ?? [];
166
+ pool.push(cell);
167
+ this.#free.set(cell.kind, pool);
168
+ }
169
+ #record(cell, height) {
170
+ if (height <= 0 || cell.index >= this.#count) return false;
171
+ const before = this.#heightOf(cell.index);
172
+ const known = this.#measured[cell.index] !== void 0;
173
+ this.#measured[cell.index] = height;
174
+ if (!known) {
175
+ const mean = this.#means.get(cell.kind) ?? {
176
+ total: 0,
177
+ rows: 0
178
+ };
179
+ mean.total += height;
180
+ mean.rows += 1;
181
+ this.#means.set(cell.kind, mean);
182
+ }
183
+ if (Math.abs(height - before) < .01) return false;
184
+ const top = this.#offsets[cell.index];
185
+ if (top !== void 0 && top + before <= this.#view.scrollTop) this.#anchor += height - before;
186
+ this.#dirty = true;
187
+ return true;
188
+ }
189
+ #heightOf(index) {
190
+ const measured = this.#measured[index];
191
+ if (measured !== void 0) return measured;
192
+ const mean = this.#means.get(this.#kindOf(index));
193
+ if (mean) return mean.total / mean.rows;
194
+ let total = 0;
195
+ let rows = 0;
196
+ for (const each of this.#means.values()) {
197
+ total += each.total;
198
+ rows += each.rows;
199
+ }
200
+ return rows > 0 ? total / rows : FIRST_ESTIMATE;
201
+ }
202
+ #rebuild() {
203
+ if (!this.#dirty) return;
204
+ const offsets = new Array(this.#count + 1);
205
+ offsets[0] = 0;
206
+ for (let index = 0; index < this.#count; index++) offsets[index + 1] = offsets[index] + this.#heightOf(index);
207
+ this.#offsets = offsets;
208
+ this.#dirty = false;
209
+ }
210
+ #rowAt(y) {
211
+ const offsets = this.#offsets;
212
+ let low = 0;
213
+ let high = this.#count - 1;
214
+ while (low < high) {
215
+ const middle = low + high + 1 >> 1;
216
+ if (offsets[middle] <= y) low = middle;
217
+ else high = middle - 1;
218
+ }
219
+ return low;
220
+ }
221
+ };
222
+ export { WebList };
223
+
224
+ //# sourceMappingURL=web-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-list.js","names":[],"sources":["../../src/web-list.ts"],"sourcesContent":["// A ListView in a browser that keeps only the rows on screen, as UITableView and RecyclerView do. The list holds an\n// element as tall as all its rows; each row on screen (plus a margin above and below) is a cell placed at its row's\n// offset. A cell that scrolls out goes to a pool for its kind of row, and the next row of that kind to scroll in\n// takes it: `cell(container, index)` re-renders it with the new row, which Glimmer does in place.\n//\n// Rows can be of any height. A row not yet shown counts as the average height of the rows of its kind shown so far,\n// and as it's shown it's measured, and remeasured whenever its size changes (an image loading, text wrapping). When a\n// row above the screen turns out taller or shorter than estimated, the list scrolls by the difference, so what's on\n// screen stays put.\n//\n// Like NativeScript's, the list scrolls itself: it needs a height from its parent (a `*` row in a GridLayout, the\n// rest of a page), not one that grows with its rows.\n\nimport type { ListBinding, ListOptions } from './adapter.ts';\n\ntype View = HTMLElement;\n\ninterface Cell {\n container: View;\n kind: string;\n index: number;\n}\n\n/** How far past the screen, above and below, rows are kept ready, in pixels. */\nconst MARGIN = 600;\n/** The height of a row until one of its kind is measured. */\nconst FIRST_ESTIMATE = 44;\n/** How close to the end a scroll asks for more rows, in pixels. */\nconst LOAD_MORE_WITHIN = 400;\n\nexport interface WebListHooks {\n /** A new, empty container for a cell. */\n createCell(): View;\n /** Raises a NativeScript event on the list (itemTap, loadMoreItems). */\n emit(name: string, data?: Record<string, unknown>): void;\n}\n\nexport class WebList implements ListBinding {\n readonly #view: View;\n readonly #content: View;\n readonly #show: (container: View, index: number) => void;\n readonly #kindOf: (index: number) => string;\n readonly #hooks: WebListHooks;\n\n #count = 0;\n /** Each row's measured height; a hole for a row not measured yet. */\n #measured: number[] = [];\n /** Each row's top, and the end of the last row at `#offsets[count]`. Rebuilt when `#dirty`. */\n #offsets: number[] = [0];\n #dirty = true;\n /** Running mean of measured heights per kind, for rows not shown yet. */\n readonly #means = new Map<string, { total: number; rows: number }>();\n\n readonly #active = new Map<number, Cell>();\n readonly #free = new Map<string, Cell[]>();\n readonly #cells = new WeakMap<Element, Cell>();\n\n /** Pixels to scroll by on the next layout, from rows above the screen that changed height. */\n #anchor = 0;\n #frame = 0;\n #askedAt = -1;\n #released = false;\n readonly #resizes: ResizeObserver | undefined;\n\n constructor(view: View, show: (container: View, index: number) => void, options: ListOptions, hooks: WebListHooks) {\n this.#view = view;\n this.#show = show;\n this.#hooks = hooks;\n const kindOf = options.kindOf;\n this.#kindOf = kindOf ? (index) => kindOf(index) : () => 'row';\n\n this.#content = document.createElement('div');\n this.#content.className = 'ns-listView-content';\n view.append(this.#content);\n\n view.addEventListener('scroll', this.#schedule, { passive: true });\n // A cell's height changes (an image loads) and the list's size changes (a rotation, a resize): lay out again.\n this.#resizes =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.target === view) {\n this.#schedule();\n continue;\n }\n const cell = this.#cells.get(entry.target);\n if (!cell || !this.#active.has(cell.index) || this.#active.get(cell.index) !== cell) continue;\n const height = entry.borderBoxSize?.[0]?.blockSize ?? (entry.target as View).offsetHeight;\n if (this.#record(cell, height)) this.#schedule();\n }\n });\n this.#resizes?.observe(view);\n }\n\n setCount(count: number): void {\n this.#count = count;\n this.#measured.length = Math.min(this.#measured.length, count);\n if (this.#askedAt >= count) this.#askedAt = -1;\n // The cells on screen show their (maybe new) rows; those past the end, or now of another kind, go.\n for (const [index, cell] of [...this.#active]) {\n if (index >= count || this.#kindOf(index) !== cell.kind) this.#release(cell);\n else this.#show(cell.container, index);\n }\n this.#dirty = true;\n this.#layout();\n // Asking for more waits for a frame: the list is in the document by then, and `{{on 'loadMoreItems'}}` set up.\n this.#schedule();\n }\n\n release(): void {\n this.#released = true;\n cancelAnimationFrame(this.#frame);\n this.#view.removeEventListener('scroll', this.#schedule);\n this.#resizes?.disconnect();\n }\n\n /** How many cells exist, on screen or waiting in a pool. */\n get cellCount(): number {\n let pooled = 0;\n for (const cells of this.#free.values()) pooled += cells.length;\n return this.#active.size + pooled;\n }\n\n #schedule = (): void => {\n if (this.#frame || this.#released) return;\n this.#frame = requestAnimationFrame(() => {\n this.#frame = 0;\n this.#layout();\n // Only from a frame: during setCount, Ember is rendering, and loading more there would change what it just read.\n this.#maybeLoadMore();\n });\n };\n\n #layout(): void {\n if (this.#released) return;\n // Measuring can show that rows are shorter than estimated, which leaves room for more: a few passes fill it.\n for (let pass = 0; pass < 4; pass++) if (!this.#place()) break;\n }\n\n /** Shows the rows in view and places them. True if what was measured calls for another pass. */\n #place(): boolean {\n const view = this.#view;\n this.#rebuild();\n if (this.#anchor !== 0) {\n // The new height first, so the browser doesn't cap the scroll at the old end.\n this.#content.style.height = `${this.#offsets[this.#count]}px`;\n view.scrollTop += this.#anchor;\n this.#anchor = 0;\n }\n\n const top = view.scrollTop;\n const height = this.#screen();\n const count = this.#count;\n const first = count === 0 ? 0 : this.#rowAt(Math.max(0, top - MARGIN));\n const last = count === 0 ? -1 : this.#rowAt(top + height + MARGIN);\n\n for (const [index, cell] of [...this.#active]) if (index < first || index > last) this.#release(cell);\n\n // Writes first (render the new rows), then reads (measure them), so the browser lays out once.\n const shown: Cell[] = [];\n for (let index = first; index <= last; index++) {\n if (this.#active.has(index)) continue;\n const cell = this.#take(this.#kindOf(index), index);\n this.#active.set(index, cell);\n this.#show(cell.container, index);\n shown.push(cell);\n }\n let changed = false;\n for (const cell of shown) changed = this.#record(cell, cell.container.getBoundingClientRect().height) || changed;\n this.#rebuild();\n\n this.#content.style.height = `${this.#offsets[count]}px`;\n for (const [index, cell] of this.#active) {\n cell.container.style.transform = `translateY(${this.#offsets[index]}px)`;\n cell.container.setAttribute('aria-posinset', String(index + 1));\n cell.container.setAttribute('aria-setsize', String(count));\n }\n\n // Another pass if the rows shown don't reach the bottom of the margin any more, or one above changed height.\n const end = this.#offsets[Math.min(last + 1, count)]!;\n return this.#anchor !== 0 || (changed && last < count - 1 && end < top + height + MARGIN);\n }\n\n #maybeLoadMore(): void {\n const view = this.#view;\n const count = this.#count;\n if (count === 0 || this.#askedAt === count || !view.isConnected || view.clientHeight === 0) return;\n if (!this.#active.has(count - 1)) return;\n const bottom = view.scrollTop + this.#screen();\n if (bottom < this.#offsets[count]! - LOAD_MORE_WITHIN) return;\n this.#askedAt = count;\n this.#hooks.emit('loadMoreItems');\n }\n\n // The height of the list on screen. Before it's in the document it has none, and in a parent that lets it grow with\n // its rows (a StackLayout) it's as tall as all of them: either way, at most the window's.\n #screen(): number {\n return Math.min(this.#view.clientHeight || innerHeight, innerHeight);\n }\n\n // A cell for a row: one of its kind from the pool, or a new one.\n #take(kind: string, index: number): Cell {\n const pooled = this.#free.get(kind)?.pop();\n if (pooled) {\n pooled.index = index;\n pooled.container.hidden = false;\n return pooled;\n }\n const container = this.#hooks.createCell();\n container.classList.add('ns-listView-cell');\n container.setAttribute('role', 'listitem');\n const cell: Cell = { container, kind, index };\n this.#cells.set(container, cell);\n container.addEventListener('click', (click) => {\n // A tap on a button or a field inside the row is theirs.\n if ((click.target as HTMLElement).closest('button, input, select, textarea, a') !== null) return;\n this.#hooks.emit('itemTap', { index: cell.index });\n });\n this.#content.append(container);\n this.#resizes?.observe(container);\n return cell;\n }\n\n #release(cell: Cell): void {\n this.#active.delete(cell.index);\n cell.container.hidden = true;\n cell.container.removeAttribute('aria-posinset');\n cell.container.removeAttribute('aria-setsize');\n const pool = this.#free.get(cell.kind) ?? [];\n pool.push(cell);\n this.#free.set(cell.kind, pool);\n }\n\n // A row's height as measured. True if it differs from what the layout used.\n #record(cell: Cell, height: number): boolean {\n if (height <= 0 || cell.index >= this.#count) return false;\n const before = this.#heightOf(cell.index);\n const known = this.#measured[cell.index] !== undefined;\n this.#measured[cell.index] = height;\n if (!known) {\n const mean = this.#means.get(cell.kind) ?? { total: 0, rows: 0 };\n mean.total += height;\n mean.rows += 1;\n this.#means.set(cell.kind, mean);\n }\n if (Math.abs(height - before) < 0.01) return false;\n // A row above the top of the screen changed: keep what's on screen where it is.\n // The offsets are the ones on screen, from the last layout, until the next one rebuilds them.\n const top = this.#offsets[cell.index];\n if (top !== undefined && top + before <= this.#view.scrollTop) this.#anchor += height - before;\n this.#dirty = true;\n return true;\n }\n\n #heightOf(index: number): number {\n const measured = this.#measured[index];\n if (measured !== undefined) return measured;\n const mean = this.#means.get(this.#kindOf(index));\n if (mean) return mean.total / mean.rows;\n // No row of this kind measured yet: the mean of all of them.\n let total = 0;\n let rows = 0;\n for (const each of this.#means.values()) {\n total += each.total;\n rows += each.rows;\n }\n return rows > 0 ? total / rows : FIRST_ESTIMATE;\n }\n\n #rebuild(): void {\n if (!this.#dirty) return;\n const offsets = new Array<number>(this.#count + 1);\n offsets[0] = 0;\n for (let index = 0; index < this.#count; index++) offsets[index + 1] = offsets[index]! + this.#heightOf(index);\n this.#offsets = offsets;\n this.#dirty = false;\n }\n\n // The row at a height from the top: the last whose top is at or above it.\n #rowAt(y: number): number {\n const offsets = this.#offsets;\n let low = 0;\n let high = this.#count - 1;\n while (low < high) {\n const middle = (low + high + 1) >> 1;\n if (offsets[middle]! <= y) low = middle;\n else high = middle - 1;\n }\n return low;\n }\n}\n"],"mappings":";;AAwBA,IAAM,SAAS;;AAEf,IAAM,iBAAiB;;AAEvB,IAAM,mBAAmB;AASzB,IAAa,UAAb,MAA4C;CACjC;CACA;CACA;CACA;CACA;CAET,SAAS;;CAET,YAAsB,CAAC;;CAEvB,WAAqB,CAAC,CAAC;CACvB,SAAS;;CAEA,yBAAS,IAAI,IAA6C;CAE1D,0BAAU,IAAI,IAAkB;CAChC,wBAAQ,IAAI,IAAoB;CAChC,yBAAS,IAAI,QAAuB;;CAG7C,UAAU;CACV,SAAS;CACT,WAAW;CACX,YAAY;CACH;CAET,YAAY,MAAY,MAAgD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AAS;EACxF,KAAK,SAAS;EACd,OAAO;CACT;CAEA,UAAU,OAAuB;EAC/B,MAAM,WAAW,KAAK,UAAU;EAChC,IAAI,aAAa,KAAA,GAAW,OAAO;EACnC,MAAM,OAAO,KAAK,OAAO,IAAI,KAAK,QAAQ,KAAK,CAAC;EAChD,IAAI,MAAM,OAAO,KAAK,QAAQ,KAAK;EAEnC,IAAI,QAAQ;EACZ,IAAI,OAAO;EACX,KAAK,MAAM,QAAQ,KAAK,OAAO,OAAO,GAAG;GACvC,SAAS,KAAK;GACd,QAAQ,KAAK;EACf;EACA,OAAO,OAAO,IAAI,QAAQ,OAAO;CACnC;CAEA,WAAiB;EACf,IAAI,CAAC,KAAK,QAAQ;EAClB,MAAM,UAAU,IAAI,MAAc,KAAK,SAAS,CAAC;EACjD,QAAQ,KAAK;EACb,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS,QAAQ,QAAQ,KAAK,QAAQ,SAAU,KAAK,UAAU,KAAK;EAC7G,KAAK,WAAW;EAChB,KAAK,SAAS;CAChB;CAGA,OAAO,GAAmB;EACxB,MAAM,UAAU,KAAK;EACrB,IAAI,MAAM;EACV,IAAI,OAAO,KAAK,SAAS;EACzB,OAAO,MAAM,MAAM;GACjB,MAAM,SAAU,MAAM,OAAO,KAAM;GACnC,IAAI,QAAQ,WAAY,GAAG,MAAM;QAC5B,OAAO,SAAS;EACvB;EACA,OAAO;CACT;AACF"}
@@ -1,4 +1,4 @@
1
- export declare const WEB_STYLES = "\n.ns-app {\n position: fixed;\n inset: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n margin: 0 auto;\n max-width: 520px;\n font: 17px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;\n color: #000;\n background: #fff;\n -webkit-font-smoothing: antialiased;\n -webkit-tap-highlight-color: transparent;\n --ns-accent: #007aff;\n --ns-separator: rgba(60, 60, 67, 0.18);\n --ns-bar: rgba(249, 249, 249, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.12);\n --ns-secondary: #8a8a8e;\n}\n.ns-app.ns-dark {\n color: #fff;\n background: #000;\n --ns-accent: #0a84ff;\n --ns-separator: rgba(84, 84, 88, 0.6);\n --ns-bar: rgba(29, 29, 31, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.24);\n}\n@media (min-width: 560px) {\n .ns-app { inset: 24px auto; left: 50%; transform: translateX(-50%); width: 420px; border-radius: 28px;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(0, 0, 0, 0.18); }\n body:has(> * > .ns-app), body:has(> .ns-app) { background: #e9e9ee; }\n}\n.ns-app *, .ns-app *::before, .ns-app *::after { box-sizing: border-box; }\n.ns-app [hidden] { display: none !important; }\n\n/* Frames and pages: the page on top shows, the ones under it wait, as in a UINavigationController. */\n.ns-frame { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; }\n.ns-page { position: absolute; inset: 0; display: flex; flex-direction: column; }\n/* :where keeps these below an app's own Page { \u2026 } rules. */\n:where(.ns-app) .ns-page { background-color: #fff; }\n:where(.ns-app.ns-dark) .ns-page { background-color: #000; }\n.ns-page:not(.ns-current) { visibility: hidden; }\n.ns-page > :not(.ns-actionBar) { flex: 1 1 auto; min-height: 0; }\n.ns-tabViewItem > .ns-frame, .ns-contentView > * { flex: 1 1 auto; }\n\n/* ActionBar: a title between the back button and the action items. */\n.ns-actionBar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px;\n padding: env(safe-area-inset-top) 8px 0; background: var(--ns-bar); border-bottom: 0.5px solid var(--ns-separator);\n backdrop-filter: blur(20px); }\n.ns-actionBar-title { font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-actionBar-left { justify-self: start; display: flex; }\n.ns-actionBar-right { justify-self: end; display: flex; gap: 4px; }\n.ns-navigationButton, .ns-actionItem { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 8px;\n cursor: pointer; }\n.ns-navigationButton::before { content: '\u2039'; font-size: 30px; line-height: 0; vertical-align: -3px; margin-right: 4px; }\n\n/* Layouts. Children stretch across, as NativeScript's do, unless aligned. */\n.ns-stackLayout { display: flex; }\n.ns-stackLayout.ns-vertical { flex-direction: column; }\n.ns-stackLayout.ns-vertical > * { align-self: var(--ns-ha, stretch); flex: none; }\n.ns-stackLayout.ns-horizontal { flex-direction: row; }\n.ns-stackLayout.ns-horizontal > * { align-self: var(--ns-va, stretch); flex: none; }\n.ns-gridLayout { display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }\n.ns-gridLayout > * { grid-row: 1; grid-column: 1; justify-self: var(--ns-ha, stretch); align-self: var(--ns-va, stretch);\n min-width: 0; min-height: 0; }\n.ns-flexboxLayout { display: flex; }\n.ns-wrapLayout { display: flex; flex-wrap: wrap; align-content: flex-start; }\n.ns-wrapLayout.ns-vertical { flex-direction: column; }\n.ns-wrapLayout > * { width: var(--ns-item-width, auto); height: var(--ns-item-height, auto); }\n.ns-absoluteLayout { position: relative; }\n.ns-absoluteLayout > * { position: absolute; left: 0; top: 0; }\n.ns-dockLayout { display: flex; }\n.ns-rootLayout { display: grid; }\n.ns-rootLayout > * { grid-area: 1 / 1; }\n.ns-scrollView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }\n.ns-scrollView > * { flex: none; }\n.ns-scrollView.ns-horizontal { flex-direction: row; overflow-y: hidden; overflow-x: auto; }\n.ns-contentView { display: flex; flex-direction: column; }\n\n/* Text. A label is one line, cut with an ellipsis, unless textWrap, and centered vertically in its space. */\n.ns-label { display: flex; align-items: center; min-width: 0; }\n.ns-label-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-label.ns-wrap > .ns-label-text { white-space: normal; overflow-wrap: anywhere; }\n.ns-label > .ns-formattedString { flex: 1 1 auto; min-width: 0; }\n.ns-button { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 10px 12px; min-height: 44px;\n cursor: pointer; text-align: center; }\n.ns-button:active { opacity: 0.6; }\n.ns-button:disabled, .ns-disabled { opacity: 0.4; cursor: default; }\n.ns-textField, .ns-searchBar, .ns-textView, .ns-listPicker, .ns-datePicker, .ns-timePicker { font: inherit; color: inherit;\n min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 10px 0; outline: none; }\n.ns-textField::placeholder, .ns-textView::placeholder, .ns-searchBar::placeholder { color: var(--ns-secondary); }\n.ns-searchBar { background: var(--ns-fill); border-radius: 10px; padding: 8px 12px; margin: 8px; }\n.ns-textView { resize: none; min-height: 80px; }\n.ns-image { display: block; min-width: 0; min-height: 0; max-width: 100%; object-fit: contain; }\n\n/* Switch: iOS's toggle. */\n.ns-switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; cursor: pointer; }\n.ns-switch-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }\n.ns-switch-track { position: absolute; inset: 0; border-radius: 16px; background: var(--ns-fill); transition: background 0.2s; }\n.ns-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;\n background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.2s; }\n.ns-switch-input:checked + .ns-switch-track { background: #34c759; }\n.ns-switch-input:checked + .ns-switch-track::after { transform: translateX(20px); }\n.ns-switch-input:focus-visible + .ns-switch-track { outline: 2px solid var(--ns-accent); outline-offset: 2px; }\n\n.ns-slider { accent-color: var(--ns-accent); margin: 10px 0; }\n.ns-progress { accent-color: var(--ns-accent); width: 100%; height: 4px; }\n.ns-activityIndicator { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--ns-fill);\n border-top-color: var(--ns-secondary); animation: ns-spin 0.8s linear infinite; align-self: center; }\n.ns-activityIndicator.ns-busy { display: block; }\n@keyframes ns-spin { to { transform: rotate(360deg); } }\n\n.ns-segmentedBar { display: flex; padding: 2px; border-radius: 9px; background: var(--ns-fill); }\n.ns-segmentedBarItem { flex: 1; font: inherit; font-size: 13px; font-weight: 500; color: inherit; background: none; border: 0;\n border-radius: 7px; padding: 6px 8px; cursor: pointer; }\n.ns-segmentedBarItem[aria-selected='true'] { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); }\n.ns-dark .ns-segmentedBarItem[aria-selected='true'] { background: #636366; }\n\n/* TabView: the items, and a tab bar under them. */\n.ns-tabView { display: flex; flex-direction: column; min-height: 0; }\n.ns-tabView-items { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }\n.ns-tabViewItem { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ns-tabView-bar { flex: none; display: flex; background: var(--ns-bar); border-top: 0.5px solid var(--ns-separator);\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-tabView-tab { flex: 1; font: inherit; font-size: 11px; font-weight: 500; color: var(--ns-secondary); background: none;\n border: 0; padding: 14px 4px; cursor: pointer; }\n.ns-tabView-tab[aria-selected='true'] { color: var(--ns-accent); }\n\n/* Lists: a column that scrolls, rows separated by a hairline. */\n.ns-listView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }\n.ns-listView-cell { flex: none; cursor: pointer; border-bottom: 0.5px solid var(--ns-separator); }\n.ns-listView-cell:active { background: var(--ns-fill); }\n.ns-webView { border: 0; width: 100%; height: 100%; }\n\n/* Modals: a sheet from the bottom over a dimmed screen. */\n.ns-modal-backdrop { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end;\n background: rgba(0, 0, 0, 0.35); }\n.ns-modal { width: 100%; max-height: 92%; border-radius: 12px 12px 0 0; background: #fff; overflow: auto;\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-modal-fullscreen { position: absolute; inset: 0; background: #fff; overflow: auto; }\n.ns-dark .ns-modal, .ns-dark .ns-modal-fullscreen { background: #1c1c1e; }\n";
1
+ export declare const WEB_STYLES = "\n.ns-app {\n position: fixed;\n inset: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n margin: 0 auto;\n max-width: 520px;\n font: 17px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;\n color: #000;\n background: #fff;\n -webkit-font-smoothing: antialiased;\n -webkit-tap-highlight-color: transparent;\n --ns-accent: #007aff;\n --ns-separator: rgba(60, 60, 67, 0.18);\n --ns-bar: rgba(249, 249, 249, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.12);\n --ns-secondary: #8a8a8e;\n}\n.ns-app.ns-dark {\n color: #fff;\n background: #000;\n --ns-accent: #0a84ff;\n --ns-separator: rgba(84, 84, 88, 0.6);\n --ns-bar: rgba(29, 29, 31, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.24);\n}\n@media (min-width: 560px) {\n .ns-app { inset: 24px auto; left: 50%; transform: translateX(-50%); width: 420px; border-radius: 28px;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(0, 0, 0, 0.18); }\n body:has(> * > .ns-app), body:has(> .ns-app) { background: #e9e9ee; }\n}\n.ns-app *, .ns-app *::before, .ns-app *::after { box-sizing: border-box; }\n.ns-app [hidden] { display: none !important; }\n\n/* Frames and pages: the page on top shows, the ones under it wait, as in a UINavigationController. */\n.ns-frame { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; }\n.ns-page { position: absolute; inset: 0; display: flex; flex-direction: column; }\n/* :where keeps these below an app's own Page { \u2026 } rules. */\n:where(.ns-app) .ns-page { background-color: #fff; }\n:where(.ns-app.ns-dark) .ns-page { background-color: #000; }\n.ns-page:not(.ns-current) { visibility: hidden; }\n.ns-page > :not(.ns-actionBar) { flex: 1 1 auto; min-height: 0; }\n.ns-tabViewItem > .ns-frame, .ns-contentView > * { flex: 1 1 auto; }\n\n/* ActionBar: a title between the back button and the action items. */\n.ns-actionBar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px;\n padding: env(safe-area-inset-top) 8px 0; background: var(--ns-bar); border-bottom: 0.5px solid var(--ns-separator);\n backdrop-filter: blur(20px); }\n.ns-actionBar-title { font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-actionBar-left { justify-self: start; display: flex; }\n.ns-actionBar-right { justify-self: end; display: flex; gap: 4px; }\n.ns-navigationButton, .ns-actionItem { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 8px;\n cursor: pointer; }\n.ns-navigationButton::before { content: '\u2039'; font-size: 30px; line-height: 0; vertical-align: -3px; margin-right: 4px; }\n\n/* Layouts. Children stretch across, as NativeScript's do, unless aligned. */\n.ns-stackLayout { display: flex; }\n.ns-stackLayout.ns-vertical { flex-direction: column; }\n.ns-stackLayout.ns-vertical > * { align-self: var(--ns-ha, stretch); flex: none; }\n.ns-stackLayout.ns-horizontal { flex-direction: row; }\n.ns-stackLayout.ns-horizontal > * { align-self: var(--ns-va, stretch); flex: none; }\n.ns-gridLayout { display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }\n.ns-gridLayout > * { grid-row: 1; grid-column: 1; justify-self: var(--ns-ha, stretch); align-self: var(--ns-va, stretch);\n min-width: 0; min-height: 0; }\n.ns-flexboxLayout { display: flex; }\n.ns-wrapLayout { display: flex; flex-wrap: wrap; align-content: flex-start; }\n.ns-wrapLayout.ns-vertical { flex-direction: column; }\n.ns-wrapLayout > * { width: var(--ns-item-width, auto); height: var(--ns-item-height, auto); }\n.ns-absoluteLayout { position: relative; }\n.ns-absoluteLayout > * { position: absolute; left: 0; top: 0; }\n.ns-dockLayout { display: flex; }\n.ns-rootLayout { display: grid; }\n.ns-rootLayout > * { grid-area: 1 / 1; }\n.ns-scrollView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }\n.ns-scrollView > * { flex: none; }\n.ns-scrollView.ns-horizontal { flex-direction: row; overflow-y: hidden; overflow-x: auto; }\n.ns-contentView { display: flex; flex-direction: column; }\n\n/* Text. A label is one line, cut with an ellipsis, unless textWrap, and centered vertically in its space. */\n.ns-label { display: flex; align-items: center; min-width: 0; }\n.ns-label-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-label.ns-wrap > .ns-label-text { white-space: normal; overflow-wrap: anywhere; }\n.ns-label > .ns-formattedString { flex: 1 1 auto; min-width: 0; }\n.ns-button { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 10px 12px; min-height: 44px;\n cursor: pointer; text-align: center; }\n.ns-button:active { opacity: 0.6; }\n.ns-button:disabled, .ns-disabled { opacity: 0.4; cursor: default; }\n.ns-textField, .ns-searchBar, .ns-textView, .ns-listPicker, .ns-datePicker, .ns-timePicker { font: inherit; color: inherit;\n min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 10px 0; outline: none; }\n.ns-textField::placeholder, .ns-textView::placeholder, .ns-searchBar::placeholder { color: var(--ns-secondary); }\n.ns-searchBar { background: var(--ns-fill); border-radius: 10px; padding: 8px 12px; margin: 8px; }\n.ns-textView { resize: none; min-height: 80px; }\n.ns-image { display: block; min-width: 0; min-height: 0; max-width: 100%; object-fit: contain; }\n\n/* Switch: iOS's toggle. */\n.ns-switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; cursor: pointer; }\n.ns-switch-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }\n.ns-switch-track { position: absolute; inset: 0; border-radius: 16px; background: var(--ns-fill); transition: background 0.2s; }\n.ns-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;\n background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.2s; }\n.ns-switch-input:checked + .ns-switch-track { background: #34c759; }\n.ns-switch-input:checked + .ns-switch-track::after { transform: translateX(20px); }\n.ns-switch-input:focus-visible + .ns-switch-track { outline: 2px solid var(--ns-accent); outline-offset: 2px; }\n\n.ns-slider { accent-color: var(--ns-accent); margin: 10px 0; }\n.ns-progress { accent-color: var(--ns-accent); width: 100%; height: 4px; }\n.ns-activityIndicator { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--ns-fill);\n border-top-color: var(--ns-secondary); animation: ns-spin 0.8s linear infinite; align-self: center; }\n.ns-activityIndicator.ns-busy { display: block; }\n@keyframes ns-spin { to { transform: rotate(360deg); } }\n\n.ns-segmentedBar { display: flex; padding: 2px; border-radius: 9px; background: var(--ns-fill); }\n.ns-segmentedBarItem { flex: 1; font: inherit; font-size: 13px; font-weight: 500; color: inherit; background: none; border: 0;\n border-radius: 7px; padding: 6px 8px; cursor: pointer; }\n.ns-segmentedBarItem[aria-selected='true'] { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); }\n.ns-dark .ns-segmentedBarItem[aria-selected='true'] { background: #636366; }\n\n/* TabView: the items, and a tab bar under them. */\n.ns-tabView { display: flex; flex-direction: column; min-height: 0; }\n.ns-tabView-items { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }\n.ns-tabViewItem { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ns-tabView-bar { flex: none; display: flex; background: var(--ns-bar); border-top: 0.5px solid var(--ns-separator);\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-tabView-tab { flex: 1; font: inherit; font-size: 11px; font-weight: 500; color: var(--ns-secondary); background: none;\n border: 0; padding: 14px 4px; cursor: pointer; }\n.ns-tabView-tab[aria-selected='true'] { color: var(--ns-accent); }\n\n/* Lists: a column that scrolls, rows separated by a hairline. Only the rows on screen exist, each placed at its\n row's offset in an element as tall as all of them (web-list.ts). */\n.ns-listView { display: block; position: relative; overflow-y: auto; overscroll-behavior: contain; }\n.ns-listView-content { position: relative; width: 100%; }\n.ns-listView-cell { position: absolute; top: 0; left: 0; right: 0; cursor: pointer;\n border-bottom: 0.5px solid var(--ns-separator); }\n.ns-listView-cell:active { background: var(--ns-fill); }\n.ns-webView { border: 0; width: 100%; height: 100%; }\n\n/* Modals: a sheet from the bottom over a dimmed screen. */\n.ns-modal-backdrop { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end;\n background: rgba(0, 0, 0, 0.35); }\n.ns-modal { width: 100%; max-height: 92%; border-radius: 12px 12px 0 0; background: #fff; overflow: auto;\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-modal-fullscreen { position: absolute; inset: 0; background: #fff; overflow: auto; }\n.ns-dark .ns-modal, .ns-dark .ns-modal-fullscreen { background: #1c1c1e; }\n";
2
2
  /** Adds the styles to the document, once. */
3
3
  export declare function installStyles(): void;
4
4
  //# sourceMappingURL=web-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-styles.d.ts","sourceRoot":"","sources":["../../src/web-styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,ywRA8ItB,CAAC;AAIF,6CAA6C;AAC7C,wBAAgB,aAAa,IAAI,IAAI,CAOpC"}
1
+ {"version":3,"file":"web-styles.d.ts","sourceRoot":"","sources":["../../src/web-styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,89RAiJtB,CAAC;AAIF,6CAA6C;AAC7C,wBAAgB,aAAa,IAAI,IAAI,CAOpC"}
@@ -128,9 +128,12 @@ var WEB_STYLES = `
128
128
  border: 0; padding: 14px 4px; cursor: pointer; }
129
129
  .ns-tabView-tab[aria-selected='true'] { color: var(--ns-accent); }
130
130
 
131
- /* Lists: a column that scrolls, rows separated by a hairline. */
132
- .ns-listView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
133
- .ns-listView-cell { flex: none; cursor: pointer; border-bottom: 0.5px solid var(--ns-separator); }
131
+ /* Lists: a column that scrolls, rows separated by a hairline. Only the rows on screen exist, each placed at its
132
+ row's offset in an element as tall as all of them (web-list.ts). */
133
+ .ns-listView { display: block; position: relative; overflow-y: auto; overscroll-behavior: contain; }
134
+ .ns-listView-content { position: relative; width: 100%; }
135
+ .ns-listView-cell { position: absolute; top: 0; left: 0; right: 0; cursor: pointer;
136
+ border-bottom: 0.5px solid var(--ns-separator); }
134
137
  .ns-listView-cell:active { background: var(--ns-fill); }
135
138
  .ns-webView { border: 0; width: 100%; height: 100%; }
136
139
 
@@ -1 +1 @@
1
- {"version":3,"file":"web-styles.js","names":["WEB_STYLES","installed","installStyles","style","document","createElement","dataset","emberNativescript","textContent","head","prepend"],"sources":["../../src/web-styles.ts"],"sourcesContent":["// The CSS that gives NativeScript's views their layout and look in a browser. Sizes are device-independent pixels,\n// which are CSS pixels. The look is iOS's defaults, since that's where the app was seen first; an app's own CSS\n// (converted by the web Vite config) goes on top.\n\nexport const WEB_STYLES = /* css */ `\n.ns-app {\n position: fixed;\n inset: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n margin: 0 auto;\n max-width: 520px;\n font: 17px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;\n color: #000;\n background: #fff;\n -webkit-font-smoothing: antialiased;\n -webkit-tap-highlight-color: transparent;\n --ns-accent: #007aff;\n --ns-separator: rgba(60, 60, 67, 0.18);\n --ns-bar: rgba(249, 249, 249, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.12);\n --ns-secondary: #8a8a8e;\n}\n.ns-app.ns-dark {\n color: #fff;\n background: #000;\n --ns-accent: #0a84ff;\n --ns-separator: rgba(84, 84, 88, 0.6);\n --ns-bar: rgba(29, 29, 31, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.24);\n}\n@media (min-width: 560px) {\n .ns-app { inset: 24px auto; left: 50%; transform: translateX(-50%); width: 420px; border-radius: 28px;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(0, 0, 0, 0.18); }\n body:has(> * > .ns-app), body:has(> .ns-app) { background: #e9e9ee; }\n}\n.ns-app *, .ns-app *::before, .ns-app *::after { box-sizing: border-box; }\n.ns-app [hidden] { display: none !important; }\n\n/* Frames and pages: the page on top shows, the ones under it wait, as in a UINavigationController. */\n.ns-frame { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; }\n.ns-page { position: absolute; inset: 0; display: flex; flex-direction: column; }\n/* :where keeps these below an app's own Page { … } rules. */\n:where(.ns-app) .ns-page { background-color: #fff; }\n:where(.ns-app.ns-dark) .ns-page { background-color: #000; }\n.ns-page:not(.ns-current) { visibility: hidden; }\n.ns-page > :not(.ns-actionBar) { flex: 1 1 auto; min-height: 0; }\n.ns-tabViewItem > .ns-frame, .ns-contentView > * { flex: 1 1 auto; }\n\n/* ActionBar: a title between the back button and the action items. */\n.ns-actionBar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px;\n padding: env(safe-area-inset-top) 8px 0; background: var(--ns-bar); border-bottom: 0.5px solid var(--ns-separator);\n backdrop-filter: blur(20px); }\n.ns-actionBar-title { font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-actionBar-left { justify-self: start; display: flex; }\n.ns-actionBar-right { justify-self: end; display: flex; gap: 4px; }\n.ns-navigationButton, .ns-actionItem { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 8px;\n cursor: pointer; }\n.ns-navigationButton::before { content: '‹'; font-size: 30px; line-height: 0; vertical-align: -3px; margin-right: 4px; }\n\n/* Layouts. Children stretch across, as NativeScript's do, unless aligned. */\n.ns-stackLayout { display: flex; }\n.ns-stackLayout.ns-vertical { flex-direction: column; }\n.ns-stackLayout.ns-vertical > * { align-self: var(--ns-ha, stretch); flex: none; }\n.ns-stackLayout.ns-horizontal { flex-direction: row; }\n.ns-stackLayout.ns-horizontal > * { align-self: var(--ns-va, stretch); flex: none; }\n.ns-gridLayout { display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }\n.ns-gridLayout > * { grid-row: 1; grid-column: 1; justify-self: var(--ns-ha, stretch); align-self: var(--ns-va, stretch);\n min-width: 0; min-height: 0; }\n.ns-flexboxLayout { display: flex; }\n.ns-wrapLayout { display: flex; flex-wrap: wrap; align-content: flex-start; }\n.ns-wrapLayout.ns-vertical { flex-direction: column; }\n.ns-wrapLayout > * { width: var(--ns-item-width, auto); height: var(--ns-item-height, auto); }\n.ns-absoluteLayout { position: relative; }\n.ns-absoluteLayout > * { position: absolute; left: 0; top: 0; }\n.ns-dockLayout { display: flex; }\n.ns-rootLayout { display: grid; }\n.ns-rootLayout > * { grid-area: 1 / 1; }\n.ns-scrollView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }\n.ns-scrollView > * { flex: none; }\n.ns-scrollView.ns-horizontal { flex-direction: row; overflow-y: hidden; overflow-x: auto; }\n.ns-contentView { display: flex; flex-direction: column; }\n\n/* Text. A label is one line, cut with an ellipsis, unless textWrap, and centered vertically in its space. */\n.ns-label { display: flex; align-items: center; min-width: 0; }\n.ns-label-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-label.ns-wrap > .ns-label-text { white-space: normal; overflow-wrap: anywhere; }\n.ns-label > .ns-formattedString { flex: 1 1 auto; min-width: 0; }\n.ns-button { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 10px 12px; min-height: 44px;\n cursor: pointer; text-align: center; }\n.ns-button:active { opacity: 0.6; }\n.ns-button:disabled, .ns-disabled { opacity: 0.4; cursor: default; }\n.ns-textField, .ns-searchBar, .ns-textView, .ns-listPicker, .ns-datePicker, .ns-timePicker { font: inherit; color: inherit;\n min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 10px 0; outline: none; }\n.ns-textField::placeholder, .ns-textView::placeholder, .ns-searchBar::placeholder { color: var(--ns-secondary); }\n.ns-searchBar { background: var(--ns-fill); border-radius: 10px; padding: 8px 12px; margin: 8px; }\n.ns-textView { resize: none; min-height: 80px; }\n.ns-image { display: block; min-width: 0; min-height: 0; max-width: 100%; object-fit: contain; }\n\n/* Switch: iOS's toggle. */\n.ns-switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; cursor: pointer; }\n.ns-switch-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }\n.ns-switch-track { position: absolute; inset: 0; border-radius: 16px; background: var(--ns-fill); transition: background 0.2s; }\n.ns-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;\n background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.2s; }\n.ns-switch-input:checked + .ns-switch-track { background: #34c759; }\n.ns-switch-input:checked + .ns-switch-track::after { transform: translateX(20px); }\n.ns-switch-input:focus-visible + .ns-switch-track { outline: 2px solid var(--ns-accent); outline-offset: 2px; }\n\n.ns-slider { accent-color: var(--ns-accent); margin: 10px 0; }\n.ns-progress { accent-color: var(--ns-accent); width: 100%; height: 4px; }\n.ns-activityIndicator { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--ns-fill);\n border-top-color: var(--ns-secondary); animation: ns-spin 0.8s linear infinite; align-self: center; }\n.ns-activityIndicator.ns-busy { display: block; }\n@keyframes ns-spin { to { transform: rotate(360deg); } }\n\n.ns-segmentedBar { display: flex; padding: 2px; border-radius: 9px; background: var(--ns-fill); }\n.ns-segmentedBarItem { flex: 1; font: inherit; font-size: 13px; font-weight: 500; color: inherit; background: none; border: 0;\n border-radius: 7px; padding: 6px 8px; cursor: pointer; }\n.ns-segmentedBarItem[aria-selected='true'] { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); }\n.ns-dark .ns-segmentedBarItem[aria-selected='true'] { background: #636366; }\n\n/* TabView: the items, and a tab bar under them. */\n.ns-tabView { display: flex; flex-direction: column; min-height: 0; }\n.ns-tabView-items { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }\n.ns-tabViewItem { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ns-tabView-bar { flex: none; display: flex; background: var(--ns-bar); border-top: 0.5px solid var(--ns-separator);\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-tabView-tab { flex: 1; font: inherit; font-size: 11px; font-weight: 500; color: var(--ns-secondary); background: none;\n border: 0; padding: 14px 4px; cursor: pointer; }\n.ns-tabView-tab[aria-selected='true'] { color: var(--ns-accent); }\n\n/* Lists: a column that scrolls, rows separated by a hairline. */\n.ns-listView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }\n.ns-listView-cell { flex: none; cursor: pointer; border-bottom: 0.5px solid var(--ns-separator); }\n.ns-listView-cell:active { background: var(--ns-fill); }\n.ns-webView { border: 0; width: 100%; height: 100%; }\n\n/* Modals: a sheet from the bottom over a dimmed screen. */\n.ns-modal-backdrop { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end;\n background: rgba(0, 0, 0, 0.35); }\n.ns-modal { width: 100%; max-height: 92%; border-radius: 12px 12px 0 0; background: #fff; overflow: auto;\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-modal-fullscreen { position: absolute; inset: 0; background: #fff; overflow: auto; }\n.ns-dark .ns-modal, .ns-dark .ns-modal-fullscreen { background: #1c1c1e; }\n`;\n\nlet installed = false;\n\n/** Adds the styles to the document, once. */\nexport function installStyles(): void {\n if (installed) return;\n installed = true;\n const style = document.createElement('style');\n style.dataset.emberNativescript = '';\n style.textContent = WEB_STYLES;\n document.head.prepend(style);\n}\n"],"mappings":";AAIA,IAAaA,aAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgJpC,IAAIC,YAAY;;AAGhB,SAAgBC,gBAAsB;CACpC,IAAID,WAAW;CACfA,YAAY;CACZ,MAAME,QAAQC,SAASC,cAAc,OAAO;CAC5CF,MAAMG,QAAQC,oBAAoB;CAClCJ,MAAMK,cAAcR;CACpBI,SAASK,KAAKC,QAAQP,KAAK;AAC7B"}
1
+ {"version":3,"file":"web-styles.js","names":["WEB_STYLES","installed","installStyles","style","document","createElement","dataset","emberNativescript","textContent","head","prepend"],"sources":["../../src/web-styles.ts"],"sourcesContent":["// The CSS that gives NativeScript's views their layout and look in a browser. Sizes are device-independent pixels,\n// which are CSS pixels. The look is iOS's defaults, since that's where the app was seen first; an app's own CSS\n// (converted by the web Vite config) goes on top.\n\nexport const WEB_STYLES = /* css */ `\n.ns-app {\n position: fixed;\n inset: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n margin: 0 auto;\n max-width: 520px;\n font: 17px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;\n color: #000;\n background: #fff;\n -webkit-font-smoothing: antialiased;\n -webkit-tap-highlight-color: transparent;\n --ns-accent: #007aff;\n --ns-separator: rgba(60, 60, 67, 0.18);\n --ns-bar: rgba(249, 249, 249, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.12);\n --ns-secondary: #8a8a8e;\n}\n.ns-app.ns-dark {\n color: #fff;\n background: #000;\n --ns-accent: #0a84ff;\n --ns-separator: rgba(84, 84, 88, 0.6);\n --ns-bar: rgba(29, 29, 31, 0.94);\n --ns-fill: rgba(118, 118, 128, 0.24);\n}\n@media (min-width: 560px) {\n .ns-app { inset: 24px auto; left: 50%; transform: translateX(-50%); width: 420px; border-radius: 28px;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(0, 0, 0, 0.18); }\n body:has(> * > .ns-app), body:has(> .ns-app) { background: #e9e9ee; }\n}\n.ns-app *, .ns-app *::before, .ns-app *::after { box-sizing: border-box; }\n.ns-app [hidden] { display: none !important; }\n\n/* Frames and pages: the page on top shows, the ones under it wait, as in a UINavigationController. */\n.ns-frame { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; }\n.ns-page { position: absolute; inset: 0; display: flex; flex-direction: column; }\n/* :where keeps these below an app's own Page { … } rules. */\n:where(.ns-app) .ns-page { background-color: #fff; }\n:where(.ns-app.ns-dark) .ns-page { background-color: #000; }\n.ns-page:not(.ns-current) { visibility: hidden; }\n.ns-page > :not(.ns-actionBar) { flex: 1 1 auto; min-height: 0; }\n.ns-tabViewItem > .ns-frame, .ns-contentView > * { flex: 1 1 auto; }\n\n/* ActionBar: a title between the back button and the action items. */\n.ns-actionBar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px;\n padding: env(safe-area-inset-top) 8px 0; background: var(--ns-bar); border-bottom: 0.5px solid var(--ns-separator);\n backdrop-filter: blur(20px); }\n.ns-actionBar-title { font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-actionBar-left { justify-self: start; display: flex; }\n.ns-actionBar-right { justify-self: end; display: flex; gap: 4px; }\n.ns-navigationButton, .ns-actionItem { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 8px;\n cursor: pointer; }\n.ns-navigationButton::before { content: '‹'; font-size: 30px; line-height: 0; vertical-align: -3px; margin-right: 4px; }\n\n/* Layouts. Children stretch across, as NativeScript's do, unless aligned. */\n.ns-stackLayout { display: flex; }\n.ns-stackLayout.ns-vertical { flex-direction: column; }\n.ns-stackLayout.ns-vertical > * { align-self: var(--ns-ha, stretch); flex: none; }\n.ns-stackLayout.ns-horizontal { flex-direction: row; }\n.ns-stackLayout.ns-horizontal > * { align-self: var(--ns-va, stretch); flex: none; }\n.ns-gridLayout { display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }\n.ns-gridLayout > * { grid-row: 1; grid-column: 1; justify-self: var(--ns-ha, stretch); align-self: var(--ns-va, stretch);\n min-width: 0; min-height: 0; }\n.ns-flexboxLayout { display: flex; }\n.ns-wrapLayout { display: flex; flex-wrap: wrap; align-content: flex-start; }\n.ns-wrapLayout.ns-vertical { flex-direction: column; }\n.ns-wrapLayout > * { width: var(--ns-item-width, auto); height: var(--ns-item-height, auto); }\n.ns-absoluteLayout { position: relative; }\n.ns-absoluteLayout > * { position: absolute; left: 0; top: 0; }\n.ns-dockLayout { display: flex; }\n.ns-rootLayout { display: grid; }\n.ns-rootLayout > * { grid-area: 1 / 1; }\n.ns-scrollView { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }\n.ns-scrollView > * { flex: none; }\n.ns-scrollView.ns-horizontal { flex-direction: row; overflow-y: hidden; overflow-x: auto; }\n.ns-contentView { display: flex; flex-direction: column; }\n\n/* Text. A label is one line, cut with an ellipsis, unless textWrap, and centered vertically in its space. */\n.ns-label { display: flex; align-items: center; min-width: 0; }\n.ns-label-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.ns-label.ns-wrap > .ns-label-text { white-space: normal; overflow-wrap: anywhere; }\n.ns-label > .ns-formattedString { flex: 1 1 auto; min-width: 0; }\n.ns-button { font: inherit; color: var(--ns-accent); background: none; border: 0; padding: 10px 12px; min-height: 44px;\n cursor: pointer; text-align: center; }\n.ns-button:active { opacity: 0.6; }\n.ns-button:disabled, .ns-disabled { opacity: 0.4; cursor: default; }\n.ns-textField, .ns-searchBar, .ns-textView, .ns-listPicker, .ns-datePicker, .ns-timePicker { font: inherit; color: inherit;\n min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 10px 0; outline: none; }\n.ns-textField::placeholder, .ns-textView::placeholder, .ns-searchBar::placeholder { color: var(--ns-secondary); }\n.ns-searchBar { background: var(--ns-fill); border-radius: 10px; padding: 8px 12px; margin: 8px; }\n.ns-textView { resize: none; min-height: 80px; }\n.ns-image { display: block; min-width: 0; min-height: 0; max-width: 100%; object-fit: contain; }\n\n/* Switch: iOS's toggle. */\n.ns-switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; cursor: pointer; }\n.ns-switch-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }\n.ns-switch-track { position: absolute; inset: 0; border-radius: 16px; background: var(--ns-fill); transition: background 0.2s; }\n.ns-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;\n background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.2s; }\n.ns-switch-input:checked + .ns-switch-track { background: #34c759; }\n.ns-switch-input:checked + .ns-switch-track::after { transform: translateX(20px); }\n.ns-switch-input:focus-visible + .ns-switch-track { outline: 2px solid var(--ns-accent); outline-offset: 2px; }\n\n.ns-slider { accent-color: var(--ns-accent); margin: 10px 0; }\n.ns-progress { accent-color: var(--ns-accent); width: 100%; height: 4px; }\n.ns-activityIndicator { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--ns-fill);\n border-top-color: var(--ns-secondary); animation: ns-spin 0.8s linear infinite; align-self: center; }\n.ns-activityIndicator.ns-busy { display: block; }\n@keyframes ns-spin { to { transform: rotate(360deg); } }\n\n.ns-segmentedBar { display: flex; padding: 2px; border-radius: 9px; background: var(--ns-fill); }\n.ns-segmentedBarItem { flex: 1; font: inherit; font-size: 13px; font-weight: 500; color: inherit; background: none; border: 0;\n border-radius: 7px; padding: 6px 8px; cursor: pointer; }\n.ns-segmentedBarItem[aria-selected='true'] { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); }\n.ns-dark .ns-segmentedBarItem[aria-selected='true'] { background: #636366; }\n\n/* TabView: the items, and a tab bar under them. */\n.ns-tabView { display: flex; flex-direction: column; min-height: 0; }\n.ns-tabView-items { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }\n.ns-tabViewItem { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ns-tabView-bar { flex: none; display: flex; background: var(--ns-bar); border-top: 0.5px solid var(--ns-separator);\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-tabView-tab { flex: 1; font: inherit; font-size: 11px; font-weight: 500; color: var(--ns-secondary); background: none;\n border: 0; padding: 14px 4px; cursor: pointer; }\n.ns-tabView-tab[aria-selected='true'] { color: var(--ns-accent); }\n\n/* Lists: a column that scrolls, rows separated by a hairline. Only the rows on screen exist, each placed at its\n row's offset in an element as tall as all of them (web-list.ts). */\n.ns-listView { display: block; position: relative; overflow-y: auto; overscroll-behavior: contain; }\n.ns-listView-content { position: relative; width: 100%; }\n.ns-listView-cell { position: absolute; top: 0; left: 0; right: 0; cursor: pointer;\n border-bottom: 0.5px solid var(--ns-separator); }\n.ns-listView-cell:active { background: var(--ns-fill); }\n.ns-webView { border: 0; width: 100%; height: 100%; }\n\n/* Modals: a sheet from the bottom over a dimmed screen. */\n.ns-modal-backdrop { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end;\n background: rgba(0, 0, 0, 0.35); }\n.ns-modal { width: 100%; max-height: 92%; border-radius: 12px 12px 0 0; background: #fff; overflow: auto;\n padding-bottom: env(safe-area-inset-bottom); }\n.ns-modal-fullscreen { position: absolute; inset: 0; background: #fff; overflow: auto; }\n.ns-dark .ns-modal, .ns-dark .ns-modal-fullscreen { background: #1c1c1e; }\n`;\n\nlet installed = false;\n\n/** Adds the styles to the document, once. */\nexport function installStyles(): void {\n if (installed) return;\n installed = true;\n const style = document.createElement('style');\n style.dataset.emberNativescript = '';\n style.textContent = WEB_STYLES;\n document.head.prepend(style);\n}\n"],"mappings":";AAIA,IAAaA,aAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmJpC,IAAIC,YAAY;;AAGhB,SAAgBC,gBAAsB;CACpC,IAAID,WAAW;CACfA,YAAY;CACZ,MAAME,QAAQC,SAASC,cAAc,OAAO;CAC5CF,MAAMG,QAAQC,oBAAoB;CAClCJ,MAAMK,cAAcR;CACpBI,SAASK,KAAKC,QAAQP,KAAK;AAC7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-nativescript",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Ember components rendering real native views on iOS and Android, through NativeScript.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,6 +46,14 @@
46
46
  "types": "./dist/src/vitest.d.ts",
47
47
  "default": "./dist/src/vitest.js"
48
48
  },
49
+ "./application": {
50
+ "types": "./dist/src/application-entry.d.ts",
51
+ "default": "./dist/src/application-entry.js"
52
+ },
53
+ "./application/testing": {
54
+ "types": "./dist/src/application-testing.d.ts",
55
+ "default": "./dist/src/application-testing.js"
56
+ },
49
57
  "./web": {
50
58
  "types": "./dist/src/web.d.ts",
51
59
  "default": "./dist/src/web.js"
@@ -112,6 +120,7 @@
112
120
  "docs:dev": "pnpm --filter ember-nativescript-docs dev",
113
121
  "docs:build": "pnpm --filter ember-nativescript-docs build",
114
122
  "web:template": "vite -c web.template.config.ts",
115
- "web:demo": "vite -c web.demo.config.ts"
123
+ "web:demo": "vite -c web.demo.config.ts",
124
+ "web:routed": "vite -c web.routed.config.ts"
116
125
  }
117
126
  }