@celljs/ta-web 4.15.0 → 4.15.1
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/esm/browser/components/account-menu.js +8 -1
- package/esm/browser/components/app-view.js +4 -1
- package/esm/browser/components/face.js +7 -2
- package/esm/browser/components/gallery.d.ts +9 -0
- package/esm/browser/components/gallery.js +57 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/lightbox.d.ts +8 -1
- package/esm/browser/components/lightbox.js +4 -1
- package/esm/browser/components/markdown.js +6 -1
- package/esm/browser/components/media.d.ts +12 -2
- package/esm/browser/components/media.js +55 -13
- package/esm/browser/components/message-list.js +3 -2
- package/esm/browser/components/notice-center.js +6 -2
- package/esm/browser/components/serve-restart.d.ts +26 -0
- package/esm/browser/components/serve-restart.js +91 -0
- package/esm/browser/components/session-view.js +19 -11
- package/esm/browser/components/settings-parts.js +14 -5
- package/esm/browser/extension/icons.js +3 -1
- package/esm/browser/i18n/locales.d.ts +15 -3
- package/esm/browser/i18n/messages-ja.js +12 -0
- package/esm/browser/i18n/messages-zh-tw.js +12 -0
- package/esm/browser/i18n/messages.d.ts +12 -0
- package/esm/browser/i18n/messages.js +24 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +18 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +2 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +2 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +1 -0
- package/esm/browser/util/desktop.d.ts +6 -1
- package/esm/browser/util/desktop.js +10 -0
- package/esm/browser/util/gallery.d.ts +18 -0
- package/esm/browser/util/gallery.js +123 -0
- package/esm/browser/util/link.d.ts +8 -0
- package/esm/browser/util/link.js +14 -0
- package/esm/browser/util/markdown.d.ts +11 -0
- package/esm/browser/util/markdown.js +4 -0
- package/esm/browser/util/thumbnail.d.ts +18 -0
- package/esm/browser/util/thumbnail.js +26 -0
- package/esm/browser/workbench-protocol.d.ts +8 -0
- package/esm/browser/workbench.d.ts +16 -0
- package/esm/browser/workbench.js +67 -0
- package/lib/browser/components/account-menu.js +7 -0
- package/lib/browser/components/app-view.js +4 -1
- package/lib/browser/components/face.js +7 -2
- package/lib/browser/components/gallery.d.ts +10 -0
- package/lib/browser/components/gallery.js +93 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/lightbox.d.ts +8 -1
- package/lib/browser/components/lightbox.js +4 -1
- package/lib/browser/components/markdown.js +6 -1
- package/lib/browser/components/media.d.ts +12 -2
- package/lib/browser/components/media.js +57 -13
- package/lib/browser/components/message-list.js +3 -2
- package/lib/browser/components/notice-center.js +6 -2
- package/lib/browser/components/serve-restart.d.ts +27 -0
- package/lib/browser/components/serve-restart.js +129 -0
- package/lib/browser/components/session-view.js +21 -13
- package/lib/browser/components/settings-parts.js +13 -4
- package/lib/browser/extension/icons.js +2 -0
- package/lib/browser/i18n/locales.d.ts +15 -3
- package/lib/browser/i18n/messages-ja.js +12 -0
- package/lib/browser/i18n/messages-zh-tw.js +12 -0
- package/lib/browser/i18n/messages.d.ts +12 -0
- package/lib/browser/i18n/messages.js +24 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +18 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +2 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +2 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +1 -0
- package/lib/browser/util/desktop.d.ts +6 -1
- package/lib/browser/util/desktop.js +10 -0
- package/lib/browser/util/gallery.d.ts +19 -0
- package/lib/browser/util/gallery.js +126 -0
- package/lib/browser/util/link.d.ts +8 -0
- package/lib/browser/util/link.js +14 -0
- package/lib/browser/util/markdown.d.ts +11 -0
- package/lib/browser/util/markdown.js +4 -0
- package/lib/browser/util/thumbnail.d.ts +19 -0
- package/lib/browser/util/thumbnail.js +29 -0
- package/lib/browser/workbench-protocol.d.ts +8 -0
- package/lib/browser/workbench.d.ts +16 -0
- package/lib/browser/workbench.js +67 -0
- package/package.json +7 -7
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* The launcher and the board (ta-launcher.md, components/board.tsx): their cards and rows, and the flyout
|
|
3
3
|
* the rail opens them in on a computer or a tablet. Where they rest on a phone is in style/phone.ts.
|
|
4
4
|
*/
|
|
5
|
-
export declare const SURFACES_STYLE = "\n.ta-kept-page { display: contents; }\n.ta-kept-page[hidden] { display: none; }\n.ta-launcher { display: flex; flex-direction: column; gap: 24px; }\n/* The launcher with its search: the stack fills it, its base scrolls. */\n.ta-launcher-surface { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-launcher-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; }\n.ta-launcher-field { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 36px; margin-bottom: 18px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); font: inherit; font-size: calc(14px * var(--ta-font-scale)); cursor: text; -webkit-tap-highlight-color: transparent; transition: background 140ms; }\n.ta-launcher-field:active { background: var(--ta-hover); }\n.ta-launcher-search { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ta-main); }\n.ta-launcher-search-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 12px 8px; }\n.ta-launcher-search-head input::-webkit-search-cancel-button { display: none; }\n.ta-launcher-clear { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ta-muted); }\n.ta-launcher-cancel { flex: none; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--ta-text); font: inherit; font-size: calc(15px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-search-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 16px; }\n.ta-launcher-results { margin: 0; padding: 0; list-style: none; animation: ta-fade 120ms ease-out; }\n.ta-launcher-results-section + .ta-launcher-results-section { margin-top: 14px; }\n.ta-launcher-results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-results-all { border: 0; padding: 4px 0; background: none; color: var(--ta-link); font: inherit; font-weight: 500; cursor: pointer; }\n.ta-launcher-results-wait { padding: 10px 8px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-launcher-more { height: 1px; }\n/* A long list draws the rows in view only; the rest keep their place. */\n.ta-launcher-result-row { position: relative; display: flex; align-items: center; content-visibility: auto; contain-intrinsic-size: auto 56px; }\n.ta-launcher-result-row > .ta-launcher-result { flex: 1; min-width: 0; }\n.ta-launcher-result-letter { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-result-action { flex: none; position: absolute; right: 8px; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 600; cursor: pointer; transition: background 140ms, transform 120ms var(--ta-ease); }\n.ta-launcher-result-action:hover { background: var(--ta-hover-strong); }\n.ta-launcher-result-action:active { transform: scale(0.95); }\n.ta-launcher-result-row:has(.ta-launcher-result-action) .ta-launcher-result { padding-right: 84px; }\n/* The dialog that hands an extension on. */\n.ta-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 6px 6px; }\n.ta-share-qr { width: 220px; height: 220px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-share-qr svg { display: block; width: 100%; height: 100%; animation: ta-fade 160ms ease-out; }\n.ta-share-qr-busy { display: grid; place-items: center; background: var(--ta-raised); }\n.ta-share-qr-wait { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-share-hint { max-width: 320px; margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); text-wrap: balance; }\n.ta-share-actions { display: flex; gap: 8px; }\n.ta-share-stop { border: 0; padding: 2px 4px; background: none; color: var(--ta-red); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }\n.ta-launcher-result:hover, .ta-launcher-result:active { background: var(--ta-hover); }\n.ta-launcher-result-icon { flex: none; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ta-tile); color: var(--ta-tile-ink); }\n.ta-launcher-result-icon > .ta-busy-mark { width: 16px; height: 16px; border-color: color-mix(in srgb, var(--ta-tile-ink) 25%, transparent); border-top-color: var(--ta-tile-ink); }\n.ta-launcher-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-launcher-result-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(15px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }\n.ta-launcher-result-title mark { background: none; color: var(--ta-accent); font-weight: 600; }\n.ta-launcher-result-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-board { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-board-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 6px 14px 6px 16px; }\n.ta-board-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-board-title { font-size: calc(22px * var(--ta-font-scale)); line-height: calc(28px * var(--ta-font-scale)); font-weight: 700; letter-spacing: -0.01em; color: var(--ta-text); }\n.ta-board-date { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(17px * var(--ta-font-scale)); }\n.ta-board-edit-button { flex: none; height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--ta-chip); color: var(--ta-text); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; transition: background 160ms, color 160ms, transform 120ms var(--ta-ease); }\n.ta-board-edit-button:hover { background: var(--ta-hover-strong); }\n.ta-board-edit-button:active { transform: scale(0.96); }\n.ta-board-edit-button.ta-active { background: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-board-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px calc(20px + env(safe-area-inset-bottom)); }\n.ta-board-cards { display: flex; flex-direction: column; gap: 12px; }\n.ta-board-card { padding: 12px 14px 14px; border-radius: 20px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted), 0 2px 6px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04); animation: ta-board-in 260ms var(--ta-ease) both; }\n:root[data-theme='dark'] .ta-board-card { background: var(--ta-card); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n@keyframes ta-board-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }\n.ta-board-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); font-weight: 600; }\n.ta-board-card-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--ta-accent) 14%, transparent); color: var(--ta-accent); }\n.ta-board-card-body { min-width: 0; color: var(--ta-body); font-size: calc(14px * var(--ta-font-scale)); }\n/* A card with nothing says so in one quiet line, where its content would start. */\n.ta-board-card-body .ta-empty { min-height: 0; align-items: flex-start; padding: 0 0 2px; text-align: left; }\n.ta-board-card-body .ta-empty-title { color: var(--ta-muted); font-weight: 400; }\n.ta-board-edit { display: flex; flex-direction: column; animation: ta-fade 160ms ease-out; }\n.ta-board-rows { display: flex; flex-direction: column; border-radius: 14px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-board-row { position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--ta-main); transition: transform 200ms var(--ta-ease), box-shadow 160ms; }\n.ta-board-row + .ta-board-row::before { content: ''; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--ta-border-muted); }\n.ta-board-row[data-sorting] { z-index: 2; transition: box-shadow 160ms; box-shadow: var(--ta-shadow-pop); }\n.ta-board-row[data-sorting]::before, .ta-board-row[data-sorting] + .ta-board-row::before { display: none; }\n.ta-board-toggle { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; }\n.ta-board-off { color: var(--ta-red); }\n.ta-board-on { color: var(--ta-green); }\n.ta-board-row-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-secondary); }\n.ta-board-row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-board-grip { flex: none; display: grid; place-items: center; width: 44px; height: 48px; padding: 0; border: 0; background: none; color: var(--ta-muted); cursor: grab; touch-action: none; }\n.ta-board-row[data-sorting] .ta-board-grip { cursor: grabbing; }\n.ta-board-label { margin: 20px 6px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n\n/* The rail's buttons for them, above the account; the flyout beside it. */\n.ta-rail-tools { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 4px; }\n.ta-flyout { position: fixed; z-index: 50; left: calc(64px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom)); width: 380px; max-width: calc(100vw - 80px); max-height: min(680px, calc(100vh - 20px - var(--ta-titlebar))); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ta-border); border-radius: 16px; background: var(--ta-side); box-shadow: var(--ta-shadow-pop); transform-origin: 0 100%; animation: ta-flyout-in 180ms var(--ta-ease); }\n.ta-flyout > .ta-launcher-surface { height: min(560px, calc(100vh - 20px - var(--ta-titlebar))); flex: none; }\n@keyframes ta-flyout-in { from { opacity: 0; transform: translate3d(-6px, 6px, 0) scale(0.97); } }\n/* The faces of those who are not Ta (components/face.tsx): they blink, and look about while they work */\n:root:not([data-theme='light']) .ta-face[data-face=\"11\"] .ta-face-body > g > circle { fill: #4a4a52; }\n.ta-face { position: relative; display: inline-flex; flex: none; }\n.ta-face svg { display: block; overflow: visible; }\n.ta-face-eyes { transform-box: fill-box; transform-origin: center; animation: ta-face-blink 5.2s infinite; }\n.ta-face[data-face=\"1\"] .ta-face-eyes, .ta-face[data-face=\"5\"] .ta-face-eyes, .ta-face[data-face=\"9\"] .ta-face-eyes, .ta-face[data-face=\"13\"] .ta-face-eyes { animation-delay: -1.7s; }\n.ta-face[data-face=\"2\"] .ta-face-eyes, .ta-face[data-face=\"6\"] .ta-face-eyes, .ta-face[data-face=\"10\"] .ta-face-eyes, .ta-face[data-face=\"14\"] .ta-face-eyes { animation-delay: -3.1s; }\n.ta-face[data-face=\"3\"] .ta-face-eyes, .ta-face[data-face=\"7\"] .ta-face-eyes, .ta-face[data-face=\"11\"] .ta-face-eyes, .ta-face[data-face=\"15\"] .ta-face-eyes { animation-delay: -4.4s; }\n.ta-face-working .ta-face-look { animation: ta-face-look 2.4s ease-in-out infinite; }\n.ta-face-working .ta-face-body { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-face-bob 1.2s ease-in-out infinite; }\n.ta-face-dot { position: absolute; right: -1px; bottom: -1px; width: 27%; height: 27%; min-width: 7px; min-height: 7px; box-sizing: content-box; border-radius: 50%; border: 2px solid var(--ta-face-ring, var(--ta-main)); background: var(--ta-border-field); }\n.ta-face-dot.ta-face-on { background: var(--ta-green); }\n@keyframes ta-face-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }\n@keyframes ta-face-look { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.4px); } 70% { transform: translateX(1.4px); } }\n@keyframes ta-face-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }\n@media (prefers-reduced-motion: reduce) { .ta-face * { animation: none !important; } }\n.ta-group-face { position: relative; display: inline-flex; flex: none; }\n.ta-group-face-back { position: absolute; right: 0; top: 0; }\n.ta-group-face-front { position: absolute; left: 0; bottom: 0; z-index: 1; }\n";
|
|
5
|
+
export declare const SURFACES_STYLE = "\n.ta-kept-page { display: contents; }\n.ta-kept-page[hidden] { display: none; }\n.ta-launcher { display: flex; flex-direction: column; gap: 24px; }\n/* The launcher with its search: the stack fills it, its base scrolls. */\n.ta-launcher-surface { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-launcher-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; }\n.ta-launcher-field { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 36px; margin-bottom: 18px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); font: inherit; font-size: calc(14px * var(--ta-font-scale)); cursor: text; -webkit-tap-highlight-color: transparent; transition: background 140ms; }\n.ta-launcher-field:active { background: var(--ta-hover); }\n.ta-launcher-search { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ta-main); }\n.ta-launcher-search-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 12px 8px; }\n.ta-launcher-search-head input::-webkit-search-cancel-button { display: none; }\n.ta-launcher-clear { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ta-muted); }\n.ta-launcher-cancel { flex: none; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--ta-text); font: inherit; font-size: calc(15px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-search-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 16px; }\n.ta-launcher-results { margin: 0; padding: 0; list-style: none; animation: ta-fade 120ms ease-out; }\n.ta-launcher-results-section + .ta-launcher-results-section { margin-top: 14px; }\n.ta-launcher-results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-results-all { border: 0; padding: 4px 0; background: none; color: var(--ta-link); font: inherit; font-weight: 500; cursor: pointer; }\n.ta-launcher-results-wait { padding: 10px 8px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-launcher-more { height: 1px; }\n/* A long list draws the rows in view only; the rest keep their place. */\n.ta-launcher-result-row { position: relative; display: flex; align-items: center; content-visibility: auto; contain-intrinsic-size: auto 56px; }\n.ta-launcher-result-row > .ta-launcher-result { flex: 1; min-width: 0; }\n.ta-launcher-result-letter { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-result-action { flex: none; position: absolute; right: 8px; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 600; cursor: pointer; transition: background 140ms, transform 120ms var(--ta-ease); }\n.ta-launcher-result-action:hover { background: var(--ta-hover-strong); }\n.ta-launcher-result-action:active { transform: scale(0.95); }\n.ta-launcher-result-row:has(.ta-launcher-result-action) .ta-launcher-result { padding-right: 84px; }\n/* The dialog that hands an extension on. */\n.ta-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 6px 6px; }\n.ta-share-qr { width: 220px; height: 220px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-share-qr svg { display: block; width: 100%; height: 100%; animation: ta-fade 160ms ease-out; }\n.ta-share-qr-busy { display: grid; place-items: center; background: var(--ta-raised); }\n.ta-share-qr-wait { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-share-hint { max-width: 320px; margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); text-wrap: balance; }\n.ta-share-actions { display: flex; gap: 8px; }\n.ta-share-stop { border: 0; padding: 2px 4px; background: none; color: var(--ta-red); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }\n.ta-launcher-result:hover, .ta-launcher-result:active { background: var(--ta-hover); }\n.ta-launcher-result-icon { flex: none; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ta-tile); color: var(--ta-tile-ink); }\n.ta-launcher-result-icon > .ta-busy-mark { width: 16px; height: 16px; border-color: color-mix(in srgb, var(--ta-tile-ink) 25%, transparent); border-top-color: var(--ta-tile-ink); }\n.ta-launcher-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-launcher-result-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(15px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }\n.ta-launcher-result-title mark { background: none; color: var(--ta-accent); font-weight: 600; }\n.ta-launcher-result-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-board { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-board-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 6px 14px 6px 16px; }\n.ta-board-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-board-title { font-size: calc(22px * var(--ta-font-scale)); line-height: calc(28px * var(--ta-font-scale)); font-weight: 700; letter-spacing: -0.01em; color: var(--ta-text); }\n.ta-board-date { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(17px * var(--ta-font-scale)); }\n.ta-board-edit-button { flex: none; height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--ta-chip); color: var(--ta-text); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; transition: background 160ms, color 160ms, transform 120ms var(--ta-ease); }\n.ta-board-edit-button:hover { background: var(--ta-hover-strong); }\n.ta-board-edit-button:active { transform: scale(0.96); }\n.ta-board-edit-button.ta-active { background: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-board-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px calc(20px + env(safe-area-inset-bottom)); }\n.ta-board-cards { display: flex; flex-direction: column; gap: 12px; }\n.ta-board-card { padding: 12px 14px 14px; border-radius: 20px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted), 0 2px 6px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04); animation: ta-board-in 260ms var(--ta-ease) both; }\n:root[data-theme='dark'] .ta-board-card { background: var(--ta-card); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n@keyframes ta-board-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }\n.ta-board-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); font-weight: 600; }\n.ta-board-card-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--ta-accent) 14%, transparent); color: var(--ta-accent); }\n.ta-board-card-body { min-width: 0; color: var(--ta-body); font-size: calc(14px * var(--ta-font-scale)); }\n/* A card with nothing says so in one quiet line, where its content would start. */\n.ta-board-card-body .ta-empty { min-height: 0; align-items: flex-start; padding: 0 0 2px; text-align: left; }\n.ta-board-card-body .ta-empty-title { color: var(--ta-muted); font-weight: 400; }\n.ta-board-edit { display: flex; flex-direction: column; animation: ta-fade 160ms ease-out; }\n.ta-board-rows { display: flex; flex-direction: column; border-radius: 14px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-board-row { position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--ta-main); transition: transform 200ms var(--ta-ease), box-shadow 160ms; }\n.ta-board-row + .ta-board-row::before { content: ''; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--ta-border-muted); }\n.ta-board-row[data-sorting] { z-index: 2; transition: box-shadow 160ms; box-shadow: var(--ta-shadow-pop); }\n.ta-board-row[data-sorting]::before, .ta-board-row[data-sorting] + .ta-board-row::before { display: none; }\n.ta-board-toggle { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; }\n.ta-board-off { color: var(--ta-red); }\n.ta-board-on { color: var(--ta-green); }\n.ta-board-row-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-secondary); }\n.ta-board-row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-board-grip { flex: none; display: grid; place-items: center; width: 44px; height: 48px; padding: 0; border: 0; background: none; color: var(--ta-muted); cursor: grab; touch-action: none; }\n.ta-board-row[data-sorting] .ta-board-grip { cursor: grabbing; }\n.ta-board-label { margin: 20px 6px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n\n/* The rail's buttons for them, above the account; the flyout beside it. */\n.ta-rail-tools { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 4px; }\n.ta-flyout { position: fixed; z-index: 50; left: calc(64px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom)); width: 380px; max-width: calc(100vw - 80px); max-height: min(680px, calc(100vh - 20px - var(--ta-titlebar))); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ta-border); border-radius: 16px; background: var(--ta-side); box-shadow: var(--ta-shadow-pop); transform-origin: 0 100%; animation: ta-flyout-in 180ms var(--ta-ease); }\n.ta-flyout > .ta-launcher-surface { height: min(560px, calc(100vh - 20px - var(--ta-titlebar))); flex: none; }\n@keyframes ta-flyout-in { from { opacity: 0; transform: translate3d(-6px, 6px, 0) scale(0.97); } }\n/* The faces of those who are not Ta (components/face.tsx): they blink, and look about while they work */\n:root:not([data-theme='light']) .ta-face[data-face=\"11\"] .ta-face-body > g > circle { fill: #4a4a52; }\n.ta-face { position: relative; display: inline-flex; flex: none; }\n.ta-face svg { display: block; overflow: visible; }\n.ta-face-double { align-items: center; justify-content: center; }\n.ta-face-eyes { transform-box: fill-box; transform-origin: center; animation: ta-face-blink 5.2s infinite; }\n.ta-face[data-face=\"1\"] .ta-face-eyes, .ta-face[data-face=\"5\"] .ta-face-eyes, .ta-face[data-face=\"9\"] .ta-face-eyes, .ta-face[data-face=\"13\"] .ta-face-eyes { animation-delay: -1.7s; }\n.ta-face[data-face=\"2\"] .ta-face-eyes, .ta-face[data-face=\"6\"] .ta-face-eyes, .ta-face[data-face=\"10\"] .ta-face-eyes, .ta-face[data-face=\"14\"] .ta-face-eyes { animation-delay: -3.1s; }\n.ta-face[data-face=\"3\"] .ta-face-eyes, .ta-face[data-face=\"7\"] .ta-face-eyes, .ta-face[data-face=\"11\"] .ta-face-eyes, .ta-face[data-face=\"15\"] .ta-face-eyes { animation-delay: -4.4s; }\n.ta-face-working .ta-face-look { animation: ta-face-look 2.4s ease-in-out infinite; }\n.ta-face-working .ta-face-body { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-face-bob 1.2s ease-in-out infinite; }\n.ta-face-dot { position: absolute; right: -1px; bottom: -1px; width: 27%; height: 27%; min-width: 7px; min-height: 7px; box-sizing: content-box; border-radius: 50%; border: 2px solid var(--ta-face-ring, var(--ta-main)); background: var(--ta-border-field); }\n.ta-face-dot.ta-face-on { background: var(--ta-green); }\n@keyframes ta-face-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }\n@keyframes ta-face-look { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.4px); } 70% { transform: translateX(1.4px); } }\n@keyframes ta-face-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }\n@media (prefers-reduced-motion: reduce) { .ta-face * { animation: none !important; } }\n.ta-group-face { position: relative; display: inline-flex; flex: none; }\n.ta-group-face-back { position: absolute; right: 0; top: 0; }\n.ta-group-face-front { position: absolute; left: 0; bottom: 0; z-index: 1; }\n";
|
|
@@ -92,6 +92,7 @@ export const SURFACES_STYLE = `
|
|
|
92
92
|
:root:not([data-theme='light']) .ta-face[data-face="11"] .ta-face-body > g > circle { fill: #4a4a52; }
|
|
93
93
|
.ta-face { position: relative; display: inline-flex; flex: none; }
|
|
94
94
|
.ta-face svg { display: block; overflow: visible; }
|
|
95
|
+
.ta-face-double { align-items: center; justify-content: center; }
|
|
95
96
|
.ta-face-eyes { transform-box: fill-box; transform-origin: center; animation: ta-face-blink 5.2s infinite; }
|
|
96
97
|
.ta-face[data-face="1"] .ta-face-eyes, .ta-face[data-face="5"] .ta-face-eyes, .ta-face[data-face="9"] .ta-face-eyes, .ta-face[data-face="13"] .ta-face-eyes { animation-delay: -1.7s; }
|
|
97
98
|
.ta-face[data-face="2"] .ta-face-eyes, .ta-face[data-face="6"] .ta-face-eyes, .ta-face[data-face="10"] .ta-face-eyes, .ta-face[data-face="14"] .ta-face-eyes { animation-delay: -3.1s; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What Ta Desktop can do for the page beyond a tab of a browser. */
|
|
2
|
-
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech';
|
|
2
|
+
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech' | 'restart';
|
|
3
3
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
4
4
|
export interface DesktopFileManager {
|
|
5
5
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -71,6 +71,11 @@ export declare namespace DesktopUtil {
|
|
|
71
71
|
function has(feature: DesktopFeature, scope?: object): boolean;
|
|
72
72
|
/** The file manager of the system, when the page is in Ta Desktop. */
|
|
73
73
|
function fileManager(scope?: object): DesktopFileManager | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Restarts Ta Desktop with the Ta service it started, to its build installed now: false when the Ta service is not
|
|
76
|
+
* the app's (one started in a terminal), which then restarts by itself (TaServer.restartServer).
|
|
77
|
+
*/
|
|
78
|
+
function restart(scope?: object): (() => Promise<boolean>) | undefined;
|
|
74
79
|
/** The sign-ins of the user's browsers, where Ta Desktop can read them (macOS, Windows). */
|
|
75
80
|
function browserData(scope?: object): DesktopBrowserData | undefined;
|
|
76
81
|
/** `debugWebview` of Ta Desktop; `undefined` elsewhere. */
|
|
@@ -24,6 +24,16 @@ export var DesktopUtil;
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
DesktopUtil.fileManager = fileManager;
|
|
27
|
+
/**
|
|
28
|
+
* Restarts Ta Desktop with the Ta service it started, to its build installed now: false when the Ta service is not
|
|
29
|
+
* the app's (one started in a terminal), which then restarts by itself (TaServer.restartServer).
|
|
30
|
+
*/
|
|
31
|
+
function restart(scope = globalThis) {
|
|
32
|
+
var _a;
|
|
33
|
+
const restart = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.restart;
|
|
34
|
+
return has('restart', scope) && typeof restart === 'function' ? async () => (await restart()) === true : undefined;
|
|
35
|
+
}
|
|
36
|
+
DesktopUtil.restart = restart;
|
|
27
37
|
/** The sign-ins of the user's browsers, where Ta Desktop can read them (macOS, Windows). */
|
|
28
38
|
function browserData(scope = globalThis) {
|
|
29
39
|
var _a;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type MarkdownBlock, type MarkdownPicture } from './markdown.js';
|
|
2
|
+
/**
|
|
3
|
+
* Pictures of a reply shown together, as chat apps show several sent at once: two side by side, four in two rows of
|
|
4
|
+
* two, three or more three a row, nine at most, the last saying how many more. Paragraphs of pictures alone one after
|
|
5
|
+
* another are one gallery, and so are pictures each under a short line of its own that names it (`**Dark**`,
|
|
6
|
+
* `Before:`), which shows under its tile.
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace GalleryUtil {
|
|
9
|
+
/** The tiles a gallery shows; the last of them says how many more there are. */
|
|
10
|
+
const TILES = 9;
|
|
11
|
+
function columns(count: number): number;
|
|
12
|
+
/** The blocks with each run of two pictures or more as one gallery. */
|
|
13
|
+
function group(blocks: readonly MarkdownBlock[]): MarkdownBlock[];
|
|
14
|
+
/** The pictures of a paragraph of pictures alone (and spaces between them); undefined for any other. */
|
|
15
|
+
function pictures(text: string): MarkdownPicture[] | undefined;
|
|
16
|
+
/** The words of a short line that names the picture under it, its marks and the colon after it left out. */
|
|
17
|
+
function captionOf(text: string): string | undefined;
|
|
18
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { MarkdownUtil } from './markdown.js';
|
|
2
|
+
/** A caption is a short line: at most this wide, a CJK character counting twice. */
|
|
3
|
+
const CAPTION_WIDTH = 40;
|
|
4
|
+
/** A line that ends a sentence says something, it does not name a picture. */
|
|
5
|
+
const SENTENCE_END = /[。!?!?;;.]$/;
|
|
6
|
+
/** Alt text that names no picture: a file name, or "image", "screenshot" and the like. */
|
|
7
|
+
const BARE_ALT = /^(?:image|img|picture|pic|photo|screenshot|screen ?shot|图片?|截图|圖片?|截圖|画像|スクリーンショット)?\s*\d*$|\.\w{2,5}$/i;
|
|
8
|
+
/**
|
|
9
|
+
* Pictures of a reply shown together, as chat apps show several sent at once: two side by side, four in two rows of
|
|
10
|
+
* two, three or more three a row, nine at most, the last saying how many more. Paragraphs of pictures alone one after
|
|
11
|
+
* another are one gallery, and so are pictures each under a short line of its own that names it (`**Dark**`,
|
|
12
|
+
* `Before:`), which shows under its tile.
|
|
13
|
+
*/
|
|
14
|
+
export var GalleryUtil;
|
|
15
|
+
(function (GalleryUtil) {
|
|
16
|
+
/** The tiles a gallery shows; the last of them says how many more there are. */
|
|
17
|
+
GalleryUtil.TILES = 9;
|
|
18
|
+
function columns(count) {
|
|
19
|
+
return count <= 1 ? 1 : count === 2 || count === 4 ? 2 : 3;
|
|
20
|
+
}
|
|
21
|
+
GalleryUtil.columns = columns;
|
|
22
|
+
/** The blocks with each run of two pictures or more as one gallery. */
|
|
23
|
+
function group(blocks) {
|
|
24
|
+
const out = [];
|
|
25
|
+
for (let i = 0; i < blocks.length;) {
|
|
26
|
+
const run = runFrom(blocks, i);
|
|
27
|
+
const count = run.entries.reduce((sum, entry) => sum + entry.pictures.length, 0);
|
|
28
|
+
if (count < 2) {
|
|
29
|
+
out.push(blocks[i]);
|
|
30
|
+
i++;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const entries = run.entries.slice();
|
|
34
|
+
// One line before the first picture alone introduces them all ("截图如下"), it names none.
|
|
35
|
+
const named = entries.filter(entry => entry.caption).length;
|
|
36
|
+
if (named === 1 && entries[0].caption) {
|
|
37
|
+
out.push(entries[0].caption);
|
|
38
|
+
entries[0] = { pictures: entries[0].pictures };
|
|
39
|
+
}
|
|
40
|
+
const items = entries.flatMap(entry => {
|
|
41
|
+
var _a;
|
|
42
|
+
const caption = ((_a = entry.caption) === null || _a === void 0 ? void 0 : _a.type) === 'paragraph' ? captionOf(entry.caption.text) : undefined;
|
|
43
|
+
return entry.pictures.map(picture => {
|
|
44
|
+
const words = caption !== null && caption !== void 0 ? caption : altCaption(picture.alt);
|
|
45
|
+
return words ? { ...picture, caption: words } : picture;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
out.push({ type: 'gallery', items });
|
|
49
|
+
i = run.end;
|
|
50
|
+
}
|
|
51
|
+
return out;
|
|
52
|
+
}
|
|
53
|
+
GalleryUtil.group = group;
|
|
54
|
+
/** The pictures of a paragraph of pictures alone (and spaces between them); undefined for any other. */
|
|
55
|
+
function pictures(text) {
|
|
56
|
+
const out = [];
|
|
57
|
+
for (const node of MarkdownUtil.inline(text)) {
|
|
58
|
+
if (node.type === 'media' && MarkdownUtil.media(node.src) === 'image') {
|
|
59
|
+
out.push({ src: node.src, alt: node.alt });
|
|
60
|
+
}
|
|
61
|
+
else if (node.type !== 'text' || node.text.trim()) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return out.length > 0 ? out : undefined;
|
|
66
|
+
}
|
|
67
|
+
GalleryUtil.pictures = pictures;
|
|
68
|
+
/** The words of a short line that names the picture under it, its marks and the colon after it left out. */
|
|
69
|
+
function captionOf(text) {
|
|
70
|
+
if (text.includes('\n')) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
const colon = /\s*[::]\s*$/;
|
|
74
|
+
let line = text.trim().replace(colon, '');
|
|
75
|
+
const strong = /^(\*\*|__|\*|_)(.+)\1$/.exec(line);
|
|
76
|
+
if (strong && !strong[2].includes(strong[1])) {
|
|
77
|
+
line = strong[2].trim().replace(colon, '');
|
|
78
|
+
}
|
|
79
|
+
if (!line || SENTENCE_END.test(line) || width(line) > CAPTION_WIDTH) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
return MarkdownUtil.inline(line).every(node => node.type === 'text' || node.type === 'strong' || node.type === 'em' || node.type === 'code')
|
|
83
|
+
? line
|
|
84
|
+
: undefined;
|
|
85
|
+
}
|
|
86
|
+
GalleryUtil.captionOf = captionOf;
|
|
87
|
+
function altCaption(alt) {
|
|
88
|
+
const words = alt.trim();
|
|
89
|
+
return words && !BARE_ALT.test(words) && width(words) <= CAPTION_WIDTH ? words : undefined;
|
|
90
|
+
}
|
|
91
|
+
function runFrom(blocks, start) {
|
|
92
|
+
const entries = [];
|
|
93
|
+
let i = start;
|
|
94
|
+
while (i < blocks.length) {
|
|
95
|
+
const block = blocks[i];
|
|
96
|
+
if (block.type !== 'paragraph') {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
const own = pictures(block.text);
|
|
100
|
+
if (own) {
|
|
101
|
+
entries.push({ pictures: own });
|
|
102
|
+
i++;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
const next = blocks[i + 1];
|
|
106
|
+
const under = (next === null || next === void 0 ? void 0 : next.type) === 'paragraph' && captionOf(block.text) !== undefined ? pictures(next.text) : undefined;
|
|
107
|
+
if ((under === null || under === void 0 ? void 0 : under.length) !== 1) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
entries.push({ pictures: under, caption: block });
|
|
111
|
+
i += 2;
|
|
112
|
+
}
|
|
113
|
+
return { entries, end: i };
|
|
114
|
+
}
|
|
115
|
+
function width(text) {
|
|
116
|
+
let width = 0;
|
|
117
|
+
for (const char of text) {
|
|
118
|
+
width += char.charCodeAt(0) >= 0x2e80 ? 2 : 1;
|
|
119
|
+
}
|
|
120
|
+
return width;
|
|
121
|
+
}
|
|
122
|
+
})(GalleryUtil || (GalleryUtil = {}));
|
|
123
|
+
//# sourceMappingURL=gallery.js.map
|
|
@@ -36,6 +36,14 @@ export declare namespace LinkUtil {
|
|
|
36
36
|
function codeReference(text: string): LinkTarget | undefined;
|
|
37
37
|
/** A URL at the start of `text` (text runs on after it), without the punctuation that ends a sentence. */
|
|
38
38
|
function bareUrl(text: string): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The first web address of a notice, for a button that opens it (a page to sign in on); the text without it
|
|
41
|
+
* when it ends the text, as the button stands for it.
|
|
42
|
+
*/
|
|
43
|
+
function noticeLink(text: string): {
|
|
44
|
+
text: string;
|
|
45
|
+
url?: string;
|
|
46
|
+
};
|
|
39
47
|
/** `path` against the directory `cwd`: the directory to read it in, and the path inside it ('' for the directory itself). */
|
|
40
48
|
function resolve(cwd: string, path: string): {
|
|
41
49
|
cwd: string;
|
package/esm/browser/util/link.js
CHANGED
|
@@ -129,6 +129,20 @@ export var LinkUtil;
|
|
|
129
129
|
return /^https?:\/\/[^/?#]/i.test(url) ? url : undefined;
|
|
130
130
|
}
|
|
131
131
|
LinkUtil.bareUrl = bareUrl;
|
|
132
|
+
/**
|
|
133
|
+
* The first web address of a notice, for a button that opens it (a page to sign in on); the text without it
|
|
134
|
+
* when it ends the text, as the button stands for it.
|
|
135
|
+
*/
|
|
136
|
+
function noticeLink(text) {
|
|
137
|
+
const at = text.search(/https?:\/\//i);
|
|
138
|
+
const url = at < 0 ? undefined : bareUrl(text.slice(at));
|
|
139
|
+
if (!url) {
|
|
140
|
+
return { text };
|
|
141
|
+
}
|
|
142
|
+
const after = text.slice(at + url.length).replace(/^[.,;:!?。,;!?]+/, '');
|
|
143
|
+
return { text: after.trim() ? text : text.slice(0, at).replace(/[\s::]+$/, ''), url };
|
|
144
|
+
}
|
|
145
|
+
LinkUtil.noticeLink = noticeLink;
|
|
132
146
|
/** `path` against the directory `cwd`: the directory to read it in, and the path inside it ('' for the directory itself). */
|
|
133
147
|
function resolve(cwd, path) {
|
|
134
148
|
if (cwd.includes('\\') || path.includes('\\')) {
|
|
@@ -35,7 +35,18 @@ export type MarkdownBlock = {
|
|
|
35
35
|
closed: boolean;
|
|
36
36
|
} | {
|
|
37
37
|
type: 'rule';
|
|
38
|
+
}
|
|
39
|
+
/** Pictures one after another, shown together as a grid (GalleryUtil.group). */
|
|
40
|
+
| {
|
|
41
|
+
type: 'gallery';
|
|
42
|
+
items: MarkdownPicture[];
|
|
38
43
|
};
|
|
44
|
+
/** A picture of a gallery: its target, its alt text and the words that name it, if any. */
|
|
45
|
+
export interface MarkdownPicture {
|
|
46
|
+
src: string;
|
|
47
|
+
alt: string;
|
|
48
|
+
caption?: string;
|
|
49
|
+
}
|
|
39
50
|
/** How a column of a table is aligned: `:--`, `:-:`, `--:`, or as the page is (`''`). */
|
|
40
51
|
export type TableAlign = '' | 'left' | 'center' | 'right';
|
|
41
52
|
/** A run of text inside a block. */
|
|
@@ -229,6 +229,10 @@ export var MarkdownUtil;
|
|
|
229
229
|
switch (b.type) {
|
|
230
230
|
case 'list':
|
|
231
231
|
return a.type === 'list' && a.ordered === b.ordered && sameStrings(a.items, b.items);
|
|
232
|
+
case 'gallery':
|
|
233
|
+
return (a.type === 'gallery' &&
|
|
234
|
+
a.items.length === b.items.length &&
|
|
235
|
+
a.items.every((item, index) => item.src === b.items[index].src && item.alt === b.items[index].alt && item.caption === b.items[index].caption));
|
|
232
236
|
case 'table':
|
|
233
237
|
return (a.type === 'table' &&
|
|
234
238
|
sameStrings(a.header, b.header) &&
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A picture of the workspace shown smaller than it is (in a reply, a tile of a gallery) is loaded smaller: its URL asks
|
|
3
|
+
* ta serve for a box of the pixels of the device (`?w=&h=`, `fit=cover` for a tile it fills), which makes a smaller PNG
|
|
4
|
+
* of a PNG and sends any other picture as it is. Enlarged, the picture itself loads.
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace ThumbnailUtil {
|
|
7
|
+
/** The box a picture shows in, in pixels of the device; `cover` for a tile it fills. */
|
|
8
|
+
interface Box {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
cover?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** `css` pixels of the page in pixels of the device, three at most to one, rounded up to a step. */
|
|
14
|
+
function side(css: number, ratio?: number): number;
|
|
15
|
+
function url(url: string, width: number, height: number, cover?: boolean): string;
|
|
16
|
+
/** The URL of a file of the workspace asked in `box`, or as it is without one. */
|
|
17
|
+
function boxed(url: string, box?: Box): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Sides of a smaller picture go up in steps of this, so that pages of nearly the same width share one. */
|
|
2
|
+
const STEP = 160;
|
|
3
|
+
const MAX = 4096;
|
|
4
|
+
/**
|
|
5
|
+
* A picture of the workspace shown smaller than it is (in a reply, a tile of a gallery) is loaded smaller: its URL asks
|
|
6
|
+
* ta serve for a box of the pixels of the device (`?w=&h=`, `fit=cover` for a tile it fills), which makes a smaller PNG
|
|
7
|
+
* of a PNG and sends any other picture as it is. Enlarged, the picture itself loads.
|
|
8
|
+
*/
|
|
9
|
+
export var ThumbnailUtil;
|
|
10
|
+
(function (ThumbnailUtil) {
|
|
11
|
+
/** `css` pixels of the page in pixels of the device, three at most to one, rounded up to a step. */
|
|
12
|
+
function side(css, ratio = globalThis.devicePixelRatio || 1) {
|
|
13
|
+
return Math.min(MAX, Math.ceil((css * Math.min(3, Math.max(1, ratio))) / STEP) * STEP);
|
|
14
|
+
}
|
|
15
|
+
ThumbnailUtil.side = side;
|
|
16
|
+
function url(url, width, height, cover = false) {
|
|
17
|
+
return `${url}${url.includes('?') ? '&' : '?'}w=${width}&h=${height}${cover ? '&fit=cover' : ''}`;
|
|
18
|
+
}
|
|
19
|
+
ThumbnailUtil.url = url;
|
|
20
|
+
/** The URL of a file of the workspace asked in `box`, or as it is without one. */
|
|
21
|
+
function boxed(url, box) {
|
|
22
|
+
return box ? ThumbnailUtil.url(url, box.width, box.height, box.cover) : url;
|
|
23
|
+
}
|
|
24
|
+
ThumbnailUtil.boxed = boxed;
|
|
25
|
+
})(ThumbnailUtil || (ThumbnailUtil = {}));
|
|
26
|
+
//# sourceMappingURL=thumbnail.js.map
|
|
@@ -49,6 +49,8 @@ export interface WorkbenchState {
|
|
|
49
49
|
*/
|
|
50
50
|
offlineShown?: boolean;
|
|
51
51
|
server?: TaServerInfo;
|
|
52
|
+
/** Ta restarts at the user's word (restartServer), until the page is connected to the one that started again. */
|
|
53
|
+
restarting?: boolean;
|
|
52
54
|
/**
|
|
53
55
|
* The server tells the open sessions as they change (TaServer.watchSessions): the lists are read again
|
|
54
56
|
* only now and then. Not by a Ta service of before, whose lists are read again every few seconds.
|
|
@@ -128,6 +130,12 @@ export interface TaWorkbench {
|
|
|
128
130
|
* what names no directory opens. Open conversations stay in theirs.
|
|
129
131
|
*/
|
|
130
132
|
setWorkingDirectory(cwd: string): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Restarts Ta: Ta Desktop as a whole when it started the Ta service, else the Ta service (TaServer.restartServer),
|
|
135
|
+
* which then runs the build installed now (TaServerInfo.update). What runs goes on after it. `restarting` until the
|
|
136
|
+
* page is connected again, when it loads again if it was of the build before.
|
|
137
|
+
*/
|
|
138
|
+
restartServer(): Promise<void>;
|
|
131
139
|
/**
|
|
132
140
|
* A store of a session on this connection; the caller attaches and detaches it. It can be made before
|
|
133
141
|
* there is a connection, to show a conversation kept on the device (SessionStoreOptions.initial): it is
|
|
@@ -12,6 +12,12 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
12
12
|
/** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
|
|
13
13
|
readonly presence: PresenceReporter;
|
|
14
14
|
protected retryTimer?: ReturnType<typeof setTimeout>;
|
|
15
|
+
/** A restart asked for: whether a build was installed over the one running, and whether its connection closed yet. */
|
|
16
|
+
protected restart?: {
|
|
17
|
+
update: boolean;
|
|
18
|
+
closed: boolean;
|
|
19
|
+
timer: ReturnType<typeof setTimeout>;
|
|
20
|
+
};
|
|
15
21
|
/** While ta serve is not running: the next attempt, which `reconnect` makes at once. */
|
|
16
22
|
protected retry?: () => void;
|
|
17
23
|
protected attempts: number;
|
|
@@ -76,6 +82,14 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
76
82
|
messages?: boolean;
|
|
77
83
|
state?: string[];
|
|
78
84
|
}): () => void;
|
|
85
|
+
restartServer(): Promise<void>;
|
|
86
|
+
/** A restart that failed, or did not come back: no longer waited for. */
|
|
87
|
+
protected restarted(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Once the connection of a restart closed, the server read again is the Ta that started again: the restart is over,
|
|
90
|
+
* and a page of the build before loads again for the new one (the app on a phone has its own).
|
|
91
|
+
*/
|
|
92
|
+
protected followRestart(change: Partial<WorkbenchState>, next: WorkbenchState): void;
|
|
79
93
|
setWorkingDirectory(cwd: string): Promise<void>;
|
|
80
94
|
subscribe(listener: (state: WorkbenchState) => void): () => void;
|
|
81
95
|
start(): Promise<void>;
|
|
@@ -140,6 +154,8 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
140
154
|
* page was not seen gets its grace from now.
|
|
141
155
|
*/
|
|
142
156
|
protected watchWake(): void;
|
|
157
|
+
/** Whether another build of Ta was installed since (TaServerInfo.update), read while the page is seen. */
|
|
158
|
+
protected checkUpdate(): Promise<void>;
|
|
143
159
|
protected update(change: Partial<WorkbenchState>): void;
|
|
144
160
|
protected keepLists(of: string): void;
|
|
145
161
|
}
|
package/esm/browser/workbench.js
CHANGED
|
@@ -13,9 +13,14 @@ import { deviceValues, OfflineKeys } from './offline/device-values.js';
|
|
|
13
13
|
import { PresenceReporter } from './presence/presence-reporter.js';
|
|
14
14
|
import { DEFAULT_SETTINGS } from './settings/settings-protocol.js';
|
|
15
15
|
import { StateUtil } from './state/state-protocol.js';
|
|
16
|
+
import { DesktopUtil } from './util/desktop.js';
|
|
16
17
|
import { WorkbenchCalls } from './workbench-calls.js';
|
|
17
18
|
import { TaWorkbench } from './workbench-protocol.js';
|
|
18
19
|
import { GRACE_MS, PAGE_BYTES, PROBE_MS, pageHost, SWITCH_MS, storage, WorkbenchError, WorkbenchUtil, } from './workbench-util.js';
|
|
20
|
+
/** How often a page that is seen reads again which build of Ta is installed (TaServerInfo.update). */
|
|
21
|
+
const UPDATE_CHECK_MS = 60000;
|
|
22
|
+
/** A restart not back in this long is no longer waited for: the row of the connection says what is wrong. */
|
|
23
|
+
const RESTART_WAIT_MS = 120000;
|
|
19
24
|
let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
20
25
|
constructor() {
|
|
21
26
|
this.list = WorkbenchUtil.readHosts(storage());
|
|
@@ -136,6 +141,54 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
136
141
|
}
|
|
137
142
|
};
|
|
138
143
|
}
|
|
144
|
+
async restartServer() {
|
|
145
|
+
var _a;
|
|
146
|
+
if (this.restart) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const timer = setTimeout(() => this.restarted(), RESTART_WAIT_MS);
|
|
150
|
+
this.restart = { update: Boolean((_a = this.current.server) === null || _a === void 0 ? void 0 : _a.update), closed: false, timer };
|
|
151
|
+
this.update({ restarting: true });
|
|
152
|
+
try {
|
|
153
|
+
const desktop = DesktopUtil.restart();
|
|
154
|
+
if (!(desktop && (await desktop()))) {
|
|
155
|
+
await this.server.restartServer();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
this.restarted();
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/** A restart that failed, or did not come back: no longer waited for. */
|
|
164
|
+
restarted() {
|
|
165
|
+
if (this.restart) {
|
|
166
|
+
clearTimeout(this.restart.timer);
|
|
167
|
+
this.restart = undefined;
|
|
168
|
+
this.update({ restarting: false });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Once the connection of a restart closed, the server read again is the Ta that started again: the restart is over,
|
|
173
|
+
* and a page of the build before loads again for the new one (the app on a phone has its own).
|
|
174
|
+
*/
|
|
175
|
+
followRestart(change, next) {
|
|
176
|
+
const restart = this.restart;
|
|
177
|
+
if (!restart) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (next.status !== 'online') {
|
|
181
|
+
restart.closed = true;
|
|
182
|
+
}
|
|
183
|
+
else if (restart.closed && change.server) {
|
|
184
|
+
clearTimeout(restart.timer);
|
|
185
|
+
this.restart = undefined;
|
|
186
|
+
next.restarting = false;
|
|
187
|
+
if (restart.update && !WorkbenchUtil.isApp()) {
|
|
188
|
+
this.reload();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
139
192
|
async setWorkingDirectory(cwd) {
|
|
140
193
|
this.update({ server: await this.server.setWorkingDirectory(cwd) });
|
|
141
194
|
}
|
|
@@ -606,15 +659,29 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
606
659
|
}
|
|
607
660
|
else {
|
|
608
661
|
(_a = this.connection) === null || _a === void 0 ? void 0 : _a.wake();
|
|
662
|
+
void this.checkUpdate();
|
|
609
663
|
}
|
|
610
664
|
this.update({});
|
|
611
665
|
};
|
|
612
666
|
document.addEventListener('visibilitychange', wake);
|
|
613
667
|
window.addEventListener('online', wake);
|
|
614
668
|
window.addEventListener('pageshow', wake);
|
|
669
|
+
setInterval(() => void this.checkUpdate(), UPDATE_CHECK_MS);
|
|
670
|
+
}
|
|
671
|
+
/** Whether another build of Ta was installed since (TaServerInfo.update), read while the page is seen. */
|
|
672
|
+
async checkUpdate() {
|
|
673
|
+
const connection = this.connection;
|
|
674
|
+
if (!connection || this.current.status !== 'online' || this.restart || document.visibilityState === 'hidden') {
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
const server = await connection.server.getServerInfo().catch(() => undefined);
|
|
678
|
+
if (server && connection === this.connection && !this.restart) {
|
|
679
|
+
this.update({ server: WorkbenchUtil.same(this.current.server, server) });
|
|
680
|
+
}
|
|
615
681
|
}
|
|
616
682
|
update(change) {
|
|
617
683
|
const next = { ...this.current, ...change };
|
|
684
|
+
this.followRestart(change, next);
|
|
618
685
|
if (next.status !== 'offline') {
|
|
619
686
|
clearTimeout(this.graceTimer);
|
|
620
687
|
this.graceTimer = undefined;
|
|
@@ -52,6 +52,7 @@ const dismiss_1 = require("./dismiss");
|
|
|
52
52
|
const host_view_1 = require("./host-view");
|
|
53
53
|
const icon_1 = require("./icon");
|
|
54
54
|
const relay_view_1 = require("./relay-view");
|
|
55
|
+
const serve_restart_1 = require("./serve-restart");
|
|
55
56
|
const settings_controls_1 = require("./settings-controls");
|
|
56
57
|
const ta_avatar_1 = require("./ta-avatar");
|
|
57
58
|
const working_directory_1 = require("./working-directory");
|
|
@@ -76,6 +77,7 @@ function useAccountEntries(onSettings, onDialog) {
|
|
|
76
77
|
const [{ installable, standalone }, pwa] = (0, hooks_1.usePwa)();
|
|
77
78
|
// A finger has no keys to learn; a phone is not the computer that pairs phones.
|
|
78
79
|
const { touch, handheld } = (0, device_1.useDevice)();
|
|
80
|
+
const restartTa = (0, serve_restart_1.useRestartTa)();
|
|
79
81
|
const entry = (key, label, icon, run, more = {}) => ({
|
|
80
82
|
key,
|
|
81
83
|
label,
|
|
@@ -116,6 +118,11 @@ function useAccountEntries(onSettings, onDialog) {
|
|
|
116
118
|
],
|
|
117
119
|
[
|
|
118
120
|
...(installable && !standalone ? [entry('install', t('ta.pwa.install'), lucide_react_1.Download, () => void pwa.install())] : []),
|
|
121
|
+
...(restartTa.can
|
|
122
|
+
? [
|
|
123
|
+
entry('restart', restartTa.update ? t('ta.update.restartTo', { version: serve_restart_1.ServeRestartUtil.label(restartTa.update) }) : t('ta.restart'), lucide_react_1.RotateCw, () => void restartTa.restart()),
|
|
124
|
+
]
|
|
125
|
+
: []),
|
|
119
126
|
entry('about', t('ta.manage.about'), lucide_react_1.Info, () => onSettings('about')),
|
|
120
127
|
entry('signOut', t('ta.settings.signOut'), lucide_react_1.LogOut, () => workbench.signOut(), { danger: true }),
|
|
121
128
|
],
|
|
@@ -50,6 +50,7 @@ const use_t_1 = require("../i18n/use-t");
|
|
|
50
50
|
const code_renderers_1 = require("../markdown/code-renderers");
|
|
51
51
|
const notices_1 = require("../notices/notices");
|
|
52
52
|
const state_protocol_1 = require("../state/state-protocol");
|
|
53
|
+
const thumbnail_1 = require("../util/thumbnail");
|
|
53
54
|
const voice_1 = require("../util/voice");
|
|
54
55
|
const workbench_util_1 = require("../workbench-util");
|
|
55
56
|
const app_nav_1 = require("./app-nav");
|
|
@@ -81,6 +82,7 @@ const notice_center_1 = require("./notice-center");
|
|
|
81
82
|
const phone_shell_1 = require("./phone-shell");
|
|
82
83
|
const remote_prompts_1 = require("./remote-prompts");
|
|
83
84
|
const scan_screen_1 = require("./scan-screen");
|
|
85
|
+
const serve_restart_1 = require("./serve-restart");
|
|
84
86
|
const settings_view_1 = require("./settings-view");
|
|
85
87
|
const share_dialog_1 = require("./share-dialog");
|
|
86
88
|
const side_lists_1 = require("./side-lists");
|
|
@@ -154,7 +156,7 @@ function AppShell() {
|
|
|
154
156
|
const online = workbench.status === 'online';
|
|
155
157
|
// Files named in replies outside a conversation (channels, pages) are in the server's directory.
|
|
156
158
|
const files = (0, react_1.useInject)(files_protocol_1.TaFiles);
|
|
157
|
-
const fileUrl = React.useCallback(async (path) => files.loadable(await bench.workspace.fileUrl(path)), [bench, files]);
|
|
159
|
+
const fileUrl = React.useCallback(async (path, box) => files.loadable(thumbnail_1.ThumbnailUtil.boxed(await bench.workspace.fileUrl(path), box)), [bench, files]);
|
|
158
160
|
const openLink = (0, hooks_1.useOpenLink)(undefined);
|
|
159
161
|
(0, workbench_view_1.useDocument)();
|
|
160
162
|
(0, app_shell_hooks_1.useRefresh)(online);
|
|
@@ -464,6 +466,7 @@ function AppShell() {
|
|
|
464
466
|
React.createElement(notice_center_1.NoticeCenter, null),
|
|
465
467
|
React.createElement(link_dialog_1.LinkDialog, null),
|
|
466
468
|
React.createElement(remote_prompts_1.RemotePrompts, null),
|
|
469
|
+
React.createElement(serve_restart_1.ServeRestartNotices, null),
|
|
467
470
|
React.createElement(host_view_1.SwitchingVeil, null),
|
|
468
471
|
codeScan && React.createElement(scan_screen_1.ScanHost, { onCode: text => void codeScan.open(text), onAsk: askDouble }),
|
|
469
472
|
React.createElement(share_dialog_1.ShareHost, null),
|
|
@@ -62,10 +62,15 @@ function Face(props) {
|
|
|
62
62
|
const species = dino_species_1.DinoSpecies.IDS.find(id => id === props.look);
|
|
63
63
|
return species ? React.createElement(DoubleFace, { species: species, size: props.size, online: props.online }) : React.createElement(ShapeFace, { ...props });
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* How wide the disc of a double is in its box: as wide as the shapes, which leave a margin in their 40 × 40 grid (the
|
|
67
|
+
* round one is 29 wide), so that a double among them in a row is no bigger than they are.
|
|
68
|
+
*/
|
|
69
|
+
const DOUBLE_DISC = 0.75;
|
|
65
70
|
/** A Ta as its double: the close-up of the dinosaur, as the account shows it; this Ta's own without `species`. */
|
|
66
71
|
function DoubleFace({ species, size, online }) {
|
|
67
|
-
return (React.createElement("span", { className: "ta-face", style: { width: size, height: size }, "aria-hidden": "true" },
|
|
68
|
-
React.createElement(ta_avatar_1.DinoFace, { species: species, size: size }),
|
|
72
|
+
return (React.createElement("span", { className: "ta-face ta-face-double", style: { width: size, height: size }, "aria-hidden": "true" },
|
|
73
|
+
React.createElement(ta_avatar_1.DinoFace, { species: species, size: Math.round(size * DOUBLE_DISC) }),
|
|
69
74
|
online !== undefined && React.createElement("i", { className: `ta-face-dot${online ? ' ta-face-on' : ''}` })));
|
|
70
75
|
}
|
|
71
76
|
function ShapeFace({ face: given, seed = '', size, working, online }) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MarkdownPicture } from '../util/markdown';
|
|
3
|
+
/**
|
|
4
|
+
* Pictures of a reply shown together (GalleryUtil): square tiles in columns as many as suit their number, the words
|
|
5
|
+
* that name each under it, and a click on one opens it over the page, where ← → and its side buttons go through all.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Gallery({ items }: {
|
|
8
|
+
items: readonly MarkdownPicture[];
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=gallery.d.ts.map
|