@yaks/platform 0.0.0-stage → 0.2.36
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/LICENSE +202 -0
- package/README.md +261 -2
- package/_client-blobs.js +7 -0
- package/_client-error.js +70 -0
- package/_client-modal.js +3 -0
- package/_client-replica.js +5 -0
- package/_client-review.js +1 -0
- package/_client-schema.js +1 -0
- package/_client-vault.js +31 -0
- package/_edit-query.js +1 -0
- package/_uploads.js +4 -0
- package/account-browser.js +67 -0
- package/account-browser.js.map +1 -0
- package/account-browser.ts +87 -0
- package/account-rows.js +130 -0
- package/account-rows.js.map +1 -0
- package/account-rows.ts +237 -0
- package/admin-visits-view.js +65 -0
- package/admin-visits-view.js.map +1 -0
- package/admin-visits-view.ts +120 -0
- package/admin-visits.js +143 -0
- package/admin-visits.js.map +1 -0
- package/admin-visits.ts +211 -0
- package/admit-graph.js +8 -0
- package/admit-graph.js.map +1 -0
- package/admit-graph.ts +10 -0
- package/agent-guide.js +368 -0
- package/agent-guide.js.map +1 -0
- package/agent-guide.ts +450 -0
- package/agents-browser.js +143 -0
- package/agents-browser.js.map +1 -0
- package/agents-browser.ts +141 -0
- package/agents-view.js +129 -0
- package/agents-view.js.map +1 -0
- package/agents-view.ts +236 -0
- package/agents.js +148 -0
- package/agents.js.map +1 -0
- package/agents.ts +150 -0
- package/app-actions.js +56 -0
- package/app-actions.js.map +1 -0
- package/app-actions.ts +61 -0
- package/app-authority.js +280 -0
- package/app-authority.js.map +1 -0
- package/app-authority.ts +356 -0
- package/app-canvas-browser.js +308 -0
- package/app-canvas-browser.js.map +1 -0
- package/app-canvas-browser.ts +377 -0
- package/app-canvas-view.js +244 -0
- package/app-canvas-view.js.map +1 -0
- package/app-canvas-view.ts +399 -0
- package/app-canvas.js +87 -0
- package/app-canvas.js.map +1 -0
- package/app-canvas.ts +170 -0
- package/app-client.js +521 -0
- package/app-client.js.map +1 -0
- package/app-client.ts +562 -0
- package/app-command.js +108 -0
- package/app-command.js.map +1 -0
- package/app-command.ts +155 -0
- package/app-commands.js +334 -0
- package/app-commands.js.map +1 -0
- package/app-commands.ts +379 -0
- package/app-decision.js +69 -0
- package/app-decision.js.map +1 -0
- package/app-decision.ts +61 -0
- package/app-effects.js +43 -0
- package/app-effects.js.map +1 -0
- package/app-effects.ts +53 -0
- package/app-file.js +252 -0
- package/app-file.js.map +1 -0
- package/app-file.ts +362 -0
- package/app-friends.js +60 -0
- package/app-friends.js.map +1 -0
- package/app-friends.ts +81 -0
- package/app-graph.js +9 -0
- package/app-graph.js.map +1 -0
- package/app-graph.ts +9 -0
- package/app-icon.js +59 -0
- package/app-icon.js.map +1 -0
- package/app-icon.ts +121 -0
- package/app-made.js +164 -0
- package/app-made.js.map +1 -0
- package/app-made.ts +306 -0
- package/app-outbound.js +72 -0
- package/app-outbound.js.map +1 -0
- package/app-outbound.ts +109 -0
- package/app-outbox.js +42 -0
- package/app-outbox.js.map +1 -0
- package/app-outbox.ts +46 -0
- package/app-patch.js +75 -0
- package/app-patch.js.map +1 -0
- package/app-patch.ts +106 -0
- package/app-read.js +101 -0
- package/app-read.js.map +1 -0
- package/app-read.ts +126 -0
- package/app-role-tools.js +232 -0
- package/app-role-tools.js.map +1 -0
- package/app-role-tools.ts +258 -0
- package/app-roles.js +91 -0
- package/app-roles.js.map +1 -0
- package/app-roles.ts +76 -0
- package/app-session-access.js +109 -0
- package/app-session-access.js.map +1 -0
- package/app-session-access.ts +145 -0
- package/app-starter.js +109 -0
- package/app-starter.js.map +1 -0
- package/app-starter.ts +123 -0
- package/app-storage.js +38 -0
- package/app-storage.js.map +1 -0
- package/app-storage.ts +54 -0
- package/app-style-guide.js +138 -0
- package/app-style-guide.js.map +1 -0
- package/app-style-guide.ts +195 -0
- package/app-subs.js +89 -0
- package/app-subs.js.map +1 -0
- package/app-subs.ts +110 -0
- package/app-tests.js +54 -0
- package/app-tests.js.map +1 -0
- package/app-tests.ts +56 -0
- package/app-tile.js +209 -0
- package/app-tile.js.map +1 -0
- package/app-tile.ts +227 -0
- package/app-transfer.js +188 -0
- package/app-transfer.js.map +1 -0
- package/app-transfer.ts +281 -0
- package/app-vocab.js +52 -0
- package/app-vocab.js.map +1 -0
- package/app-vocab.ts +43 -0
- package/app-words.js +55 -0
- package/app-words.js.map +1 -0
- package/app-words.ts +73 -0
- package/app-worker.js +28 -0
- package/app-worker.js.map +1 -0
- package/app-worker.ts +38 -0
- package/app-writes.js +132 -0
- package/app-writes.js.map +1 -0
- package/app-writes.ts +128 -0
- package/asset-bytes.js +57 -0
- package/asset-bytes.js.map +1 -0
- package/asset-bytes.ts +90 -0
- package/asset-response.js +28 -0
- package/asset-response.js.map +1 -0
- package/asset-response.ts +46 -0
- package/asset-url.js +556 -0
- package/asset-url.js.map +1 -0
- package/asset-url.ts +774 -0
- package/attribution-vocab.js +14 -0
- package/attribution-vocab.js.map +1 -0
- package/attribution-vocab.ts +11 -0
- package/authorship-graph.js +8 -0
- package/authorship-graph.js.map +1 -0
- package/authorship-graph.ts +10 -0
- package/badge.js +98 -0
- package/blob-images.js +206 -0
- package/blob-images.js.map +1 -0
- package/blob-images.ts +323 -0
- package/blob-posters.js +125 -0
- package/blob-posters.js.map +1 -0
- package/blob-posters.ts +207 -0
- package/blob-routes.js +14 -0
- package/blob-routes.js.map +1 -0
- package/blob-routes.ts +25 -0
- package/bots.js +77 -0
- package/bots.js.map +1 -0
- package/bots.ts +93 -0
- package/browser-mockup.js +81 -0
- package/browser-mockup.js.map +1 -0
- package/browser-mockup.ts +105 -0
- package/browser-record.js +55 -0
- package/browser-record.js.map +1 -0
- package/browser-record.ts +66 -0
- package/browser-scroll.js +90 -0
- package/browser-scroll.js.map +1 -0
- package/browser-scroll.ts +108 -0
- package/browser-stream.js +79 -0
- package/browser-stream.js.map +1 -0
- package/browser-stream.ts +84 -0
- package/browser-trace.js +252 -0
- package/browser-trace.js.map +1 -0
- package/browser-trace.ts +330 -0
- package/browser-viewer.js +236 -0
- package/browser-viewer.js.map +1 -0
- package/browser-viewer.ts +233 -0
- package/browser-visit.js +1522 -0
- package/browser-visit.js.map +1 -0
- package/browser-visit.ts +2179 -0
- package/browser-wire.js +242 -0
- package/browser-wire.js.map +1 -0
- package/browser-wire.ts +262 -0
- package/budget.js +17 -0
- package/budget.js.map +1 -0
- package/budget.ts +42 -0
- package/cli.js +52 -0
- package/cli.js.map +1 -0
- package/cli.ts +55 -0
- package/client-modules.js +24 -0
- package/client-modules.js.map +1 -0
- package/client-modules.ts +24 -0
- package/client-routes.js +83 -0
- package/client-routes.js.map +1 -0
- package/client-routes.ts +104 -0
- package/client-words.js +62 -0
- package/client-words.js.map +1 -0
- package/client-words.ts +77 -0
- package/client.js +709 -0
- package/comp.js +2 -0
- package/comp.js.map +1 -0
- package/comp.ts +15 -0
- package/config.js +497 -0
- package/config.js.map +1 -0
- package/config.ts +287 -0
- package/connect-parts.js +107 -0
- package/connect-parts.js.map +1 -0
- package/connect-parts.ts +165 -0
- package/connected-activity-browser.js +301 -0
- package/connected-activity-browser.js.map +1 -0
- package/connected-activity-browser.ts +341 -0
- package/connected-activity-view.js +55 -0
- package/connected-activity-view.js.map +1 -0
- package/connected-activity-view.ts +81 -0
- package/connected-activity-wire.js +165 -0
- package/connected-activity-wire.js.map +1 -0
- package/connected-activity-wire.ts +171 -0
- package/connected-activity.css +156 -0
- package/connected-activity.js +185 -0
- package/connected-activity.js.map +1 -0
- package/connected-activity.ts +278 -0
- package/connection-icon-browser.js +50 -0
- package/connection-icon-browser.js.map +1 -0
- package/connection-icon-browser.ts +52 -0
- package/connections-browser.js +393 -0
- package/connections-browser.js.map +1 -0
- package/connections-browser.ts +465 -0
- package/connections-page.js +178 -0
- package/connections-page.js.map +1 -0
- package/connections-page.ts +461 -0
- package/connections-view.js +1215 -0
- package/connections-view.js.map +1 -0
- package/connections-view.ts +2239 -0
- package/connector-upload.js +94 -0
- package/connector-upload.js.map +1 -0
- package/connector-upload.ts +146 -0
- package/consent.js +2 -0
- package/consent.js.map +1 -0
- package/consent.ts +3 -0
- package/cookie.js +53 -0
- package/cookie.js.map +1 -0
- package/cookie.ts +75 -0
- package/copy.js +104 -0
- package/corner.js +226 -0
- package/credential-draft-move.js +154 -0
- package/credential-draft-move.js.map +1 -0
- package/credential-draft-move.ts +197 -0
- package/credential-draft-place.js +2 -0
- package/credential-draft-place.js.map +1 -0
- package/credential-draft-place.ts +4 -0
- package/credential-drafts.js +66 -0
- package/credential-drafts.js.map +1 -0
- package/credential-drafts.ts +93 -0
- package/dashboard-browser.js +149 -0
- package/dashboard-browser.js.map +1 -0
- package/dashboard-browser.ts +184 -0
- package/dashboard-view.js +293 -0
- package/dashboard-view.js.map +1 -0
- package/dashboard-view.ts +423 -0
- package/dashboard.js +268 -0
- package/dashboard.js.map +1 -0
- package/dashboard.ts +436 -0
- package/deno.json +1 -0
- package/describe-graph.js +8 -0
- package/describe-graph.js.map +1 -0
- package/describe-graph.ts +7 -0
- package/directory-derived.js +142 -0
- package/directory-derived.js.map +1 -0
- package/directory-derived.ts +198 -0
- package/directory-index-move.js +77 -0
- package/directory-index-move.js.map +1 -0
- package/directory-index-move.ts +59 -0
- package/directory-index.js +382 -0
- package/directory-index.js.map +1 -0
- package/directory-index.ts +550 -0
- package/directory-pages.js +41 -0
- package/directory-pages.js.map +1 -0
- package/directory-pages.ts +71 -0
- package/directory-route.js +129 -0
- package/directory-route.js.map +1 -0
- package/directory-route.ts +189 -0
- package/directory-vocab.js +58 -0
- package/directory-vocab.js.map +1 -0
- package/directory-vocab.ts +46 -0
- package/document-graph.js +86 -0
- package/document-graph.js.map +1 -0
- package/document-graph.ts +93 -0
- package/document-ocr.js +146 -0
- package/document-ocr.js.map +1 -0
- package/document-ocr.ts +204 -0
- package/documents.js +50 -0
- package/documents.js.map +1 -0
- package/documents.ts +64 -0
- package/domain-pages.js +221 -0
- package/domain-pages.js.map +1 -0
- package/domain-pages.ts +586 -0
- package/domain-settings.js +88 -0
- package/domain-settings.js.map +1 -0
- package/domain-settings.ts +132 -0
- package/domain-transfer.js +138 -0
- package/domain-transfer.js.map +1 -0
- package/domain-transfer.ts +190 -0
- package/donation-loans.js +176 -0
- package/donation-loans.js.map +1 -0
- package/donation-loans.ts +271 -0
- package/draft-choice.js +136 -0
- package/draft-choice.js.map +1 -0
- package/draft-choice.ts +310 -0
- package/drawing.js +27 -0
- package/drawing.js.map +1 -0
- package/drawing.ts +40 -0
- package/early-report.js +18 -0
- package/early-report.js.map +1 -0
- package/early-report.ts +31 -0
- package/edit-client-path.js +2 -0
- package/edit-client-path.js.map +1 -0
- package/edit-client-path.ts +1 -0
- package/edit-mode.js +920 -0
- package/edit-mode.js.map +1 -0
- package/edit-mode.ts +1003 -0
- package/edit-sync.js +61 -0
- package/edit-sync.js.map +1 -0
- package/edit-sync.ts +83 -0
- package/edit.js +265 -0
- package/embed-graph.js +11 -0
- package/embed-graph.js.map +1 -0
- package/embed-graph.ts +8 -0
- package/embedded-payment.js +211 -0
- package/embedded-payment.js.map +1 -0
- package/embedded-payment.ts +290 -0
- package/entry-actions-browser.js +43 -0
- package/entry-actions-browser.js.map +1 -0
- package/entry-actions-browser.ts +64 -0
- package/entry-actions.js +56 -0
- package/entry-actions.js.map +1 -0
- package/entry-actions.ts +59 -0
- package/escape.js +14 -0
- package/escape.js.map +1 -0
- package/escape.ts +24 -0
- package/face-input.js +6 -0
- package/face-input.js.map +1 -0
- package/face-input.ts +14 -0
- package/facebook.js +370 -0
- package/facebook.js.map +1 -0
- package/facebook.ts +474 -0
- package/facets.js +142 -0
- package/facets.js.map +1 -0
- package/facets.ts +89 -0
- package/fee.js +45 -0
- package/fee.js.map +1 -0
- package/fee.ts +51 -0
- package/fence.js +164 -0
- package/fence.js.map +1 -0
- package/fence.ts +223 -0
- package/file-metadata.js +135 -0
- package/file-metadata.js.map +1 -0
- package/file-metadata.ts +177 -0
- package/file-operation.js +51 -0
- package/file-operation.js.map +1 -0
- package/file-operation.ts +32 -0
- package/file-redirects.js +72 -0
- package/file-redirects.js.map +1 -0
- package/file-redirects.ts +74 -0
- package/file-root.js +8 -0
- package/file-root.js.map +1 -0
- package/file-root.ts +24 -0
- package/files-routes.js +203 -0
- package/files-routes.js.map +1 -0
- package/files-routes.ts +282 -0
- package/files.js +369 -0
- package/files.js.map +1 -0
- package/files.ts +522 -0
- package/fingerprint.js +217 -0
- package/fingerprint.js.map +1 -0
- package/fingerprint.ts +314 -0
- package/firsts.js +335 -0
- package/firsts.js.map +1 -0
- package/firsts.ts +368 -0
- package/friends-at.js +78 -0
- package/friends-at.js.map +1 -0
- package/friends-at.ts +115 -0
- package/friends-browser.js +66 -0
- package/friends-browser.js.map +1 -0
- package/friends-browser.ts +77 -0
- package/friends-dock-browser.js +375 -0
- package/friends-dock-browser.js.map +1 -0
- package/friends-dock-browser.ts +408 -0
- package/friends-dock-view.js +363 -0
- package/friends-dock-view.js.map +1 -0
- package/friends-dock-view.ts +592 -0
- package/friends-view.js +33 -0
- package/friends-view.js.map +1 -0
- package/friends-view.ts +69 -0
- package/friends.js +153 -0
- package/friends.js.map +1 -0
- package/friends.ts +200 -0
- package/fundraising-orders.js +197 -0
- package/fundraising-orders.js.map +1 -0
- package/fundraising-orders.ts +283 -0
- package/fundraising.js +165 -0
- package/fundraising.js.map +1 -0
- package/fundraising.ts +215 -0
- package/funnel.js +141 -0
- package/funnel.js.map +1 -0
- package/funnel.ts +284 -0
- package/gift-savings.js +19 -0
- package/gift-savings.js.map +1 -0
- package/gift-savings.ts +29 -0
- package/git-history.js +331 -0
- package/git-history.js.map +1 -0
- package/git-history.ts +481 -0
- package/giving-browser.js +35 -0
- package/giving-browser.js.map +1 -0
- package/giving-browser.ts +40 -0
- package/giving-pages.js +284 -0
- package/giving-pages.js.map +1 -0
- package/giving-pages.ts +418 -0
- package/giving-view.js +244 -0
- package/giving-view.js.map +1 -0
- package/giving-view.ts +509 -0
- package/giving.js +198 -0
- package/giving.js.map +1 -0
- package/giving.ts +280 -0
- package/gmail-mailbox.js +52 -0
- package/gmail-mailbox.js.map +1 -0
- package/gmail-mailbox.ts +74 -0
- package/graves.js +136 -0
- package/graves.js.map +1 -0
- package/graves.ts +180 -0
- package/hashed.js +499 -0
- package/hashed.js.map +1 -0
- package/hashed.ts +676 -0
- package/home/assets.js +15 -0
- package/home/assets.js.map +1 -0
- package/home/assets.ts +16 -0
- package/home/brands/stripe.svg +12 -0
- package/home/brands/zoom.svg +34 -0
- package/home/demos.js +413 -0
- package/home/demos.js.map +1 -0
- package/home/demos.ts +431 -0
- package/home/games.js +112 -0
- package/home/games.js.map +1 -0
- package/home/games.ts +137 -0
- package/home/icons.js +41 -0
- package/home/icons.js.map +1 -0
- package/home/icons.ts +42 -0
- package/home/mascot/calculating.webp +0 -0
- package/home/mascot/flag.webp +0 -0
- package/home/mascot/letter.webp +0 -0
- package/home/mascot/plane.webp +0 -0
- package/home/mascot/plug.webp +0 -0
- package/home/mascot/thinking.webp +0 -0
- package/home/mascot/typing.webp +0 -0
- package/home/mascot/wave.webp +0 -0
- package/home/mod.tsx +517 -0
- package/home/parts.js +149 -0
- package/home/parts.js.map +1 -0
- package/home/parts.ts +45 -0
- package/home/phone.tsx +152 -0
- package/home/scenes.tsx +212 -0
- package/home/sky.js +930 -0
- package/home/sky.tsx +479 -0
- package/home/story.js +392 -0
- package/home/style.css +1304 -0
- package/home/words.js +2 -0
- package/home/words.js.map +1 -0
- package/home/words.ts +8 -0
- package/home/yak.js +146 -0
- package/home/yak_test.tsx +111 -0
- package/home-router.js +30 -0
- package/home-router.js.map +1 -0
- package/home-router.ts +41 -0
- package/host.js +58 -0
- package/host.js.map +1 -0
- package/host.ts +97 -0
- package/hosted-page.js +126 -0
- package/hosted-page.js.map +1 -0
- package/hosted-page.ts +295 -0
- package/install-browser.js +89 -0
- package/install-browser.js.map +1 -0
- package/install-browser.ts +99 -0
- package/install-icons.js +271 -0
- package/install-icons.js.map +1 -0
- package/install-icons.ts +366 -0
- package/installs.js +197 -0
- package/installs.js.map +1 -0
- package/installs.ts +270 -0
- package/instrument.js +50 -0
- package/instrument.js.map +1 -0
- package/instrument.ts +55 -0
- package/integration-icons.js +138 -0
- package/integration-icons.js.map +1 -0
- package/integration-icons.ts +198 -0
- package/interaction-browser.js +95 -0
- package/interaction-browser.js.map +1 -0
- package/interaction-browser.ts +107 -0
- package/interaction-report.js +399 -0
- package/interaction-report.js.map +1 -0
- package/interaction-report.ts +450 -0
- package/interaction.js +273 -0
- package/interaction.js.map +1 -0
- package/interaction.ts +290 -0
- package/invite-browser.js +98 -0
- package/invite-browser.js.map +1 -0
- package/invite-browser.ts +123 -0
- package/invite-view.js +100 -0
- package/invite-view.js.map +1 -0
- package/invite-view.ts +137 -0
- package/kept.js +520 -0
- package/kept.js.map +1 -0
- package/kept.ts +821 -0
- package/kills-graph.js +18 -0
- package/kills-graph.js.map +1 -0
- package/kills-graph.ts +16 -0
- package/ladder.js +418 -0
- package/ladder.js.map +1 -0
- package/ladder.ts +510 -0
- package/lenses-graph.js +24 -0
- package/lenses-graph.js.map +1 -0
- package/lenses-graph.ts +27 -0
- package/lenses.js +197 -0
- package/lenses.js.map +1 -0
- package/lenses.ts +204 -0
- package/lent.js +32 -0
- package/lent.js.map +1 -0
- package/lent.ts +95 -0
- package/letters.js +134 -0
- package/letters.js.map +1 -0
- package/letters.ts +251 -0
- package/lexicon-graph.js +11 -0
- package/lexicon-graph.js.map +1 -0
- package/lexicon-graph.ts +7 -0
- package/link-preview.js +111 -0
- package/link-preview.js.map +1 -0
- package/link-preview.ts +136 -0
- package/listing.js +262 -0
- package/listing.js.map +1 -0
- package/listing.ts +330 -0
- package/local-time.js +32 -0
- package/local-time.js.map +1 -0
- package/local-time.ts +41 -0
- package/located.js +380 -0
- package/located.js.map +1 -0
- package/located.ts +471 -0
- package/log-graph.js +7 -0
- package/log-graph.js.map +1 -0
- package/log-graph.ts +9 -0
- package/lower-graph.js +7 -0
- package/lower-graph.js.map +1 -0
- package/lower-graph.ts +9 -0
- package/mail-request.js +32 -0
- package/mail-request.js.map +1 -0
- package/mail-request.ts +29 -0
- package/mail-senders.js +40 -0
- package/mail-senders.js.map +1 -0
- package/mail-senders.ts +47 -0
- package/managed-browser-pilot.js +151 -0
- package/managed-browser-pilot.js.map +1 -0
- package/managed-browser-pilot.ts +230 -0
- package/managed-browser-sites.js +43 -0
- package/managed-browser-sites.js.map +1 -0
- package/managed-browser-sites.ts +41 -0
- package/managed-browser-wire.js +142 -0
- package/managed-browser-wire.js.map +1 -0
- package/managed-browser-wire.ts +140 -0
- package/managed-browser.js +529 -0
- package/managed-browser.js.map +1 -0
- package/managed-browser.ts +740 -0
- package/manifest.js +425 -0
- package/manifest.js.map +1 -0
- package/manifest.ts +468 -0
- package/metadata-effect.js +61 -0
- package/metadata-effect.js.map +1 -0
- package/metadata-effect.ts +59 -0
- package/meter-graph.js +205 -0
- package/meter-graph.js.map +1 -0
- package/meter-graph.ts +238 -0
- package/meter-vocab.js +8 -0
- package/meter-vocab.js.map +1 -0
- package/meter-vocab.ts +4 -0
- package/meter.js +402 -0
- package/meter.js.map +1 -0
- package/meter.ts +697 -0
- package/mod.js +14 -0
- package/mod.js.map +1 -0
- package/mod.ts +16 -0
- package/models-vocab.js +25 -0
- package/models-vocab.js.map +1 -0
- package/models-vocab.ts +15 -0
- package/monogram.js +32 -0
- package/monogram.js.map +1 -0
- package/monogram.ts +46 -0
- package/mover.js +6 -0
- package/mover.js.map +1 -0
- package/mover.ts +45 -0
- package/named.js +136 -0
- package/named.js.map +1 -0
- package/named.ts +169 -0
- package/names.js +196 -0
- package/names.js.map +1 -0
- package/names.ts +252 -0
- package/notices-vocab.js +20 -0
- package/notices-vocab.js.map +1 -0
- package/notices-vocab.ts +28 -0
- package/numbers.js +85 -0
- package/numbers.js.map +1 -0
- package/numbers.ts +97 -0
- package/object-hosts.js +137 -0
- package/object-hosts.js.map +1 -0
- package/object-hosts.ts +153 -0
- package/open-script.js +235 -0
- package/open-script.js.map +1 -0
- package/open-script.ts +253 -0
- package/opening.js +31 -0
- package/opening.js.map +1 -0
- package/opening.ts +28 -0
- package/operator-activity-view.js +82 -0
- package/operator-activity-view.js.map +1 -0
- package/operator-activity-view.ts +85 -0
- package/operator-activity.js +220 -0
- package/operator-activity.js.map +1 -0
- package/operator-activity.ts +293 -0
- package/operator-brief.js +36 -0
- package/operator-brief.js.map +1 -0
- package/operator-brief.ts +76 -0
- package/operator-copy-browser.js +67 -0
- package/operator-copy-browser.js.map +1 -0
- package/operator-copy-browser.ts +71 -0
- package/operator-corner.js +266 -0
- package/operator-corner.js.map +1 -0
- package/operator-corner.ts +300 -0
- package/operator-decisions.js +19 -0
- package/operator-decisions.js.map +1 -0
- package/operator-decisions.ts +18 -0
- package/operator-docs.js +152 -0
- package/operator-docs.js.map +1 -0
- package/operator-docs.ts +196 -0
- package/operator-door.js +10 -0
- package/operator-door.js.map +1 -0
- package/operator-door.ts +14 -0
- package/operator-drafts-browser.js +28 -0
- package/operator-drafts-browser.js.map +1 -0
- package/operator-drafts-browser.ts +32 -0
- package/operator-drafts.js +60 -0
- package/operator-drafts.js.map +1 -0
- package/operator-drafts.ts +80 -0
- package/operator-early-draft.js +110 -0
- package/operator-early-draft.js.map +1 -0
- package/operator-early-draft.ts +125 -0
- package/operator-go-browser.js +130 -0
- package/operator-go-browser.js.map +1 -0
- package/operator-go-browser.ts +182 -0
- package/operator-go-step.js +86 -0
- package/operator-go-step.js.map +1 -0
- package/operator-go-step.ts +92 -0
- package/operator-go-tool.js +49 -0
- package/operator-go-tool.js.map +1 -0
- package/operator-go-tool.ts +31 -0
- package/operator-go.js +68 -0
- package/operator-go.js.map +1 -0
- package/operator-go.ts +100 -0
- package/operator-graph.js +46 -0
- package/operator-graph.js.map +1 -0
- package/operator-graph.ts +60 -0
- package/operator-handoff.js +91 -0
- package/operator-handoff.js.map +1 -0
- package/operator-handoff.ts +104 -0
- package/operator-machine.js +136 -0
- package/operator-machine.js.map +1 -0
- package/operator-machine.ts +168 -0
- package/operator-matches-browser.js +155 -0
- package/operator-matches-browser.js.map +1 -0
- package/operator-matches-browser.ts +178 -0
- package/operator-matches-view.js +147 -0
- package/operator-matches-view.js.map +1 -0
- package/operator-matches-view.ts +224 -0
- package/operator-matches.js +65 -0
- package/operator-matches.js.map +1 -0
- package/operator-matches.ts +120 -0
- package/operator-memory.js +119 -0
- package/operator-memory.js.map +1 -0
- package/operator-memory.ts +122 -0
- package/operator-mic.ts +40 -0
- package/operator-model.js +144 -0
- package/operator-model.js.map +1 -0
- package/operator-model.ts +154 -0
- package/operator-notes.js +32 -0
- package/operator-notes.js.map +1 -0
- package/operator-notes.ts +40 -0
- package/operator-opening-browser.js +184 -0
- package/operator-opening-browser.js.map +1 -0
- package/operator-opening-browser.ts +195 -0
- package/operator-owner.js +391 -0
- package/operator-owner.js.map +1 -0
- package/operator-owner.ts +392 -0
- package/operator-page-context.js +121 -0
- package/operator-page-context.js.map +1 -0
- package/operator-page-context.ts +143 -0
- package/operator-page-image.js +38 -0
- package/operator-page-image.js.map +1 -0
- package/operator-page-image.ts +42 -0
- package/operator-panel-browser.js +601 -0
- package/operator-panel-browser.js.map +1 -0
- package/operator-panel-browser.ts +669 -0
- package/operator-panel-view.js +69 -0
- package/operator-panel-view.js.map +1 -0
- package/operator-panel-view.ts +100 -0
- package/operator-panel.js +131 -0
- package/operator-panel.js.map +1 -0
- package/operator-panel.ts +155 -0
- package/operator-push.tsx +112 -0
- package/operator-record.js +55 -0
- package/operator-record.js.map +1 -0
- package/operator-record.ts +92 -0
- package/operator-replies.js +240 -0
- package/operator-replies.js.map +1 -0
- package/operator-replies.ts +281 -0
- package/operator-reply-view.js +117 -0
- package/operator-reply-view.js.map +1 -0
- package/operator-reply-view.ts +185 -0
- package/operator-safety.js +30 -0
- package/operator-safety.js.map +1 -0
- package/operator-safety.ts +53 -0
- package/operator-settings-browser.js +257 -0
- package/operator-settings-browser.js.map +1 -0
- package/operator-settings-browser.ts +290 -0
- package/operator-settings-view.js +291 -0
- package/operator-settings-view.js.map +1 -0
- package/operator-settings-view.ts +588 -0
- package/operator-settings.js +79 -0
- package/operator-settings.js.map +1 -0
- package/operator-settings.ts +137 -0
- package/operator-source.js +43 -0
- package/operator-source.js.map +1 -0
- package/operator-source.ts +69 -0
- package/operator-talk-browser.js +94 -0
- package/operator-talk-browser.js.map +1 -0
- package/operator-talk-browser.ts +120 -0
- package/operator-talk.js +83 -0
- package/operator-talk.js.map +1 -0
- package/operator-talk.ts +127 -0
- package/operator-task-text.js +45 -0
- package/operator-task-text.js.map +1 -0
- package/operator-task-text.ts +49 -0
- package/operator-timing-browser.js +51 -0
- package/operator-timing-browser.js.map +1 -0
- package/operator-timing-browser.ts +68 -0
- package/operator-timing-view.js +48 -0
- package/operator-timing-view.js.map +1 -0
- package/operator-timing-view.ts +90 -0
- package/operator-timing.js +132 -0
- package/operator-timing.js.map +1 -0
- package/operator-timing.ts +170 -0
- package/operator-vocab.js +8 -0
- package/operator-vocab.js.map +1 -0
- package/operator-vocab.ts +7 -0
- package/operator-voice-audio.ts +84 -0
- package/operator-voice-browser.ts +237 -0
- package/operator-voice-feedback.js +108 -0
- package/operator-voice-feedback.js.map +1 -0
- package/operator-voice-feedback.ts +133 -0
- package/operator-voice-view.js +33 -0
- package/operator-voice-view.js.map +1 -0
- package/operator-voice-view.ts +43 -0
- package/operator-voice.css +38 -0
- package/operator-voice.js +35 -0
- package/operator-voice.js.map +1 -0
- package/operator-voice.ts +33 -0
- package/operator-wait.js +70 -0
- package/operator-wait.js.map +1 -0
- package/operator-wait.ts +79 -0
- package/operator-watches.js +126 -0
- package/operator-watches.js.map +1 -0
- package/operator-watches.ts +141 -0
- package/operator-words.js +94 -0
- package/operator-words.js.map +1 -0
- package/operator-words.ts +114 -0
- package/outreach-trial.js +103 -0
- package/outreach-trial.js.map +1 -0
- package/outreach-trial.ts +122 -0
- package/outreach-vocab.js +10 -0
- package/outreach-vocab.js.map +1 -0
- package/outreach-vocab.ts +7 -0
- package/outreach.js +162 -0
- package/outreach.js.map +1 -0
- package/outreach.ts +239 -0
- package/package.json +1131 -4
- package/packs.js +103 -0
- package/packs.js.map +1 -0
- package/packs.ts +119 -0
- package/page-copy.js +267 -0
- package/page-copy.js.map +1 -0
- package/page-copy.ts +362 -0
- package/page-graph.js +114 -0
- package/page-graph.js.map +1 -0
- package/page-graph.ts +151 -0
- package/page-links.js +78 -0
- package/page-links.js.map +1 -0
- package/page-links.ts +124 -0
- package/page-parts.js +236 -0
- package/page-parts.js.map +1 -0
- package/page-parts.ts +388 -0
- package/page-query.js +95 -0
- package/page-query.js.map +1 -0
- package/page-query.ts +120 -0
- package/page-script.js +183 -0
- package/page-script.js.map +1 -0
- package/page-script.ts +192 -0
- package/page-wire.js +93 -0
- package/page-wire.js.map +1 -0
- package/page-wire.ts +100 -0
- package/pages-vocab.js +9 -0
- package/pages-vocab.js.map +1 -0
- package/pages-vocab.ts +5 -0
- package/partials.js +21 -0
- package/partials.js.map +1 -0
- package/partials.ts +37 -0
- package/payment-browser.js +250 -0
- package/payment-browser.js.map +1 -0
- package/payment-browser.ts +298 -0
- package/payment-rows.js +117 -0
- package/payment-rows.js.map +1 -0
- package/payment-rows.ts +219 -0
- package/payment-view.js +397 -0
- package/payment-view.js.map +1 -0
- package/payment-view.ts +852 -0
- package/people-browser.js +186 -0
- package/people-browser.js.map +1 -0
- package/people-browser.ts +210 -0
- package/people-rows.js +192 -0
- package/people-rows.js.map +1 -0
- package/people-rows.ts +289 -0
- package/people-view.js +463 -0
- package/people-view.js.map +1 -0
- package/people-view.ts +804 -0
- package/person-lines.js +196 -0
- package/person-lines.js.map +1 -0
- package/person-lines.ts +256 -0
- package/place.js +30 -0
- package/place.js.map +1 -0
- package/place.ts +31 -0
- package/plan-details.js +39 -0
- package/plan-details.js.map +1 -0
- package/plan-details.ts +57 -0
- package/plan-trial-graph.js +63 -0
- package/plan-trial-graph.js.map +1 -0
- package/plan-trial-graph.ts +57 -0
- package/plans.js +223 -0
- package/plans.js.map +1 -0
- package/plans.ts +313 -0
- package/platform-credentials.js +136 -0
- package/platform-credentials.js.map +1 -0
- package/platform-credentials.ts +189 -0
- package/poster-backfill.js +72 -0
- package/poster-backfill.js.map +1 -0
- package/poster-backfill.ts +96 -0
- package/presence.js +57 -0
- package/presence.js.map +1 -0
- package/presence.ts +77 -0
- package/preview-audit.js +65 -0
- package/preview-audit.js.map +1 -0
- package/preview-audit.ts +126 -0
- package/preview-fit.js +62 -0
- package/preview-fit.js.map +1 -0
- package/preview-fit.ts +72 -0
- package/preview-html.js +96 -0
- package/preview-html.js.map +1 -0
- package/preview-html.ts +139 -0
- package/preview.js +317 -0
- package/preview.js.map +1 -0
- package/preview.ts +498 -0
- package/price.js +53 -0
- package/price.js.map +1 -0
- package/price.ts +85 -0
- package/profile-browser.js +117 -0
- package/profile-browser.js.map +1 -0
- package/profile-browser.ts +141 -0
- package/profile-view.js +96 -0
- package/profile-view.js.map +1 -0
- package/profile-view.ts +197 -0
- package/provider-credits.js +159 -0
- package/provider-credits.js.map +1 -0
- package/provider-credits.ts +174 -0
- package/public-site-choice.js +18 -0
- package/public-site-choice.js.map +1 -0
- package/public-site-choice.ts +21 -0
- package/public-site.js +151 -0
- package/public-site.js.map +1 -0
- package/public-site.ts +268 -0
- package/publishing-graph.js +136 -0
- package/publishing-graph.js.map +1 -0
- package/publishing-graph.ts +122 -0
- package/qr.js +32 -0
- package/qr.js.map +1 -0
- package/qr.ts +32 -0
- package/query-page.js +159 -0
- package/query-page.js.map +1 -0
- package/query-page.ts +249 -0
- package/query-refusal.js +174 -0
- package/query-refusal.js.map +1 -0
- package/query-refusal.ts +319 -0
- package/refusal-loop.js +71 -0
- package/refusal-loop.js.map +1 -0
- package/refusal-loop.ts +98 -0
- package/refusals-vocab.js +9 -0
- package/refusals-vocab.js.map +1 -0
- package/refusals-vocab.ts +5 -0
- package/refused-writes.js +119 -0
- package/refused-writes.js.map +1 -0
- package/refused-writes.ts +152 -0
- package/refused.js +67 -0
- package/refused.js.map +1 -0
- package/refused.ts +76 -0
- package/regional-route-storage.js +127 -0
- package/regional-route-storage.js.map +1 -0
- package/regional-route-storage.ts +94 -0
- package/regional-route.js +105 -0
- package/regional-route.js.map +1 -0
- package/regional-route.ts +158 -0
- package/regional-serving-copy.js +153 -0
- package/regional-serving-copy.js.map +1 -0
- package/regional-serving-copy.ts +200 -0
- package/release-asset.js +71 -0
- package/release-asset.js.map +1 -0
- package/release-asset.ts +121 -0
- package/release-browser.js +383 -0
- package/release-code.js +5 -0
- package/release-entry.js +3 -0
- package/release-file.js +169 -0
- package/release-file.js.map +1 -0
- package/release-file.ts +241 -0
- package/release-index.js +140 -0
- package/release-index.js.map +1 -0
- package/release-index.ts +161 -0
- package/release-page.js +227 -0
- package/release-reads.js +27 -0
- package/release-reads.js.map +1 -0
- package/release-reads.ts +56 -0
- package/release-sheets.js +76 -0
- package/release-state.js +181 -0
- package/release-update.js +22 -0
- package/release-update.js.map +1 -0
- package/release-update.ts +29 -0
- package/release.js +50 -0
- package/release.js.map +1 -0
- package/release.ts +72 -0
- package/released.js +263 -0
- package/released.js.map +1 -0
- package/released.ts +310 -0
- package/remake-graph.js +17 -0
- package/remake-graph.js.map +1 -0
- package/remake-graph.ts +15 -0
- package/rouse-graph.js +11 -0
- package/rouse-graph.js.map +1 -0
- package/rouse-graph.ts +8 -0
- package/route-memory.js +101 -0
- package/route-memory.js.map +1 -0
- package/route-memory.ts +132 -0
- package/routes.js +1143 -0
- package/routes.js.map +1 -0
- package/routes.ts +1502 -0
- package/sale-recovery.js +175 -0
- package/sale-recovery.js.map +1 -0
- package/sale-recovery.ts +156 -0
- package/sales.js +113 -0
- package/sales.js.map +1 -0
- package/sales.ts +150 -0
- package/schema.js +28 -0
- package/schema.js.map +1 -0
- package/schema.ts +13 -0
- package/serving-copy.js +161 -0
- package/serving-copy.js.map +1 -0
- package/serving-copy.ts +201 -0
- package/settings-drafts-browser.js +81 -0
- package/settings-drafts-browser.js.map +1 -0
- package/settings-drafts-browser.ts +95 -0
- package/settings-drafts.js +119 -0
- package/settings-drafts.js.map +1 -0
- package/settings-drafts.ts +136 -0
- package/shared-browser.js +61 -0
- package/shared-browser.js.map +1 -0
- package/shared-browser.ts +77 -0
- package/shared-view.js +29 -0
- package/shared-view.js.map +1 -0
- package/shared-view.ts +47 -0
- package/side-browser.js +164 -0
- package/side-browser.js.map +1 -0
- package/side-browser.ts +201 -0
- package/side-parts.js +258 -0
- package/side-parts.js.map +1 -0
- package/side-parts.ts +447 -0
- package/side-rows.js +64 -0
- package/side-rows.js.map +1 -0
- package/side-rows.ts +104 -0
- package/signed-in.js +37 -0
- package/signed-in.js.map +1 -0
- package/signed-in.ts +45 -0
- package/site-assets.js +8 -0
- package/site-assets.js.map +1 -0
- package/site-assets.ts +25 -0
- package/site-header.js +65 -0
- package/site-header.js.map +1 -0
- package/site-header.ts +71 -0
- package/site-nav.js +75 -0
- package/site-nav.js.map +1 -0
- package/site-nav.ts +82 -0
- package/site-validation.js +37 -0
- package/site-validation.js.map +1 -0
- package/site-validation.ts +47 -0
- package/space-apps-browser.js +107 -0
- package/space-apps-browser.js.map +1 -0
- package/space-apps-browser.ts +128 -0
- package/space-apps-view.js +222 -0
- package/space-apps-view.js.map +1 -0
- package/space-apps-view.ts +396 -0
- package/space-apps.js +88 -0
- package/space-apps.js.map +1 -0
- package/space-apps.ts +143 -0
- package/space-logo.js +82 -0
- package/space-logo.js.map +1 -0
- package/space-logo.ts +112 -0
- package/space-pages-browser.js +474 -0
- package/space-pages-browser.js.map +1 -0
- package/space-pages-browser.ts +463 -0
- package/space-pages-view.js +212 -0
- package/space-pages-view.js.map +1 -0
- package/space-pages-view.ts +460 -0
- package/space-pages.js +193 -0
- package/space-pages.js.map +1 -0
- package/space-pages.ts +282 -0
- package/space-switch.js +36 -0
- package/space-switch.js.map +1 -0
- package/space-switch.ts +64 -0
- package/splash.js +510 -0
- package/splash.js.map +1 -0
- package/splash.ts +525 -0
- package/standing.js +409 -0
- package/standing.js.map +1 -0
- package/standing.ts +746 -0
- package/still.js +63 -0
- package/still.js.map +1 -0
- package/still.ts +95 -0
- package/store-listing.js +107 -0
- package/store-listing.js.map +1 -0
- package/store-listing.ts +133 -0
- package/store-wake.js +65 -0
- package/store-wake.js.map +1 -0
- package/store-wake.ts +101 -0
- package/stream-posters.js +177 -0
- package/stream-posters.js.map +1 -0
- package/stream-posters.ts +297 -0
- package/support-contract-service.js +219 -0
- package/support-contract-service.js.map +1 -0
- package/support-contract-service.ts +307 -0
- package/support-contract-view.js +155 -0
- package/support-contract-view.js.map +1 -0
- package/support-contract-view.ts +265 -0
- package/support-contract.js +114 -0
- package/support-contract.js.map +1 -0
- package/support-contract.ts +157 -0
- package/sweep-vocab.js +10 -0
- package/sweep-vocab.js.map +1 -0
- package/sweep-vocab.ts +9 -0
- package/talk-views-browser.js +208 -0
- package/talk-views-browser.js.map +1 -0
- package/talk-views-browser.ts +232 -0
- package/talk-views.js +36 -0
- package/talk-views.js.map +1 -0
- package/talk-views.ts +64 -0
- package/task-rows.js +86 -0
- package/task-rows.js.map +1 -0
- package/task-rows.ts +96 -0
- package/tasks-view.js +111 -0
- package/tasks-view.js.map +1 -0
- package/tasks-view.ts +176 -0
- package/toast.ts +17 -0
- package/trash-graph.js +41 -0
- package/trash-graph.js.map +1 -0
- package/trash-graph.ts +27 -0
- package/trash-vocab.js +8 -0
- package/trash-vocab.js.map +1 -0
- package/trash-vocab.ts +4 -0
- package/trial.js +325 -0
- package/trial.js.map +1 -0
- package/trial.ts +451 -0
- package/update-rows.js +77 -0
- package/update-rows.js.map +1 -0
- package/update-rows.ts +171 -0
- package/update-waiting.js +131 -0
- package/update-waiting.js.map +1 -0
- package/update-waiting.ts +133 -0
- package/updates-browser.js +28 -0
- package/updates-browser.js.map +1 -0
- package/updates-browser.ts +33 -0
- package/updates-day-browser.js +77 -0
- package/updates-day-browser.js.map +1 -0
- package/updates-day-browser.ts +84 -0
- package/updates-day.js +60 -0
- package/updates-day.js.map +1 -0
- package/updates-day.ts +94 -0
- package/updates-list-browser.js +175 -0
- package/updates-list-browser.js.map +1 -0
- package/updates-list-browser.ts +198 -0
- package/updates-view.js +546 -0
- package/updates-view.js.map +1 -0
- package/updates-view.ts +814 -0
- package/upload-client-path.js +5 -0
- package/upload-client-path.js.map +1 -0
- package/upload-client-path.ts +4 -0
- package/uploads.js +290 -0
- package/uploads.js.map +1 -0
- package/uploads.ts +334 -0
- package/upstream.js +40 -0
- package/upstream.js.map +1 -0
- package/upstream.ts +57 -0
- package/version-view.js +57 -0
- package/version-view.js.map +1 -0
- package/version-view.ts +99 -0
- package/versions.js +231 -0
- package/versions.js.map +1 -0
- package/versions.ts +367 -0
- package/visit-counts.js +123 -0
- package/visit-counts.js.map +1 -0
- package/visit-counts.ts +162 -0
- package/visitor-location.js +33 -0
- package/visitor-location.js.map +1 -0
- package/visitor-location.ts +38 -0
- package/visitor.js +152 -0
- package/visitor.js.map +1 -0
- package/visitor.ts +228 -0
- package/visits-browser.js +71 -0
- package/visits-browser.js.map +1 -0
- package/visits-browser.ts +87 -0
- package/visits-view.js +88 -0
- package/visits-view.js.map +1 -0
- package/visits-view.ts +184 -0
- package/visits.js +428 -0
- package/visits.js.map +1 -0
- package/visits.ts +561 -0
- package/vocab/account.vocab.json +349 -0
- package/vocab/agents.vocab.json +64 -0
- package/vocab/app-canvas.vocab.json +137 -0
- package/vocab/app-friends.vocab.json +71 -0
- package/vocab/app-permissions.vocab.json +46 -0
- package/vocab/apps.vocab.json +553 -0
- package/vocab/attribution.vocab.json +32 -0
- package/vocab/builder-install.vocab.json +10 -0
- package/vocab/connections.vocab.json +128 -0
- package/vocab/dashboard.vocab.json +148 -0
- package/vocab/directory.vocab.json +2445 -0
- package/vocab/exception.vocab.json +18 -0
- package/vocab/fundraising.vocab.json +284 -0
- package/vocab/gmail-mailbox.vocab.json +73 -0
- package/vocab/kernel.vocab.json +420 -0
- package/vocab/mcp-retirement.vocab.json +66 -0
- package/vocab/meter.vocab.json +230 -0
- package/vocab/models-install.vocab.json +10 -0
- package/vocab/notices.vocab.json +88 -0
- package/vocab/operator-drafts.vocab.json +19 -0
- package/vocab/operator-matches.vocab.json +85 -0
- package/vocab/operator-settings.vocab.json +127 -0
- package/vocab/operator-talk.vocab.json +92 -0
- package/vocab/operator.vocab.json +1314 -0
- package/vocab/outreach.vocab.json +141 -0
- package/vocab/pages.vocab.json +38 -0
- package/vocab/payment.vocab.json +271 -0
- package/vocab/people.vocab.json +337 -0
- package/vocab/presence.vocab.json +19 -0
- package/vocab/preview.vocab.json +66 -0
- package/vocab/referenced.vocab.json +17 -0
- package/vocab/referral.vocab.json +272 -0
- package/vocab/refusals.vocab.json +16 -0
- package/vocab/registration.vocab.json +17 -0
- package/vocab/serving.vocab.json +103 -0
- package/vocab/side.vocab.json +97 -0
- package/vocab/space-apps.vocab.json +137 -0
- package/vocab/space-pages.vocab.json +416 -0
- package/vocab/sweep-install.vocab.json +10 -0
- package/vocab/sweep.vocab.json +125 -0
- package/vocab/trash.vocab.json +19 -0
- package/vocab/update.vocab.json +53 -0
- package/vocab/upload.vocab.json +69 -0
- package/vocab/use.vocab.json +93 -0
- package/vocab/visits.vocab.json +143 -0
- package/vocab/waiting.vocab.json +29 -0
- package/vocab.js +16 -0
- package/vocab.js.map +1 -0
- package/vocab.json +1703 -0
- package/vocab.ts +17 -0
- package/weigh-graph.js +12 -0
- package/weigh-graph.js.map +1 -0
- package/weigh-graph.ts +9 -0
- package/wire-news.js +30 -0
- package/wire-news.js.map +1 -0
- package/wire-news.ts +30 -0
- package/work-standing.js +64 -0
- package/work-standing.js.map +1 -0
- package/work-standing.ts +44 -0
- package/woven.js +435 -0
- package/woven.js.map +1 -0
- package/woven.ts +649 -0
- package/wrap-graph.js +17 -0
- package/wrap-graph.js.map +1 -0
- package/wrap-graph.ts +15 -0
- package/write-owner.js +11 -0
- package/write-owner.js.map +1 -0
- package/write-owner.ts +24 -0
package/client.js
ADDED
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
// Bind @yaks/client to the app's API and expose the platform's app services.
|
|
2
|
+
import { metadata as readMetadata } from '@yaks/client'
|
|
3
|
+
import { WriteRefused } from '@yaks/sync'
|
|
4
|
+
import { STATUS } from '@yaks/graph/errors'
|
|
5
|
+
import { appClient } from './app-client.js'
|
|
6
|
+
import { router as routes } from '@yaks/client/router'
|
|
7
|
+
import { mint } from '@yaks/graph/identity'
|
|
8
|
+
import { decode, stringify } from '@yaks/vocab/wire'
|
|
9
|
+
import { browserDrafts, draftEid } from '@yaks/draft/browser'
|
|
10
|
+
import { sleep, system } from '@yaks/fp'
|
|
11
|
+
import { carried } from './installs.js'
|
|
12
|
+
import { bindSync } from './edit-sync.js'
|
|
13
|
+
import { CLIENT_MODULES } from './client-modules.js'
|
|
14
|
+
import {
|
|
15
|
+
OWNED,
|
|
16
|
+
OWNED_APPLY,
|
|
17
|
+
OWNER_CHANGED,
|
|
18
|
+
ownerOf,
|
|
19
|
+
WRITE_OWNER,
|
|
20
|
+
} from './write-owner.js'
|
|
21
|
+
import { friendsOver } from './friends-at.js'
|
|
22
|
+
import { lineOf } from './page-query.js'
|
|
23
|
+
import { wordsOf } from './client-words.js'
|
|
24
|
+
import {
|
|
25
|
+
UPLOAD_CLIENT,
|
|
26
|
+
UPLOAD_OWNER,
|
|
27
|
+
UPLOAD_ROW,
|
|
28
|
+
} from './upload-client-path.js'
|
|
29
|
+
import { morph as lay } from '@yaks/ui/navigate'
|
|
30
|
+
export { draftEid }
|
|
31
|
+
export { mint }
|
|
32
|
+
let blobs = (
|
|
33
|
+
base = import.meta.url,
|
|
34
|
+
) => /** @type {Promise<typeof import('./_client-blobs.js')>} */ (
|
|
35
|
+
import(new URL(CLIENT_MODULES.blobs, base).href)
|
|
36
|
+
)
|
|
37
|
+
export let digest = /** @param {Blob} file */ async (file) =>
|
|
38
|
+
(await blobs()).digest(file)
|
|
39
|
+
export { qr } from './qr.js'
|
|
40
|
+
|
|
41
|
+
// A refusal, as one Error. The kernel and the store both answer a sentence —
|
|
42
|
+
// `{error: {code, message}}` from the kernel, `{error, message}` from a
|
|
43
|
+
// store's own doors (@yaks/api), as a box serves them — and that sentence is
|
|
44
|
+
// the whole of what a page shows and an agent reads.
|
|
45
|
+
// A body that is neither is a page (a 404 answers the platform's "Nothing
|
|
46
|
+
// here yet." HTML), so it never rides the throw: the status and a short line
|
|
47
|
+
// of it say what happened without dumping a document into an error message.
|
|
48
|
+
//
|
|
49
|
+
// When signing in is the way through, the kernel also names where: the throw
|
|
50
|
+
// carries `signIn`, the login page already holding this page as its return
|
|
51
|
+
// address, so `catch (e) { if (e.signIn) location = e.signIn }` sends them
|
|
52
|
+
// and brings them back. It carries the answer's `status` too, so a
|
|
53
|
+
// refusal the page never caught reaches the reporter as the no it was
|
|
54
|
+
// (report.js).
|
|
55
|
+
let refused = (r, body) => {
|
|
56
|
+
let said = null
|
|
57
|
+
try {
|
|
58
|
+
let { error, message, code } = JSON.parse(body)
|
|
59
|
+
said = typeof error == 'string' ? { code: code ?? error, message } : error
|
|
60
|
+
} catch { /* not JSON: the status and a short line of whatever it was */ }
|
|
61
|
+
let line = body.replace(/<[^>]*>/g, ' ').replace(/\s+/g, ' ').trim()
|
|
62
|
+
.slice(0, 120)
|
|
63
|
+
let e = new Error(
|
|
64
|
+
said?.message ?? said?.code ?? `${r.status} ${line || r.statusText}`,
|
|
65
|
+
)
|
|
66
|
+
if (said?.signIn) e.signIn = said.signIn
|
|
67
|
+
if (said?.code) e.code = said.code
|
|
68
|
+
e.status = r.status
|
|
69
|
+
return carrying(e, r)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// What an answer tells the page, on the error it is thrown as: the wait it
|
|
73
|
+
// asks for (`retry-after`, a store past the rows it may spend for now), the
|
|
74
|
+
// shape the outbox reads, and that the server already filed it
|
|
75
|
+
// (`x-yak-filed`), so the page's reporter (@yaks/tracker/page) files it no
|
|
76
|
+
// second time when the page leaves it uncaught.
|
|
77
|
+
let carrying = (e, r) => {
|
|
78
|
+
let s = Number(r.headers.get('retry-after'))
|
|
79
|
+
if (s > 0) e.retry = { after: s * 1000 }
|
|
80
|
+
if (r.headers.has('x-yak-filed')) e.filed = true
|
|
81
|
+
return e
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// A read already on its way answers everyone who asks it meanwhile, as one
|
|
85
|
+
// request: the outbox's `who` and the page's `me()` on load, a subscription's
|
|
86
|
+
// fill and the page's query of the same line. Each caller parses its own copy,
|
|
87
|
+
// so no two share an object to change. A write that lands ends the sharing:
|
|
88
|
+
// a read asked after it is its own, so it sees the write.
|
|
89
|
+
let door = (base, fetch) => {
|
|
90
|
+
let flying = new Map()
|
|
91
|
+
// Foreground reads and cold subscription fills share the same Store.
|
|
92
|
+
// Queue the excess before sending it so its request deadline starts when
|
|
93
|
+
// there is room, and release the slot before a retry backs off.
|
|
94
|
+
let reading = 0
|
|
95
|
+
let waiting = /** @type {Array<() => void>} */ ([])
|
|
96
|
+
let query = async (path) => {
|
|
97
|
+
if (reading < 3) reading++
|
|
98
|
+
else await new Promise((start) => waiting.push(() => start(undefined)))
|
|
99
|
+
try {
|
|
100
|
+
return await send(path)
|
|
101
|
+
} finally {
|
|
102
|
+
let next = waiting.shift()
|
|
103
|
+
if (next) next()
|
|
104
|
+
else reading--
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
let send = async (path, init) => {
|
|
108
|
+
let version = pageVersion(base)
|
|
109
|
+
if (version != null) {
|
|
110
|
+
let headers = new Headers(init?.headers)
|
|
111
|
+
headers.set('x-yak-version', version)
|
|
112
|
+
init = { ...init, headers }
|
|
113
|
+
}
|
|
114
|
+
let r = await fetch(new URL(path, base), init)
|
|
115
|
+
return { r, body: await r.text() }
|
|
116
|
+
}
|
|
117
|
+
let sent = (path, init) => {
|
|
118
|
+
if (init) return send(path, init).finally(() => flying.clear())
|
|
119
|
+
let held = flying.get(path)
|
|
120
|
+
if (!held) {
|
|
121
|
+
held = (path.startsWith('query?') ? query(path) : send(path)).finally(
|
|
122
|
+
() => flying.get(path) == held && flying.delete(path),
|
|
123
|
+
)
|
|
124
|
+
flying.set(path, held)
|
|
125
|
+
}
|
|
126
|
+
return held
|
|
127
|
+
}
|
|
128
|
+
return async (path, init) => answered(path, await sent(path, init))
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
let unsupportedOwner = (path, error) =>
|
|
132
|
+
path == OWNED_APPLY && error.status == 400 &&
|
|
133
|
+
error.message.startsWith(`unknown option "${OWNED}";`)
|
|
134
|
+
|
|
135
|
+
let answered = (path, { r, body }) => {
|
|
136
|
+
let apply = path == 'apply' || path == OWNED_APPLY
|
|
137
|
+
if (!r.ok) {
|
|
138
|
+
let error = refused(r, body)
|
|
139
|
+
// A timeout, overload or proxy HTML is not a deliberate store refusal.
|
|
140
|
+
let explicit
|
|
141
|
+
try {
|
|
142
|
+
explicit = JSON.parse(body).error
|
|
143
|
+
} catch { /* unknown response */ }
|
|
144
|
+
if (
|
|
145
|
+
apply && explicit && (r.status < 500 ||
|
|
146
|
+
(typeof explicit === 'string' && STATUS[explicit] < 500)) &&
|
|
147
|
+
error.code != OWNER_CHANGED && !unsupportedOwner(path, error) &&
|
|
148
|
+
![408, 425, 429].includes(r.status)
|
|
149
|
+
) {
|
|
150
|
+
error.outcome = 'refused'
|
|
151
|
+
error.refusal = JSON.parse(body)
|
|
152
|
+
}
|
|
153
|
+
throw error
|
|
154
|
+
}
|
|
155
|
+
let receipt = body ? JSON.parse(body) : null
|
|
156
|
+
if (
|
|
157
|
+
apply && (r.status == 202 || receipt?.pending ||
|
|
158
|
+
receipt?.ok !== true || !receipt?.aliases ||
|
|
159
|
+
typeof receipt.aliases != 'object' || Array.isArray(receipt.aliases) ||
|
|
160
|
+
!Array.isArray(receipt?.bundles))
|
|
161
|
+
) {
|
|
162
|
+
throw carrying(
|
|
163
|
+
new Error(
|
|
164
|
+
receipt?.message || 'Write is still unsaved; its outcome is unknown',
|
|
165
|
+
),
|
|
166
|
+
r,
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
return receipt
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// The page's kept release applies to its own store. A sibling store opens
|
|
173
|
+
// with the vocabulary it currently serves.
|
|
174
|
+
let pageVersion = (base) => {
|
|
175
|
+
let doc = globalThis.document
|
|
176
|
+
let tag = doc?.querySelector('script[data-yak-api][data-yak-version]') ??
|
|
177
|
+
doc?.querySelector('script[data-yak-at][data-yak-version]')
|
|
178
|
+
let { yakApi, yakAt, yakVersion } = tag?.dataset ?? {}
|
|
179
|
+
if (yakVersion == null || !/^[0-9]+$/.test(yakVersion)) return null
|
|
180
|
+
let mount = new URL(
|
|
181
|
+
yakApi || yakAt,
|
|
182
|
+
globalThis.location?.href ?? doc.baseURI,
|
|
183
|
+
)
|
|
184
|
+
let own = new URL('api/', mount)
|
|
185
|
+
return own.origin == base.origin && own.pathname == base.pathname
|
|
186
|
+
? yakVersion
|
|
187
|
+
: null
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// The address a store's doors hang off. Every app in a space shares one
|
|
191
|
+
// hostname, so the address a page names is a path — `store('/lending/api/')`,
|
|
192
|
+
// which the guide's own line — and a path is no `new URL` base by itself:
|
|
193
|
+
// the documented call threw `Invalid base URL`. It is
|
|
194
|
+
// resolved against this origin, and a path that names the api directory
|
|
195
|
+
// without saying so keeps its meaning: the doors are under it, so the base
|
|
196
|
+
// ends in a slash or `query` would replace the last segment. A sandboxed
|
|
197
|
+
// app's page (./installs.ts) has an opaque origin, which reads "null" and is no
|
|
198
|
+
// base either, so its own address stands in: the hostname is the same.
|
|
199
|
+
// A path as a URL carries it, each segment escaped.
|
|
200
|
+
let encodedPath = (path) =>
|
|
201
|
+
String(path).split('/').map(encodeURIComponent).join('/')
|
|
202
|
+
|
|
203
|
+
// Spaces and quotes are query syntax, and # can be part of a value. Send
|
|
204
|
+
// the line whole when the URL parser would otherwise change those characters.
|
|
205
|
+
let queryPath = (filter) =>
|
|
206
|
+
`query?${
|
|
207
|
+
/[\s"'#]/.test(filter) ? new URLSearchParams({ q: filter }) : filter
|
|
208
|
+
}`
|
|
209
|
+
|
|
210
|
+
// A sandboxed page's own address carries its token, and a sibling store its
|
|
211
|
+
// app is attached to opens to that token (@yaks/platform/installs `carried`).
|
|
212
|
+
let based = (base) => {
|
|
213
|
+
if (base instanceof URL) return base
|
|
214
|
+
let here = globalThis.location
|
|
215
|
+
let at = new URL(base, here?.origin == 'null' ? here.href : here?.origin)
|
|
216
|
+
if (!at.pathname.endsWith('/')) at.pathname += '/'
|
|
217
|
+
return carried(at, new URL(import.meta.url))
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// The precondition a read-modify-write carries: the SHA-256 of a value as the
|
|
221
|
+
// page read it, which a bundle names under `$was` — per component, per
|
|
222
|
+
// property. The store refuses the whole batch if that property has moved since,
|
|
223
|
+
// so two tabs, two phones or an agent and a page cannot both spend one balance
|
|
224
|
+
// or claim one reward. `null` is "it held none", which guards a property that
|
|
225
|
+
// must still be empty. The hash is the store's own (@yaks/graph `token`), so a
|
|
226
|
+
// page and a tool guard the same value alike.
|
|
227
|
+
//
|
|
228
|
+
// let [me] = await query(`id=${eid}&.player`)
|
|
229
|
+
// await apply({
|
|
230
|
+
// entity: { eid },
|
|
231
|
+
// player: { gold: me.player.gold + 10, claimed: today },
|
|
232
|
+
// $was: { player: { claimed: await was(me.player.claimed) } },
|
|
233
|
+
// })
|
|
234
|
+
export let was = async (value) => {
|
|
235
|
+
if (value == null) return null
|
|
236
|
+
let bytes = new TextEncoder().encode(String(value))
|
|
237
|
+
let sum = new Uint8Array(await crypto.subtle.digest('SHA-256', bytes))
|
|
238
|
+
return [...sum].map((b) => b.toString(16).padStart(2, '0')).join('')
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** Make `el` hold `html` in place (@yaks/ui/navigate `morph`), keeping each
|
|
242
|
+
* node that stands in both: a video or sound by its `src`, a node by its `id`
|
|
243
|
+
* or `data-key`, else by its kind at its place. A `<details>` the person
|
|
244
|
+
* opened stays open where `html` has no word on it.
|
|
245
|
+
* @param {Element} el
|
|
246
|
+
* @param {string} html */
|
|
247
|
+
export let morph = (el, html) => {
|
|
248
|
+
let next = el.ownerDocument.createElement('template')
|
|
249
|
+
next.innerHTML = html
|
|
250
|
+
lay(el, next.content, { keeps: folded })
|
|
251
|
+
}
|
|
252
|
+
let folded = (e, name) => name == 'open' && e.localName == 'details'
|
|
253
|
+
|
|
254
|
+
// Whether what failed was the way there, not the answer: no connection (a
|
|
255
|
+
// phone asleep, a train in a tunnel), or a platform that is busy or down.
|
|
256
|
+
// Anything else is a refusal.
|
|
257
|
+
let busy = (e) =>
|
|
258
|
+
e.status == null || e.status >= 500 || [408, 425, 429].includes(e.status)
|
|
259
|
+
|
|
260
|
+
// Whether the request never had an answer: the connection, not the platform.
|
|
261
|
+
let unanswered = (e) => e.status == null
|
|
262
|
+
|
|
263
|
+
// Whether no answer came in time: a gateway, or a store's door that stopped
|
|
264
|
+
// waiting for a store still starting (door.ts `StoreTimeout`, as after a
|
|
265
|
+
// deploy). The store may answer the same read a moment later.
|
|
266
|
+
let late = (e) => e.status == 504
|
|
267
|
+
|
|
268
|
+
// Each page hears its first dropped connection and its last recovery
|
|
269
|
+
// (`yak-reconnecting`). Its reporter (@yaks/tracker/page) shows the wait.
|
|
270
|
+
let waiting = new WeakMap()
|
|
271
|
+
let wait = (events, by) => {
|
|
272
|
+
let before = waiting.get(events) ?? 0
|
|
273
|
+
let after = before + by
|
|
274
|
+
if (after) waiting.set(events, after)
|
|
275
|
+
else waiting.delete(events)
|
|
276
|
+
if (!!before != !!after) {
|
|
277
|
+
events.dispatchEvent?.(
|
|
278
|
+
new CustomEvent('yak-reconnecting', { detail: after > 0 }),
|
|
279
|
+
)
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// A read: asked again only while it has no answer, or none in time, since a
|
|
284
|
+
// refusal or a platform failure answers the same the next time. A write keeps
|
|
285
|
+
// its own answer (the outbox).
|
|
286
|
+
let READ = { when: (e) => unanswered(e) || late(e) }
|
|
287
|
+
|
|
288
|
+
// Sent again while the way there failed (`when`, by default `busy`), which
|
|
289
|
+
// waits for the browser to say it is back online. A refusal is thrown at once.
|
|
290
|
+
// Each wait doubles, to fifteen seconds, `tries` times.
|
|
291
|
+
let retrying =
|
|
292
|
+
(clock, events) => async (call, { when = busy, tries = 7 } = {}) => {
|
|
293
|
+
let waited = false
|
|
294
|
+
try {
|
|
295
|
+
for (let n = 0;; n++) {
|
|
296
|
+
try {
|
|
297
|
+
return await call()
|
|
298
|
+
} catch (e) {
|
|
299
|
+
if (!when(e) || n >= tries) throw e
|
|
300
|
+
if (!waited) wait(events, +(waited = true))
|
|
301
|
+
if (globalThis.navigator?.onLine === false) {
|
|
302
|
+
await new Promise((on) =>
|
|
303
|
+
events.addEventListener('online', on, { once: true })
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
await new Promise((on) =>
|
|
307
|
+
clock.after(Math.min(1000 * 2 ** n, 15000), on)
|
|
308
|
+
)
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
} finally {
|
|
312
|
+
if (waited) wait(events, -1)
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @param {string | URL} base
|
|
318
|
+
* @param {{
|
|
319
|
+
* clock?: import('@yaks/fp').Clock,
|
|
320
|
+
* connect?: (url: URL) => import('@yaks/sync').Socket,
|
|
321
|
+
* fetch?: (input: URL, init?: RequestInit) => Promise<Response>,
|
|
322
|
+
* events?: EventTarget,
|
|
323
|
+
* loadUploads?: (url: URL) => Promise<Pick<typeof import('@yaks/client/uploads'), 'uploads'>>,
|
|
324
|
+
* }} [options]
|
|
325
|
+
*/
|
|
326
|
+
export let store = (base, {
|
|
327
|
+
clock = system,
|
|
328
|
+
connect = (url) => new WebSocket(url),
|
|
329
|
+
fetch = (input, init) => globalThis.fetch(input, init),
|
|
330
|
+
events = /** @type {EventTarget} */ (globalThis),
|
|
331
|
+
loadUploads = () => import(new URL(UPLOAD_CLIENT, import.meta.url).href),
|
|
332
|
+
} = {}) => {
|
|
333
|
+
base = based(base)
|
|
334
|
+
let once = door(base, fetch)
|
|
335
|
+
let again = retrying(clock, events)
|
|
336
|
+
// A read is asked again while it has no answer, so a page that loads as
|
|
337
|
+
// the connection drops, or as its store starts after a deploy, gets its
|
|
338
|
+
// rows once they come, not an empty page.
|
|
339
|
+
let rawAsk = (path, init, read = READ) =>
|
|
340
|
+
init ? once(path, init) : again(() => once(path), read)
|
|
341
|
+
// The store's words: each component it declares, by name, its documents
|
|
342
|
+
// (`vocab.json`) merged. Asked once, and again after a failure.
|
|
343
|
+
let vocabulary, definitions, documents
|
|
344
|
+
let words = () =>
|
|
345
|
+
vocabulary ??= rawAsk('vocab.json', undefined, {
|
|
346
|
+
when: busy,
|
|
347
|
+
tries: Infinity,
|
|
348
|
+
}).then((docs) => {
|
|
349
|
+
documents = wordsOf(docs)
|
|
350
|
+
return definitions = documents.definitions
|
|
351
|
+
}).catch((error) => {
|
|
352
|
+
vocabulary = undefined
|
|
353
|
+
throw error
|
|
354
|
+
})
|
|
355
|
+
let vocab = { def: (name) => definitions?.[name] }
|
|
356
|
+
let readWire = (value, payload, text) => {
|
|
357
|
+
// No extra request for a page whose answers contain no byte tags. Only
|
|
358
|
+
// the vocabulary, never a global JSON reviver, gives the tag meaning.
|
|
359
|
+
if (!payload && !(text ?? JSON.stringify(value)).includes('"$bytes"')) {
|
|
360
|
+
return value
|
|
361
|
+
}
|
|
362
|
+
return words().then(() => decode(vocab, value, payload))
|
|
363
|
+
}
|
|
364
|
+
// A payment door (`pay/checkout`, `pay/refunds`, `pay/orders/<eid>`): a
|
|
365
|
+
// body is posted as JSON, none reads; a refusal throws with its message.
|
|
366
|
+
let pay = (path, body) =>
|
|
367
|
+
rawAsk(
|
|
368
|
+
`pay/${String(path).replace(/^\/+/, '')}`,
|
|
369
|
+
body === undefined ? undefined : {
|
|
370
|
+
method: 'POST',
|
|
371
|
+
headers: { 'content-type': 'application/json' },
|
|
372
|
+
body: JSON.stringify(body),
|
|
373
|
+
},
|
|
374
|
+
)
|
|
375
|
+
let ask = async (path, init, read) => readWire(await rawAsk(path, init, read))
|
|
376
|
+
// The filter line, the grammar the boards speak: '.doc.title~=cake',
|
|
377
|
+
// '.opaque.format=recipe', 'id=<eid>', 'limit='. Oldest first, in the order
|
|
378
|
+
// the rows were written; a windowed read is the newest page of that same
|
|
379
|
+
// order.
|
|
380
|
+
//
|
|
381
|
+
// A row carries only the components the filter names, so name the ones the
|
|
382
|
+
// page will draw: '.recipe' answers recipes with no titles, and
|
|
383
|
+
// '.recipe&?doc' answers both — '&' joins filters and '?' asks for a
|
|
384
|
+
// component without filtering on it. A dotted word addresses that
|
|
385
|
+
// component's own property ('.recipe.minutes<=30'), never a second
|
|
386
|
+
// component; '&?doc' is the way to ask for one of those.
|
|
387
|
+
let read = (filter = '') => ask(queryPath(filter))
|
|
388
|
+
/** @type {(filter?: string) => Promise<any>} */
|
|
389
|
+
let query = (filter = '') => client.query(filter)
|
|
390
|
+
// Full-text over the docs, ranked. A word names no component to leave out,
|
|
391
|
+
// the way `id=` does not, so a search with no filter answers whole entities
|
|
392
|
+
// — the app's own components included, which is what a page drawing cards
|
|
393
|
+
// from a search needs. Pass a filter and the ordinary rule is back:
|
|
394
|
+
// `search('lemon', '.recipe&?doc')` is recipes with their titles.
|
|
395
|
+
let search = (text, filter = '') =>
|
|
396
|
+
query(`${encodeURIComponent(text)}${filter ? `&${filter}` : ''}`)
|
|
397
|
+
|
|
398
|
+
// Who is looking, before anything is asked of them, as the store's `who`
|
|
399
|
+
// door answers: `{person, name, role, reads, writes, signIn, invited, join,
|
|
400
|
+
// visit}` — `person` null when they are signed out, `name` what to call
|
|
401
|
+
// them, `writes` whether this app takes a write from them, `signIn` where a
|
|
402
|
+
// signed-out visitor signs in, `invited` whether an invitation waits in
|
|
403
|
+
// their email to accept, `join` the role a POST to `api/join` gives them
|
|
404
|
+
// where the app's own rows list them (its vocab.json `join`), else null, and
|
|
405
|
+
// `visit` `{kept}` for a stranger trying a published app in a store of their
|
|
406
|
+
// own. Call it on load and the page knows whether to show a sign-in link,
|
|
407
|
+
// the invitation or a name field, instead of finding out from a refusal
|
|
408
|
+
// after someone has typed.
|
|
409
|
+
let me = () => ask('who')
|
|
410
|
+
|
|
411
|
+
// Words from this page to the space's Operator, in its signed-in reader's
|
|
412
|
+
// own conversation with it: `say` is the words, and `context` what the page
|
|
413
|
+
// says beside them, such as the passage they selected and the app's
|
|
414
|
+
// release. Any code on the page can call it, so they are the app's words,
|
|
415
|
+
// never the reader's: the Operator reads and answers them there, and does
|
|
416
|
+
// nothing with the reader's permissions because of them. The reader's own
|
|
417
|
+
// note, as them, is the corner's, a page of yaks.app's own. It answers
|
|
418
|
+
// `{request, conversation}`: the request's id and the address of the
|
|
419
|
+
// conversation, where the Operator answers. The Operator talks with the
|
|
420
|
+
// space's owners and editors: anyone else is refused (`not_a_writer`), and
|
|
421
|
+
// a signed-out reader with `signIn`, where they sign in and come back.
|
|
422
|
+
let operatorSend = (say, context = {}) =>
|
|
423
|
+
ask('operator/send', {
|
|
424
|
+
method: 'POST',
|
|
425
|
+
headers: { 'content-type': 'application/json' },
|
|
426
|
+
body: JSON.stringify({ say, context }),
|
|
427
|
+
})
|
|
428
|
+
|
|
429
|
+
// An item's own private thread, with its latest request and answer.
|
|
430
|
+
let operatorRecords = (items) => {
|
|
431
|
+
let query = new URLSearchParams(items.map((item) => ['item', item]))
|
|
432
|
+
return ask('operator/record?' + query)
|
|
433
|
+
}
|
|
434
|
+
let operatorRecord = (
|
|
435
|
+
item,
|
|
436
|
+
say,
|
|
437
|
+
context = {},
|
|
438
|
+
{ event, attachment, attachments } = {},
|
|
439
|
+
) =>
|
|
440
|
+
ask('operator/record', {
|
|
441
|
+
method: 'POST',
|
|
442
|
+
headers: { 'content-type': 'application/json' },
|
|
443
|
+
body: JSON.stringify({
|
|
444
|
+
item,
|
|
445
|
+
say,
|
|
446
|
+
context,
|
|
447
|
+
event,
|
|
448
|
+
attachment,
|
|
449
|
+
attachments,
|
|
450
|
+
}),
|
|
451
|
+
})
|
|
452
|
+
let retryOperatorRecord = (request) =>
|
|
453
|
+
ask('operator/record/retry', {
|
|
454
|
+
method: 'POST',
|
|
455
|
+
headers: { 'content-type': 'application/json' },
|
|
456
|
+
body: JSON.stringify({ request }),
|
|
457
|
+
})
|
|
458
|
+
|
|
459
|
+
// A file on the public web, at a path of this app's address: from then on
|
|
460
|
+
// that address answers it to anyone, before the app runs and whatever its
|
|
461
|
+
// access (`PUT ./api/public/<path>`). With no path it goes to a new UUID
|
|
462
|
+
// path, a link only the people given it know (`POST ./api/public`). `file`
|
|
463
|
+
// is a Blob or a File, served as its own type, so a page's HTML goes in a
|
|
464
|
+
// Blob of `text/html`. Answers `{path, url, sha, mime, size}`. Only the
|
|
465
|
+
// app's own people who write it publish; publishing the same path again
|
|
466
|
+
// replaces the file there.
|
|
467
|
+
let publish = (file, path) =>
|
|
468
|
+
ask(path ? `public/${encodedPath(path)}` : 'public', {
|
|
469
|
+
method: path ? 'PUT' : 'POST',
|
|
470
|
+
headers: { 'content-type': file.type || 'application/octet-stream' },
|
|
471
|
+
body: file,
|
|
472
|
+
})
|
|
473
|
+
// Take a published file off the web again: its address goes back to the app.
|
|
474
|
+
let unpublish = (path) =>
|
|
475
|
+
ask(`public/${encodedPath(path)}`, { method: 'DELETE' })
|
|
476
|
+
// Every file this app published, by path.
|
|
477
|
+
let publicFiles = () => ask('public')
|
|
478
|
+
|
|
479
|
+
// Older hosts still verify the outbox owner with a separate read.
|
|
480
|
+
let checksWriteOwner = false
|
|
481
|
+
let identity = async (recovering = false) => {
|
|
482
|
+
let who = await ask(
|
|
483
|
+
'who',
|
|
484
|
+
undefined,
|
|
485
|
+
recovering ? { when: busy, tries: Infinity } : READ,
|
|
486
|
+
)
|
|
487
|
+
checksWriteOwner = who?.writeOwner === true
|
|
488
|
+
return who?.person ?? null
|
|
489
|
+
}
|
|
490
|
+
let send = async (key, entities, person, signal) => {
|
|
491
|
+
signal.throwIfAborted()
|
|
492
|
+
if (!checksWriteOwner && await identity() !== person) {
|
|
493
|
+
throw new Error('Write is unsaved: the signed-in person has changed')
|
|
494
|
+
}
|
|
495
|
+
signal.throwIfAborted()
|
|
496
|
+
let headers = {
|
|
497
|
+
'content-type': 'application/json',
|
|
498
|
+
'idempotency-key': key,
|
|
499
|
+
}
|
|
500
|
+
let path = checksWriteOwner ? OWNED_APPLY : 'apply'
|
|
501
|
+
if (checksWriteOwner) headers[WRITE_OWNER] = ownerOf(person)
|
|
502
|
+
try {
|
|
503
|
+
return await ask(path, {
|
|
504
|
+
method: 'POST',
|
|
505
|
+
headers,
|
|
506
|
+
signal,
|
|
507
|
+
body: stringify({ entities }),
|
|
508
|
+
})
|
|
509
|
+
} catch (error) {
|
|
510
|
+
if (unsupportedOwner(path, error)) checksWriteOwner = false
|
|
511
|
+
if (error.outcome === 'refused') {
|
|
512
|
+
throw new WriteRefused(entities, {
|
|
513
|
+
...error.refusal,
|
|
514
|
+
error: error.code ?? error.name,
|
|
515
|
+
message: error.message,
|
|
516
|
+
status: error.status,
|
|
517
|
+
...(error.signIn ? { signIn: error.signIn } : {}),
|
|
518
|
+
})
|
|
519
|
+
}
|
|
520
|
+
throw error
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
let client = appClient({
|
|
524
|
+
url: base.href,
|
|
525
|
+
clock,
|
|
526
|
+
connect: (address) => {
|
|
527
|
+
let url = new URL(address)
|
|
528
|
+
let version = pageVersion(base)
|
|
529
|
+
if (version != null) url.searchParams.set('version', version)
|
|
530
|
+
return connect(url)
|
|
531
|
+
},
|
|
532
|
+
fetch: (request) => fetch(new URL(request.url), request),
|
|
533
|
+
line: (filter) => lineOf(new URL(queryPath(filter), base)) ?? '',
|
|
534
|
+
read,
|
|
535
|
+
identity: () => identity(true),
|
|
536
|
+
send,
|
|
537
|
+
vocabulary: async () => {
|
|
538
|
+
await words()
|
|
539
|
+
return documents
|
|
540
|
+
},
|
|
541
|
+
recover: 'indexedDB' in globalThis,
|
|
542
|
+
firstFrame: globalThis.requestAnimationFrame &&
|
|
543
|
+
(() =>
|
|
544
|
+
new Promise((ready) =>
|
|
545
|
+
requestAnimationFrame(() => clock.after(0, ready))
|
|
546
|
+
)),
|
|
547
|
+
})
|
|
548
|
+
let app = new URL('..', base).href
|
|
549
|
+
let moved = (e) => {
|
|
550
|
+
if (String(e.detail).startsWith(app)) client.reopen()
|
|
551
|
+
}
|
|
552
|
+
events.addEventListener?.('yak-moved', moved)
|
|
553
|
+
let closed = false
|
|
554
|
+
let close = () => {
|
|
555
|
+
closed = true
|
|
556
|
+
events.removeEventListener?.('yak-moved', moved)
|
|
557
|
+
for (let queue of queues.values()) {
|
|
558
|
+
void queue.then((opened) => opened.close(), () => {})
|
|
559
|
+
}
|
|
560
|
+
queues.clear()
|
|
561
|
+
client.close()
|
|
562
|
+
}
|
|
563
|
+
// Published pages use the app's JSON envelope and named-reference rows.
|
|
564
|
+
/** @type {(bundles: any, options?: { key?: string }) => Promise<any>} */
|
|
565
|
+
let apply = client.apply
|
|
566
|
+
let edit = client.edit
|
|
567
|
+
/** @type {(filter: string, draw: (rows: any) => void) => (() => void) & { ready: Promise<any> }} */
|
|
568
|
+
let subscribe = client.subscribe
|
|
569
|
+
let upload =
|
|
570
|
+
/** @type {ReturnType<typeof import('@yaks/blob/browser').uploading>} */ (
|
|
571
|
+
async (file, options) =>
|
|
572
|
+
(await blobs()).uploading(ask, again)(file, options)
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
/** @type {Map<string, Promise<import('@yaks/client/uploads').UploadQueue>>} */
|
|
576
|
+
let queues = new Map()
|
|
577
|
+
let uploads = (group = '') => {
|
|
578
|
+
let held = queues.get(group)
|
|
579
|
+
if (held) return held
|
|
580
|
+
let queue = loadUploads(new URL(CLIENT_MODULES.blobs, base)).then(
|
|
581
|
+
({ uploads }) => {
|
|
582
|
+
if (closed) throw new Error('client is closed')
|
|
583
|
+
let owner = ''
|
|
584
|
+
return uploads({
|
|
585
|
+
scope: async (signal) => {
|
|
586
|
+
for (let n = 0;; n++) {
|
|
587
|
+
signal.throwIfAborted()
|
|
588
|
+
try {
|
|
589
|
+
let who = await ask('who', { signal })
|
|
590
|
+
owner = who?.person ?? who?.by ?? 'anonymous'
|
|
591
|
+
return JSON.stringify(
|
|
592
|
+
group ? [base.href, owner, group] : [base.href, owner],
|
|
593
|
+
)
|
|
594
|
+
} catch (error) {
|
|
595
|
+
if (!busy(error)) throw error
|
|
596
|
+
await sleep(Math.min(15_000, 1000 * 2 ** n), signal, clock)
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
store: () =>
|
|
601
|
+
owner == 'anonymous' ? undefined : {
|
|
602
|
+
by: owner,
|
|
603
|
+
readOnce: query,
|
|
604
|
+
apply: client.apply,
|
|
605
|
+
group,
|
|
606
|
+
blobUrl: (eid) => new URL('blob/' + eid, base).pathname,
|
|
607
|
+
},
|
|
608
|
+
ask: (path, init, eid) => {
|
|
609
|
+
let headers = new Headers(init.headers)
|
|
610
|
+
headers.set(UPLOAD_OWNER, owner)
|
|
611
|
+
if (eid) headers.set(UPLOAD_ROW, eid)
|
|
612
|
+
return ask(path, { ...init, headers })
|
|
613
|
+
},
|
|
614
|
+
clock,
|
|
615
|
+
events,
|
|
616
|
+
})
|
|
617
|
+
},
|
|
618
|
+
).catch((error) => {
|
|
619
|
+
if (queues.get(group) == queue) queues.delete(group)
|
|
620
|
+
throw error
|
|
621
|
+
})
|
|
622
|
+
queues.set(group, queue)
|
|
623
|
+
return queue
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
return {
|
|
627
|
+
apply,
|
|
628
|
+
edit,
|
|
629
|
+
mint,
|
|
630
|
+
issue: client.issue,
|
|
631
|
+
prepareEdits: client.prepareEdits,
|
|
632
|
+
syncStatus: (element) => bindSync(client.outbox, element, events, apply),
|
|
633
|
+
outbox: client.outbox,
|
|
634
|
+
watch: client.watch,
|
|
635
|
+
readOnce: query,
|
|
636
|
+
close,
|
|
637
|
+
me,
|
|
638
|
+
metadata: (blob) => readMetadata(query, blob),
|
|
639
|
+
operatorSend,
|
|
640
|
+
operatorRecords,
|
|
641
|
+
operatorRecord,
|
|
642
|
+
retryOperatorRecord,
|
|
643
|
+
pay,
|
|
644
|
+
words,
|
|
645
|
+
query,
|
|
646
|
+
search,
|
|
647
|
+
subscribe,
|
|
648
|
+
upload,
|
|
649
|
+
uploads,
|
|
650
|
+
publish,
|
|
651
|
+
unpublish,
|
|
652
|
+
publicFiles,
|
|
653
|
+
drafts: (opts) =>
|
|
654
|
+
browserDrafts({ apply, me, subscribe }, String(base), opts),
|
|
655
|
+
friends: friendsOver(
|
|
656
|
+
{ query, apply: (bundles) => client.apply(bundles, { server: true }) },
|
|
657
|
+
new URL('allow?at=friends', base).href,
|
|
658
|
+
),
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
let app = store(new URL('.', import.meta.url))
|
|
663
|
+
export default app
|
|
664
|
+
|
|
665
|
+
/** View URLs are relative to the app's visible mount, including its preview.
|
|
666
|
+
* @param {import('@yaks/client/router').RouterOptions} options
|
|
667
|
+
*/
|
|
668
|
+
export let router = (options = {}) => {
|
|
669
|
+
let win = options.window ?? window
|
|
670
|
+
let served = win.document.querySelector('script[data-yak-at]')?.dataset.yakAt
|
|
671
|
+
let base = new URL(served ?? '../', import.meta.url)
|
|
672
|
+
// Sandboxed installs authenticate subresources with a token in their base.
|
|
673
|
+
// The browser navigates at the app's public address, without that token.
|
|
674
|
+
if (!win.location.pathname.startsWith(base.pathname)) {
|
|
675
|
+
base.pathname = base.pathname.replace(/~[^/]+\/$/, '')
|
|
676
|
+
}
|
|
677
|
+
return routes({ base, ...options })
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export let {
|
|
681
|
+
apply,
|
|
682
|
+
edit,
|
|
683
|
+
drafts,
|
|
684
|
+
friends,
|
|
685
|
+
me,
|
|
686
|
+
issue,
|
|
687
|
+
metadata,
|
|
688
|
+
operatorSend,
|
|
689
|
+
operatorRecords,
|
|
690
|
+
operatorRecord,
|
|
691
|
+
retryOperatorRecord,
|
|
692
|
+
outbox,
|
|
693
|
+
pay,
|
|
694
|
+
prepareEdits,
|
|
695
|
+
publicFiles,
|
|
696
|
+
publish,
|
|
697
|
+
query,
|
|
698
|
+
readOnce,
|
|
699
|
+
search,
|
|
700
|
+
subscribe,
|
|
701
|
+
syncStatus,
|
|
702
|
+
unpublish,
|
|
703
|
+
upload,
|
|
704
|
+
uploads,
|
|
705
|
+
watch,
|
|
706
|
+
words,
|
|
707
|
+
} = app
|
|
708
|
+
|
|
709
|
+
export { posterUrl, videoCover } from '@yaks/ui/video-cover'
|