@swiftbrowser/web 0.1.0 → 0.2.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.
- package/README.md +43 -6
- package/app/index.html +11 -0
- package/node/dist/node/apps.d.ts +16 -0
- package/node/dist/node/apps.d.ts.map +1 -1
- package/node/dist/node/apps.js +9 -0
- package/node/dist/node/apps.js.map +1 -1
- package/node/dist/node/config.d.ts +14 -1
- package/node/dist/node/config.d.ts.map +1 -1
- package/node/dist/node/config.js +20 -3
- package/node/dist/node/config.js.map +1 -1
- package/node/dist/node/examples.d.ts +2 -1
- package/node/dist/node/examples.d.ts.map +1 -1
- package/node/dist/node/examples.js +11 -2
- package/node/dist/node/examples.js.map +1 -1
- package/node/dist/plugins/app-manifests.d.ts +4 -1
- package/node/dist/plugins/app-manifests.d.ts.map +1 -1
- package/node/dist/plugins/app-manifests.js +3 -2
- package/node/dist/plugins/app-manifests.js.map +1 -1
- package/node/dist/plugins/asset-catalogs.d.ts +15 -3
- package/node/dist/plugins/asset-catalogs.d.ts.map +1 -1
- package/node/dist/plugins/asset-catalogs.js +111 -13
- package/node/dist/plugins/asset-catalogs.js.map +1 -1
- package/node/dist/plugins/included-sites.d.ts +26 -0
- package/node/dist/plugins/included-sites.d.ts.map +1 -0
- package/node/dist/plugins/included-sites.js +70 -0
- package/node/dist/plugins/included-sites.js.map +1 -0
- package/node/dist/plugins/pdfImages.d.ts +27 -0
- package/node/dist/plugins/pdfImages.d.ts.map +1 -0
- package/node/dist/plugins/pdfImages.js +145 -0
- package/node/dist/plugins/pdfImages.js.map +1 -0
- package/node/dist/plugins/swift-wasm.d.ts +19 -1
- package/node/dist/plugins/swift-wasm.d.ts.map +1 -1
- package/node/dist/plugins/swift-wasm.js +45 -7
- package/node/dist/plugins/swift-wasm.js.map +1 -1
- package/node/dist/plugins/symbolTemplates.d.ts +22 -0
- package/node/dist/plugins/symbolTemplates.d.ts.map +1 -0
- package/node/dist/plugins/symbolTemplates.js +83 -0
- package/node/dist/plugins/symbolTemplates.js.map +1 -0
- package/package.json +4 -2
- package/plugins/app-manifests.ts +3 -2
- package/plugins/asset-catalogs.ts +119 -14
- package/plugins/included-sites.ts +74 -0
- package/plugins/pdfImages.ts +163 -0
- package/plugins/swift-wasm.ts +52 -6
- package/plugins/symbolTemplates.ts +88 -0
- package/public/_headers +7 -0
- package/public/app/oauth-callback.html +62 -0
- package/src/animation.ts +235 -8
- package/src/appFiles.ts +201 -0
- package/src/base64.ts +43 -0
- package/src/bitmapPlan.ts +143 -0
- package/src/bitmapStore.ts +206 -0
- package/src/bitmapWorker.ts +41 -0
- package/src/bitmapWorkerProtocol.ts +15 -0
- package/src/bitmaps.ts +283 -0
- package/src/blockedHosts.ts +29 -0
- package/src/canvasDrawing.ts +361 -0
- package/src/chartDom.ts +2 -2
- package/src/chromeColor.ts +179 -0
- package/src/clipboard.ts +78 -0
- package/src/colorMultiply.ts +93 -0
- package/src/colorPicker.ts +44 -0
- package/src/corsProxy.ts +45 -0
- package/src/gaugeRing.ts +74 -0
- package/src/gif.ts +297 -0
- package/src/hostRequests.ts +426 -0
- package/src/imageOps.ts +592 -0
- package/src/interaction.ts +18 -1
- package/src/landing.ts +2 -2
- package/src/layout/chart.ts +9 -3
- package/src/layout/engine.ts +279 -25
- package/src/layout/index.ts +3 -1
- package/src/layout/text.ts +217 -1
- package/src/layout/types.ts +31 -0
- package/src/layout/typography.ts +24 -7
- package/src/layout/video.ts +24 -0
- package/src/layoutDom.ts +53 -3
- package/src/main.ts +124 -4
- package/src/media.ts +132 -0
- package/src/mock.ts +2 -1
- package/src/notifications.ts +109 -0
- package/src/pathShape.ts +156 -0
- package/src/protocol.ts +761 -12
- package/src/renderer.ts +584 -36
- package/src/richText.ts +65 -0
- package/src/scanner.ts +234 -0
- package/src/scrollTo.ts +123 -0
- package/src/styles.css +212 -7
- package/src/styles.ts +31 -0
- package/src/swiftData.ts +128 -0
- package/src/symbols.ts +564 -21
- package/src/translation.ts +126 -0
- package/src/video.ts +299 -0
- package/src/vite-env.d.ts +6 -0
- package/src/wasm.ts +227 -32
- package/src/webAuth.ts +267 -0
- package/src/webSocket.ts +148 -0
- package/src/zoneinfo.ts +269 -0
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ app/index.html The app page (served at /app/): toolbar, iPhone frame, #scre
|
|
|
14
14
|
src/landing.ts Landing page script: app cards (qrcode SVGs), build info from the `define`s
|
|
15
15
|
src/landing.css Landing page styles
|
|
16
16
|
src/deviceMode.ts Frame vs device mode decision, env(safe-area-inset-*) reader, viewport watcher
|
|
17
|
+
src/chromeColor.ts Device mode: the browser's status bar strip and safe areas take the app's top-edge color
|
|
17
18
|
src/vite-env.d.ts Types of the build-time defines (__SB_APPS__, __SB_COMMIT__, …)
|
|
18
19
|
src/protocol.ts TypeScript mirror of the ops protocol (Op, element kinds, Style, Color, Animation, events)
|
|
19
20
|
src/renderer.ts Renderer: Map<id, HTMLElement> + LayoutNode tree, ops, navigation, sheets, layout on commit
|
|
@@ -26,6 +27,11 @@ src/wasm.ts loadApp(): WASI shim, _start, sb_ops_*, sb_event, sb_alloc +
|
|
|
26
27
|
src/mock.ts Counter, Todos, Gallery and Settings fixtures + in-page mock "Swift core" for ?mock=1
|
|
27
28
|
src/main.ts App page wiring: mode, theme toggle, Text size control, app label, boot, hot-reload state stash
|
|
28
29
|
src/devEvents.ts Payload types for the sb:build-* websocket events
|
|
30
|
+
src/hostRequests.ts Phase 13: performs the app's `request` ops (URLSession → fetch, AsyncImage → an Image() probe) and answers with `response` events
|
|
31
|
+
src/bitmaps.ts UIImage bitmaps: draws recipes on each image's <canvas>, through the store in a worker or on the page
|
|
32
|
+
src/bitmapStore.ts The bitmap store: keeps `imagedata` sources, decodes them, draws recipes (bitmapPlan.ts, imageOps.ts); no DOM
|
|
33
|
+
src/bitmapWorker.ts The store in a worker, answering drawings with ImageBitmaps
|
|
34
|
+
src/imageOps.ts Core Image's steps (sepia, crystallize, edges, blur, pixellate, unsharp mask, vignette, crop) on rasters; no DOM
|
|
29
35
|
src/styles.css iOS tokens, device frame, device mode, element styles
|
|
30
36
|
node/ Node side: apps.ts (the AppSpec registry type), config.ts (Vite config from specs),
|
|
31
37
|
examples.ts (Examples/* as specs, build-wasm.sh runner, descriptions),
|
|
@@ -86,6 +92,14 @@ from `displayName`, `description` and `icon`.
|
|
|
86
92
|
`SB_WASM_OPT=0`, `watch` = `Sources/` + the example's directory), which is
|
|
87
93
|
what `npm run dev` / `vite build` use.
|
|
88
94
|
|
|
95
|
+
A built site lists its apps in `apps.json`, and other built sites can join a
|
|
96
|
+
build (`SiteOptions.sites`; `SB_SITES` for `vite build`, directories separated
|
|
97
|
+
like `PATH`): `plugins/included-sites.ts` adds their apps to the landing page
|
|
98
|
+
and copies their files (modules, catalogs, bundles, manifests) next to this
|
|
99
|
+
site's, keeping this site's pages and any file it already has. CI's deploy
|
|
100
|
+
adds Apple's Backyard Birds this way, built from its repository with
|
|
101
|
+
`swiftbrowser build`.
|
|
102
|
+
|
|
89
103
|
Other packages (the CLI) import the same machinery through the package entry,
|
|
90
104
|
compiled by `npm run build:node` (`tsconfig.node-build.json` → `node/dist/`):
|
|
91
105
|
|
|
@@ -210,11 +224,28 @@ job scheduler are unaffected. `window.__sb.mode` reports the mode.
|
|
|
210
224
|
`apple-mobile-web-app-status-bar-style: black-translucent` (the OS status bar
|
|
211
225
|
stays transparent, the app's own background shows under it and the layout
|
|
212
226
|
engine gets the bar as a safe-area inset; `default` draws an opaque light bar
|
|
213
|
-
whatever the app's color scheme), light/dark `theme-color`s
|
|
214
|
-
manifest and the icons `public/icon.svg` + `public/apple-touch-icon.png`
|
|
227
|
+
whatever the app's color scheme), light/dark `theme-color`s (the defaults
|
|
228
|
+
until the app draws), a web app manifest and the icons `public/icon.svg` + `public/apple-touch-icon.png`
|
|
215
229
|
(180×180, drawn with ImageMagick to match the SVG). In Safari, Share → Add to
|
|
216
230
|
Home Screen then runs an app full screen.
|
|
217
231
|
|
|
232
|
+
In the browser itself (not standalone), Safari tints its status bar strip and
|
|
233
|
+
the safe areas from `theme-color`, the page background and (in recent Safari)
|
|
234
|
+
the fixed element at the top edge. `src/chromeColor.ts` keeps those in step
|
|
235
|
+
with the app: after each layout pass, a theme change and the end of each push,
|
|
236
|
+
pop or sheet animation (at most four times a second), it composites the
|
|
237
|
+
backgrounds the app paints at the middle of its top edge, walking only the
|
|
238
|
+
elements whose box holds that point (about 270 on Ice Cubes' timeline, under a
|
|
239
|
+
millisecond). The
|
|
240
|
+
result becomes the one `theme-color`, the `html`, `body` and `#device`
|
|
241
|
+
backgrounds, and `html`'s `color-scheme` is the app's scheme, so an app's own
|
|
242
|
+
bar color, its `.preferredColorScheme` or a sheet's dimming reach the strip
|
|
243
|
+
instead of the OS appearance's defaults. Safari seems to take the strip's
|
|
244
|
+
color from the first paint and not follow later changes, so in device mode the
|
|
245
|
+
first paint already has the OS appearance: an inline script after `#device`
|
|
246
|
+
sets its `data-theme` from `prefers-color-scheme`, and the page background is
|
|
247
|
+
the system background for it (white / black) before `main.ts` runs.
|
|
248
|
+
|
|
218
249
|
Safari takes a home-screen icon's launch URL and label from the manifest, not
|
|
219
250
|
from the page URL, so there is one manifest per example: `plugins/app-manifests.ts`
|
|
220
251
|
serves `/manifests/<Name>.webmanifest` (`start_url: /app/?app=<Name>`,
|
|
@@ -244,9 +275,9 @@ Those files are build products and are git-ignored (`public/*.wasm`); only
|
|
|
244
275
|
From the repo root:
|
|
245
276
|
|
|
246
277
|
```sh
|
|
247
|
-
scripts/build-wasm.sh #
|
|
248
|
-
#
|
|
249
|
-
scripts/build-wasm.sh Todos #
|
|
278
|
+
scripts/build-wasm.sh # every example through the CLI (swiftbrowser build: release, wasm-opt -Oz
|
|
279
|
+
# when installed), each <App>.wasm copied into Web/public/
|
|
280
|
+
scripts/build-wasm.sh Todos # the Todos example only
|
|
250
281
|
```
|
|
251
282
|
|
|
252
283
|
## Hot reload
|
|
@@ -579,7 +610,13 @@ transaction override); everything else in an animated commit uses the commit's.
|
|
|
579
610
|
## Testing
|
|
580
611
|
|
|
581
612
|
`npm run test:unit` runs the layout engine's vitest suite (Node, no browser).
|
|
582
|
-
`npm run test:e2e` runs Playwright with Chromium
|
|
613
|
+
`npm run test:e2e` runs Playwright with Chromium, in three projects: `mock`
|
|
614
|
+
(the specs listed in `MOCK_SPECS` in `playwright.config.ts`, which load no
|
|
615
|
+
compiled module), `wasm-heavy` (the slowest specs against real modules,
|
|
616
|
+
`HEAVY_SPECS`) and `wasm` (every other spec; these need `public/<App>.wasm`).
|
|
617
|
+
`--project=mock` runs without any module built; CI runs it while the examples
|
|
618
|
+
build, and runs `wasm-heavy` and `wasm` in two jobs of about the same length.
|
|
619
|
+
The config boots
|
|
583
620
|
`npm run dev -- --port 5173 --strictPort` itself. `e2e/renderer.spec.ts`
|
|
584
621
|
covers the Counter mock and op semantics, `e2e/phase2.spec.ts` the Phase 2
|
|
585
622
|
kinds against the Todos mock, `e2e/phase3.spec.ts` Dynamic Type, color/shape,
|
package/app/index.html
CHANGED
|
@@ -117,6 +117,17 @@
|
|
|
117
117
|
<div class="home-indicator" aria-hidden="true"></div>
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
120
|
+
<script>
|
|
121
|
+
// Device mode follows the OS appearance (main.ts); set it before the
|
|
122
|
+
// first paint. Safari tints its status bar strip and safe areas from
|
|
123
|
+
// the first paint and does not follow later changes, so a light device
|
|
124
|
+
// here kept the strip white under a dark app.
|
|
125
|
+
(function () {
|
|
126
|
+
if (document.documentElement.getAttribute('data-sb-mode') !== 'device') return;
|
|
127
|
+
var dark = typeof matchMedia === 'function' && matchMedia('(prefers-color-scheme: dark)').matches;
|
|
128
|
+
document.getElementById('device').setAttribute('data-theme', dark ? 'dark' : 'light');
|
|
129
|
+
})();
|
|
130
|
+
</script>
|
|
120
131
|
<p id="status" class="status" role="alert" hidden></p>
|
|
121
132
|
</main>
|
|
122
133
|
|
package/node/dist/node/apps.d.ts
CHANGED
|
@@ -45,6 +45,22 @@ export interface AppSpec {
|
|
|
45
45
|
* else in the first; default `["en"]`.
|
|
46
46
|
*/
|
|
47
47
|
locales?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* The app's URL schemes (`CFBundleURLSchemes` of its Info.plist's
|
|
50
|
+
* `CFBundleURLTypes`). OAuth redirects in these schemes come back through the
|
|
51
|
+
* page's callback page (docs/ops-protocol.md, "Signing in").
|
|
52
|
+
*/
|
|
53
|
+
urlSchemes?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* A CORS proxy (packages/cors-proxy): the page retries a cross-origin GET or
|
|
56
|
+
* HEAD the browser refused through `<corsProxy>?url=<target>` (src/corsProxy.ts).
|
|
57
|
+
*/
|
|
58
|
+
corsProxy?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Hosts (and their subdomains) the app's requests may not reach: they fail
|
|
61
|
+
* as a network error does (src/blockedHosts.ts).
|
|
62
|
+
*/
|
|
63
|
+
blockedHosts?: string[];
|
|
48
64
|
}
|
|
49
65
|
/** The name rule `?app=` in src/main.ts and every plugin URL applies. */
|
|
50
66
|
export declare const APP_NAME: RegExp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../apps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,gHAAgH;IAChH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,gHAAgH;IAChH,IAAI,CAA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/apps.js
CHANGED
|
@@ -52,6 +52,15 @@ export function validateAppSpecs(specs) {
|
|
|
52
52
|
if (spec.locales !== undefined && (!Array.isArray(spec.locales) || !spec.locales.every((l) => typeof l === 'string' && l.length > 0))) {
|
|
53
53
|
throw new Error(`${label}: "locales" must be an array of language tags`);
|
|
54
54
|
}
|
|
55
|
+
if (spec.urlSchemes !== undefined && (!Array.isArray(spec.urlSchemes) || !spec.urlSchemes.every((u) => typeof u === 'string' && /^[A-Za-z][A-Za-z0-9+.-]*$/.test(u)))) {
|
|
56
|
+
throw new Error(`${label}: "urlSchemes" must be an array of URL schemes`);
|
|
57
|
+
}
|
|
58
|
+
if (spec.corsProxy !== undefined && (typeof spec.corsProxy !== 'string' || !/^https?:\/\/[^\s]+$/.test(spec.corsProxy))) {
|
|
59
|
+
throw new Error(`${label}: "corsProxy" must be an http(s) URL`);
|
|
60
|
+
}
|
|
61
|
+
if (spec.blockedHosts !== undefined && (!Array.isArray(spec.blockedHosts) || !spec.blockedHosts.every((h) => typeof h === 'string' && /^[A-Za-z0-9.-]+$/.test(h)))) {
|
|
62
|
+
throw new Error(`${label}: "blockedHosts" must be an array of host names`);
|
|
63
|
+
}
|
|
55
64
|
if (spec.build !== undefined && typeof spec.build !== 'function') {
|
|
56
65
|
throw new Error(`${label}: "build" must be a function`);
|
|
57
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../apps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../apps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AA4D7B,yEAAyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAE3C,sCAAsC;AACtC,MAAM,UAAU,aAAa,CAAC,IAA2C;IACvE,OAA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,IAAI,KAAK,CAAC,GAAG,KAAK,8BAA8B,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds the Vite config for a set of apps: the registry plugins
|
|
3
3
|
* (plugins/swift-wasm.ts, asset-catalogs.ts, app-manifests.ts), the two
|
|
4
|
-
* pages (landing + app)
|
|
4
|
+
* pages (landing + app), the `define`s the landing page reads, and the apps
|
|
5
|
+
* of other built sites joining this one (plugins/included-sites.ts).
|
|
5
6
|
*
|
|
6
7
|
* `vite.config.ts` calls this with the example apps; the programmatic API
|
|
7
8
|
* (./index.ts) with whatever the caller registered.
|
|
@@ -14,6 +15,12 @@ export interface SiteOptions {
|
|
|
14
15
|
commit?: string;
|
|
15
16
|
/** Build info shown on the landing page: the branch name ("" when unknown). */
|
|
16
17
|
branch?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Directories of sites built before (`buildSite`, `swiftbrowser build`)
|
|
20
|
+
* whose apps join this one's: their cards on the landing page, their files
|
|
21
|
+
* copied into the build (plugins/included-sites.ts). Build only.
|
|
22
|
+
*/
|
|
23
|
+
sites?: string[];
|
|
17
24
|
}
|
|
18
25
|
/** One entry of `__SB_APPS__`, what the landing page renders a card from (see src/vite-env.d.ts). */
|
|
19
26
|
export interface LandingApp {
|
|
@@ -24,6 +31,12 @@ export interface LandingApp {
|
|
|
24
31
|
icon?: string;
|
|
25
32
|
/** The languages the module carries locale data for (`AppSpec.locales`); the page picks the viewer's among them. */
|
|
26
33
|
locales?: string[];
|
|
34
|
+
/** The app's URL schemes (`AppSpec.urlSchemes`); the page passes them to the app as `SB_URL_SCHEMES`. */
|
|
35
|
+
urlSchemes?: string[];
|
|
36
|
+
/** The app's CORS proxy (`AppSpec.corsProxy`); the page retries refused cross-origin reads through it. */
|
|
37
|
+
corsProxy?: string;
|
|
38
|
+
/** Hosts the app's requests may not reach (`AppSpec.blockedHosts`). */
|
|
39
|
+
blockedHosts?: string[];
|
|
27
40
|
}
|
|
28
41
|
/**
|
|
29
42
|
* The Vite root: the `Web/` directory of this package (holds `index.html`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAMvC,OAAO,EAAmC,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,qGAAqG;AACrG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oHAAoH;IACpH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yGAAyG;IACzG,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,0GAA0G;IAC1G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAOD;;;;;GAKG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAoBhC;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,UAAU,EAAE,CAWnE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,CAuCjE"}
|
package/node/dist/node/config.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds the Vite config for a set of apps: the registry plugins
|
|
3
3
|
* (plugins/swift-wasm.ts, asset-catalogs.ts, app-manifests.ts), the two
|
|
4
|
-
* pages (landing + app)
|
|
4
|
+
* pages (landing + app), the `define`s the landing page reads, and the apps
|
|
5
|
+
* of other built sites joining this one (plugins/included-sites.ts).
|
|
5
6
|
*
|
|
6
7
|
* `vite.config.ts` calls this with the example apps; the programmatic API
|
|
7
8
|
* (./index.ts) with whatever the caller registered.
|
|
@@ -12,6 +13,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
12
13
|
import { appManifests } from '../plugins/app-manifests.js';
|
|
13
14
|
import { assetCatalogs } from '../plugins/asset-catalogs.js';
|
|
14
15
|
import { bundleResources } from '../plugins/bundle-resources.js';
|
|
16
|
+
import { includedSites, readSiteApps } from '../plugins/included-sites.js';
|
|
15
17
|
import { swiftWasm } from '../plugins/swift-wasm.js';
|
|
16
18
|
import { displayNameOf, validateAppSpecs } from './apps.js';
|
|
17
19
|
/** The package name that marks the Vite root. */
|
|
@@ -57,6 +59,12 @@ export function landingApps(specs) {
|
|
|
57
59
|
entry.icon = `/manifests/${spec.name}-icon.png`;
|
|
58
60
|
if (spec.locales !== undefined)
|
|
59
61
|
entry.locales = [...spec.locales];
|
|
62
|
+
if (spec.urlSchemes?.length)
|
|
63
|
+
entry.urlSchemes = [...spec.urlSchemes];
|
|
64
|
+
if (spec.corsProxy)
|
|
65
|
+
entry.corsProxy = spec.corsProxy;
|
|
66
|
+
if (spec.blockedHosts?.length)
|
|
67
|
+
entry.blockedHosts = [...spec.blockedHosts];
|
|
60
68
|
return entry;
|
|
61
69
|
});
|
|
62
70
|
}
|
|
@@ -68,14 +76,23 @@ export function createViteConfig(options) {
|
|
|
68
76
|
validateAppSpecs(options.apps);
|
|
69
77
|
const root = webRoot();
|
|
70
78
|
const apps = options.apps;
|
|
79
|
+
const sites = (options.sites ?? []).map((dir) => path.resolve(dir));
|
|
80
|
+
const included = sites.flatMap(readSiteApps);
|
|
81
|
+
const landing = [...landingApps(apps), ...included];
|
|
82
|
+
const names = new Set();
|
|
83
|
+
for (const app of landing) {
|
|
84
|
+
if (names.has(app.name))
|
|
85
|
+
throw new Error(`Duplicate app name ${JSON.stringify(app.name)} in the included sites`);
|
|
86
|
+
names.add(app.name);
|
|
87
|
+
}
|
|
71
88
|
return {
|
|
72
89
|
root,
|
|
73
|
-
plugins: [swiftWasm(apps), appManifests(apps), assetCatalogs(apps), bundleResources(apps)],
|
|
90
|
+
plugins: [swiftWasm(apps), appManifests(apps, included), assetCatalogs(apps), bundleResources(apps), includedSites(landing, sites)],
|
|
74
91
|
// Two pages: the landing page at `/` and the app at `/app/`. `mpa` keeps the
|
|
75
92
|
// dev server from answering unknown URLs with the landing page.
|
|
76
93
|
appType: 'mpa',
|
|
77
94
|
define: {
|
|
78
|
-
__SB_APPS__: JSON.stringify(
|
|
95
|
+
__SB_APPS__: JSON.stringify(landing),
|
|
79
96
|
__SB_COMMIT__: JSON.stringify(options.commit ?? 'dev'),
|
|
80
97
|
__SB_BRANCH__: JSON.stringify(options.branch ?? ''),
|
|
81
98
|
__SB_BUILT_AT__: JSON.stringify(new Date().toISOString()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,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,SAAS,EAAE,IAAI;YACf,aAAa,EAAE;gBACb,KAAK,EAAE;oBACL,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC;oBACzC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC;iBAC1C;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -20,7 +20,8 @@ export interface BuildScriptOptions {
|
|
|
20
20
|
/**
|
|
21
21
|
* `bash scripts/build-wasm.sh <app>` in `repoRoot` with `SB_WASM_OPT=0`: hot
|
|
22
22
|
* rebuilds skip wasm-opt, which costs 15-30 s per module and strips the names
|
|
23
|
-
* that make stack traces readable while developing.
|
|
23
|
+
* that make stack traces readable while developing. The script builds through
|
|
24
|
+
* the CLI, so the workspace packages must be built (`npm run build:packages`). Rejects with an Error
|
|
24
25
|
* whose message is the script's combined output when it fails.
|
|
25
26
|
*/
|
|
26
27
|
export declare function runBuildScript(repoRoot: string, app: string, options?: BuildScriptOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../examples.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../examples.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAajE,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,GAAG,SAAS,CAIjD;AAED,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB7G;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAOvD;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,QAAQ,SAAgC,GAAG,OAAO,EAAE,CAoBnF;AAYD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAK9E"}
|
|
@@ -15,8 +15,14 @@ export const EXAMPLE_DESCRIPTIONS = {
|
|
|
15
15
|
Todos: 'navigation, keyed lists, text input, @Observable',
|
|
16
16
|
Gallery: 'layout engine, animation, sheets, Dynamic Type',
|
|
17
17
|
Settings: 'tabs, forms, pickers, path navigation, tasks, GeometryReader',
|
|
18
|
-
FoodTruck: "Apple's Food Truck sample:
|
|
18
|
+
FoodTruck: "Apple's Food Truck sample: Foundation, asset catalogs, ObservableObject",
|
|
19
19
|
HackingWithSwift: 'Five Hacking with SwiftUI projects: gestures, swipe actions, edit mode, alerts, controls',
|
|
20
|
+
CupcakeCorner: 'Hacking with SwiftUI project 10: AsyncImage and URLSession over fetch',
|
|
21
|
+
Bookshelf: 'SwiftData: @Model, @Query, relationships, kept in IndexedDB',
|
|
22
|
+
Journal: 'Files in Documents (Data.write, FileManager), kept in IndexedDB',
|
|
23
|
+
PhotoPicker: "PhotosUI's PhotosPicker over the browser's file chooser",
|
|
24
|
+
Filters: 'Core Image: UIImage from data, built-in CIFilters, a QR code',
|
|
25
|
+
HotProspects: 'Hacking with SwiftUI project 16: a code scanner and reminders over the Notification API',
|
|
20
26
|
};
|
|
21
27
|
const DEFAULT_TOOLCHAIN_BIN = '/root/.local/share/swiftly/toolchains/6.4.0/usr/bin';
|
|
22
28
|
/**
|
|
@@ -33,7 +39,8 @@ export function toolchainBin() {
|
|
|
33
39
|
/**
|
|
34
40
|
* `bash scripts/build-wasm.sh <app>` in `repoRoot` with `SB_WASM_OPT=0`: hot
|
|
35
41
|
* rebuilds skip wasm-opt, which costs 15-30 s per module and strips the names
|
|
36
|
-
* that make stack traces readable while developing.
|
|
42
|
+
* that make stack traces readable while developing. The script builds through
|
|
43
|
+
* the CLI, so the workspace packages must be built (`npm run build:packages`). Rejects with an Error
|
|
37
44
|
* whose message is the script's combined output when it fails.
|
|
38
45
|
*/
|
|
39
46
|
export function runBuildScript(repoRoot, app, options = {}) {
|
|
@@ -82,6 +89,8 @@ export function exampleAppSpecs(repoRoot = path.resolve(webRoot(), '..')) {
|
|
|
82
89
|
name,
|
|
83
90
|
wasm: path.join(publicDir, `${name}.wasm`),
|
|
84
91
|
catalogs: findAssetCatalogs(dir),
|
|
92
|
+
// scripts/build-wasm.sh builds through the CLI with its default `locales`.
|
|
93
|
+
locales: ['en'],
|
|
85
94
|
watch: [path.join(repoRoot, 'Sources'), dir],
|
|
86
95
|
build: () => runBuildScript(repoRoot, name, {
|
|
87
96
|
onOutput: (line) => console.log(` ${line}`),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.js","sourceRoot":"","sources":["../../examples.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM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,EAAE,MAAM,CAAC,IAAI,KAAK;QAC3F,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,IAAI,EAAE;KACnG,CAAC;AACJ,CAAC"}
|
|
@@ -57,5 +57,8 @@ export declare function manifestRequestApp(url: string): string | null;
|
|
|
57
57
|
export declare function iconRequestApp(url: string): string | null;
|
|
58
58
|
/** `name -> icon URL` for the specs that bring their own icon (what the app page reads). */
|
|
59
59
|
export declare function appIconUrls(specs: readonly ManifestSpec[]): Record<string, string>;
|
|
60
|
-
export declare function appManifests(specs: readonly ManifestSpec[]
|
|
60
|
+
export declare function appManifests(specs: readonly ManifestSpec[], included?: readonly {
|
|
61
|
+
name: string;
|
|
62
|
+
icon?: string;
|
|
63
|
+
}[]): Plugin;
|
|
61
64
|
//# sourceMappingURL=app-manifests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-manifests.d.ts","sourceRoot":"","sources":["../../../plugins/app-manifests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAA2B,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGxE,eAAO,MAAM,YAAY,cAAc,CAAC;AAExC,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,MAAM,CAAC,CAAC;AAE1F,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,CAAC;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B,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGzD;AAED,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIlF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,EAAE,QAAQ,GAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EAAO,GAAG,MAAM,CAqE9H"}
|
|
@@ -95,9 +95,10 @@ export function appIconUrls(specs) {
|
|
|
95
95
|
icons[spec.name] = manifestIconPath(spec.name);
|
|
96
96
|
return icons;
|
|
97
97
|
}
|
|
98
|
-
export function appManifests(specs) {
|
|
98
|
+
export function appManifests(specs, included = []) {
|
|
99
99
|
const byName = new Map(specs.map((spec) => [spec.name, spec]));
|
|
100
|
-
|
|
100
|
+
// The apps of included sites (plugins/included-sites.ts) bring their icons.
|
|
101
|
+
const icons = { ...appIconUrls(specs), ...Object.fromEntries(included.flatMap((app) => (app.icon ? [[app.name, app.icon]] : []))) };
|
|
101
102
|
const isAppPage = (pathname) => /(^|\/)app\/(index\.html)?$/.test(pathname.split('?')[0] ?? '');
|
|
102
103
|
return {
|
|
103
104
|
name: 'swiftbrowser:app-manifests',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-manifests.js","sourceRoot":"","sources":["../../../plugins/app-manifests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAgB,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AAkBxC,+DAA+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Q,CAAC;oBACZ,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,GAAG,YAAY,IAAI,IAAI,CAAC,IAAI,cAAc;oBACpD,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC;iBAC9B,CAAC,CAAC;gBACH,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;oBACd,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;wBAC3B,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,UAAU,IAAI,CAAC,IAAI,0BAA0B,CAAC,CAAC;wBACrE,SAAS;oBACX,CAAC;oBACD,IAAI,CAAC,QAAQ,CAAC;wBACZ,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,GAAG,YAAY,IAAI,IAAI,CAAC,IAAI,WAAW;wBACjD,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;qBAChC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
* - a folder whose `Contents.json` has `properties.provides-namespace: true`
|
|
15
15
|
* prefixes everything inside with `<folder>/` (nested folders chain);
|
|
16
16
|
* - `<name>.imageset`: the `2x` entry is preferred (then `1x`, `3x`, then the
|
|
17
|
-
* first entry with a file); points = pixels ÷ scale
|
|
18
|
-
*
|
|
17
|
+
* first entry with a file); points = pixels ÷ scale. A PDF (vector
|
|
18
|
+
* artwork) is published as the PNG pdf.js renders it to at 3×, its size
|
|
19
|
+
* in points from the page (pdfImages.ts);
|
|
20
|
+
* - `<name>.symbolset`: an SVG drawn as a template (`kind: "symbol"`); an SF
|
|
21
|
+
* Symbols template is published as its Regular glyph (symbolTemplates.ts);
|
|
19
22
|
* - `<name>.colorset`: the entry without appearances is `light`, the one with
|
|
20
23
|
* `luminosity: dark` is `dark`; idiom and contrast variants are ignored.
|
|
21
24
|
*/
|
|
@@ -31,6 +34,12 @@ export interface CatalogFile {
|
|
|
31
34
|
/** Absolute path of the source file on disk. */
|
|
32
35
|
source: string;
|
|
33
36
|
contentType: string;
|
|
37
|
+
/**
|
|
38
|
+
* `pdf`: the source is a PDF, published as the PNG it renders to
|
|
39
|
+
* (pdfImages.ts). `symbol`: an SF Symbols template, published as its
|
|
40
|
+
* Regular glyph (symbolTemplates.ts).
|
|
41
|
+
*/
|
|
42
|
+
render?: 'pdf' | 'symbol';
|
|
34
43
|
}
|
|
35
44
|
export interface BuiltCatalog {
|
|
36
45
|
manifest: AssetCatalog;
|
|
@@ -61,6 +70,8 @@ interface ColorSetContents {
|
|
|
61
70
|
blue?: string;
|
|
62
71
|
alpha?: string;
|
|
63
72
|
};
|
|
73
|
+
/** A system color instead of components (`systemIndigoColor`). */
|
|
74
|
+
reference?: string;
|
|
64
75
|
};
|
|
65
76
|
}[];
|
|
66
77
|
}
|
|
@@ -78,7 +89,6 @@ export declare function componentsToCSS(components: {
|
|
|
78
89
|
blue?: string;
|
|
79
90
|
alpha?: string;
|
|
80
91
|
}): string;
|
|
81
|
-
/** The `light` / `dark` CSS colors of a colorset, or null when it has no usable entry. */
|
|
82
92
|
export declare function parseColorSet(contents: ColorSetContents): AssetColor | null;
|
|
83
93
|
export interface PixelSize {
|
|
84
94
|
width: number;
|
|
@@ -113,6 +123,8 @@ export declare function catalogRequestFile(url: string): {
|
|
|
113
123
|
app: string;
|
|
114
124
|
fileName: string;
|
|
115
125
|
} | null;
|
|
126
|
+
/** What a catalog file publishes: the file, or the PNG its PDF renders to. */
|
|
127
|
+
export declare function catalogFileContents(file: CatalogFile): Promise<Buffer>;
|
|
116
128
|
/** The fields of an {@link AppSpec} the catalog plugin reads. */
|
|
117
129
|
export type CatalogSpec = Pick<AppSpec, 'name' | 'catalogs'>;
|
|
118
130
|
export declare function assetCatalogs(specs: readonly CatalogSpec[]): Plugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-catalogs.d.ts","sourceRoot":"","sources":["../../../plugins/asset-catalogs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asset-catalogs.d.ts","sourceRoot":"","sources":["../../../plugins/asset-catalogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGzD,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,UAAU,EAEhB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,uCAAuC;AACvC,MAAM,WAAW,WAAW;IAC1B,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,2BAA2B;IAC3B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAChC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAiBD,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClE;AAID,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE;YAAE,UAAU,CAAC,EAAE,MAAM,CAAC;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