@floless/app 0.167.0 → 0.168.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autostart.mjs +169 -63
- package/desktop-shell.mjs +335 -0
- package/dist/floless-server.cjs +14518 -11361
- package/dist/schemas/steel.model.v2.schema.json +2 -1
- package/dist/skills/floless-app-onboarding/SKILL.md +13 -4
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +3 -0
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +21 -2
- package/dist/skills/floless-app-ui/SKILL.md +2 -2
- package/dist/skills/floless-app-workflows/SKILL.md +2 -2
- package/dist/web/agents.js +1 -1
- package/dist/web/app.css +165 -8
- package/dist/web/app.js +53 -13
- package/dist/web/aware-update-client.js +13 -5
- package/dist/web/aware.js +183 -39
- package/dist/web/chat.css +2 -1
- package/dist/web/chat.js +410 -80
- package/dist/web/commands-filter.js +5 -5
- package/dist/web/commands-shell.js +172 -10
- package/dist/web/commands-steel.js +1 -1
- package/dist/web/desktop-window.js +435 -0
- package/dist/web/drawing-check-editor.js +18 -10
- package/dist/web/failure-copy.js +14 -1
- package/dist/web/guide.js +75 -9
- package/dist/web/index.html +64 -6
- package/dist/web/instructor.js +1 -1
- package/dist/web/leave-guard.js +347 -14
- package/dist/web/pages.js +5 -1
- package/dist/web/panels.js +5 -2
- package/dist/web/pdf-view.js +421 -0
- package/dist/web/project-history.js +2 -1
- package/dist/web/project-modules.js +3 -1
- package/dist/web/project-rfis.js +3 -1
- package/dist/web/project-workflows.js +4 -2
- package/dist/web/reference-geometry-worker.js +11 -2
- package/dist/web/revit-editor.html +1 -0
- package/dist/web/revit-editor.js +37 -8
- package/dist/web/shared-prefs.js +364 -0
- package/dist/web/steel-editor.html +204 -43
- package/dist/web/steel-filter-flo.js +74 -18
- package/dist/web/steel-filter.html +22 -6
- package/dist/web/tab-signal.js +36 -1
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/tool-updates.js +159 -38
- package/dist/web/vector-3d.html +14 -3
- package/dist/web/vector-editor.html +10 -2
- package/dist/web/vendor/README.md +23 -0
- package/dist/web/vendor/pdfjs/LICENSE +177 -0
- package/dist/web/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/LICENSE +36 -0
- package/dist/web/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/web/vendor/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/dist/web/vendor/pdfjs/iccs/LICENSE +116 -0
- package/dist/web/vendor/pdfjs/pdf.min.mjs +28 -0
- package/dist/web/vendor/pdfjs/pdf.worker.mjs +64908 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/web/vendor/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/web/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
- package/dist/web/vendor/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/web/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/dist/web/vendor/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/dist/web/workspaces.js +167 -26
- package/home-env.mjs +28 -0
- package/install-path.mjs +59 -3
- package/launch-starting-page.mjs +35 -15
- package/launch.mjs +358 -51
- package/package.json +2 -1
- package/pin-home.mjs +6 -0
- package/post-update-marker.mjs +14 -0
- package/preferences-file.mjs +289 -0
- package/supervisor-lock.mjs +195 -0
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
* The shell (`filterFloState` in workspaces.js) decides, from the read's own signals, whether Flo is reading,
|
|
5
5
|
* waiting on the person, or off, and passes the sheet pictures the read last asked for. This module only shows
|
|
6
6
|
* that state on the stage. It never decides that work is happening and never invents what is seen: the box is
|
|
7
|
-
* the picture the AI was given, and the bubble's words
|
|
7
|
+
* the picture the AI was given, and the bubble's words say only what FloLess holds (#3093): which sheet and part it
|
|
8
|
+
* handed over, how long ago, and how many sheets. The progress strip above already says what the AI reports it is
|
|
9
|
+
* doing, so the bubble never repeats that.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
export const FLO_PART_NAMES = ['', 'top-left', 'top-middle', 'top-right', 'middle-left', 'middle', 'middle-right',
|
|
11
13
|
'bottom-left', 'bottom-middle', 'bottom-right'];
|
|
12
|
-
/** A look older than this
|
|
14
|
+
/** A look older than this is no longer what the AI is looking at now: its box turns into a dimmer outline and Flo thinks. */
|
|
13
15
|
export const FLO_FRESH_LOOK_MS = 45_000;
|
|
16
|
+
/** How often "3 min ago" is brought up to date while Flo shows an older picture. */
|
|
17
|
+
export const FLO_AGE_TICK_MS = 30_000;
|
|
18
|
+
/** The tiles an enlarged sheet is cut into: only this many at once is drawn as the tile grid. */
|
|
19
|
+
export const FLO_TILE_COUNT = 9;
|
|
14
20
|
/** Several looks between two polls: Flo visits at most the newest FLO_CATCH_UP, FLO_VISIT_MS each. */
|
|
15
21
|
export const FLO_CATCH_UP = 3;
|
|
16
22
|
export const FLO_VISIT_MS = 2500;
|
|
@@ -40,11 +46,46 @@ export function floLookBox(sheet, look, bgRect) {
|
|
|
40
46
|
return { x: x0 * w, y: y0 * h, w: (x1 - x0) * w, h: (y1 - y0) * h };
|
|
41
47
|
}
|
|
42
48
|
|
|
43
|
-
/**
|
|
44
|
-
|
|
49
|
+
/** What part of a sheet a look was, in words: "the top-right part of S-203, enlarged", "all 9 enlarged parts of S-201". */
|
|
50
|
+
function floWhat(look, sheet) {
|
|
45
51
|
// The set may be several files, so the page number is of its own file.
|
|
46
|
-
if (!sheet) return `
|
|
47
|
-
|
|
52
|
+
if (!sheet) return `a page the Filter does not show (page ${look.pageNumber} of its file)`;
|
|
53
|
+
if (look.part) return `the ${FLO_PART_NAMES[look.part]} part of ${sheet}, enlarged`;
|
|
54
|
+
if (look.tiles > 1) return `all ${look.tiles} enlarged parts of ${sheet}`;
|
|
55
|
+
if (look.tiles === 1) return `${sheet}, enlarged`;
|
|
56
|
+
return `the whole of ${sheet}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Where Flo is looking, in words. `sheet` is the Filter sheet's name, or null when the Filter has none for it.
|
|
61
|
+
* `stale`: the picture is older than FLO_FRESH_LOOK_MS, so it is named as the last one, not as what is read now.
|
|
62
|
+
*/
|
|
63
|
+
export function floWhere(look, sheet, stale = false) {
|
|
64
|
+
const what = floWhat(look, sheet);
|
|
65
|
+
return stale ? `Last picture: ${what}` : `Looking at ${what}`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** How long ago, in words a person reads at a glance. Only ever said of a picture older than FLO_FRESH_LOOK_MS. */
|
|
69
|
+
export function floAgo(ms) {
|
|
70
|
+
const min = Math.floor(ms / 60_000);
|
|
71
|
+
return min < 1 ? 'under a minute ago' : min === 1 ? '1 min ago' : min < 60 ? `${min} min ago` : 'over an hour ago';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* How many of the Filter's sheets the read has been handed a picture of, in words, or '' when there is nothing honest to
|
|
76
|
+
* say. Only sheets that match ONE Filter sheet count. `seen` is the shell's `{ sheets, whole }`: not whole, the list
|
|
77
|
+
* may miss some (FloLess restarted, or forgot looks to make room), so it says "at least" and gives no total.
|
|
78
|
+
*/
|
|
79
|
+
export function floCount(sheets, seen) {
|
|
80
|
+
if (!seen || !Array.isArray(seen.sheets) || !sheets?.length) return '';
|
|
81
|
+
const found = new Set();
|
|
82
|
+
for (const s of seen.sheets) {
|
|
83
|
+
const i = floSheetIndex(sheets, { sourceHash: String(s?.sourceHash || '').toLowerCase(), pageNumber: s?.pageNumber });
|
|
84
|
+
if (i >= 0) found.add(i);
|
|
85
|
+
}
|
|
86
|
+
const n = found.size;
|
|
87
|
+
if (!seen.whole) return n ? `At least ${n} ${n === 1 ? 'sheet' : 'sheets'} looked at` : '';
|
|
88
|
+
return `${n} of ${sheets.length} ${sheets.length === 1 ? 'sheet' : 'sheets'} looked at so far`;
|
|
48
89
|
}
|
|
49
90
|
|
|
50
91
|
/**
|
|
@@ -172,12 +213,19 @@ export function mountFilterFlo(d) {
|
|
|
172
213
|
if (state.mode === 'reading') {
|
|
173
214
|
const t = d.now(), looks = Array.isArray(state.looks) ? state.looks : [];
|
|
174
215
|
const newest = looks.reduce((m, l) => Math.max(m, l.seq), 0);
|
|
175
|
-
|
|
216
|
+
const restarted = looks.length > 0 && newest < lastSeq;
|
|
217
|
+
if (restarted) lastSeq = 0; // the server restarted and numbers looks from 1 again
|
|
176
218
|
const fresh = looks.filter((l) => l.seq > lastSeq && l.ageMs < FLO_FRESH_LOOK_MS).map((l) => ({ ...l, at: t - l.ageMs }));
|
|
177
219
|
lastSeq = Math.max(lastSeq, newest);
|
|
178
220
|
if (fresh.length) {
|
|
179
221
|
queue = fresh.slice(-FLO_CATCH_UP);
|
|
180
222
|
if (!tour) { step(); return; }
|
|
223
|
+
} else if (looks.length && !tour) {
|
|
224
|
+
// No fresh picture to visit: Flo shows the read's newest as the last picture (#3093). That covers a Filter
|
|
225
|
+
// opened after it, and polls paused past FLO_FRESH_LOOK_MS (a background tab) that bring a newer one already
|
|
226
|
+
// old, which must replace the picture held rather than leave the older one named as the last.
|
|
227
|
+
const l = looks.reduce((a, b) => (b.seq > a.seq ? b : a));
|
|
228
|
+
if (!cur || restarted || l.seq > cur.seq) cur = { ...l, at: t - l.ageMs };
|
|
181
229
|
}
|
|
182
230
|
}
|
|
183
231
|
render();
|
|
@@ -203,7 +251,8 @@ export function mountFilterFlo(d) {
|
|
|
203
251
|
reveal();
|
|
204
252
|
clearTimeout(freshTimer);
|
|
205
253
|
const t = d.now();
|
|
206
|
-
const look = mode === 'reading' && cur
|
|
254
|
+
const look = mode === 'reading' && cur ? cur : null;
|
|
255
|
+
const stale = !!look && t - look.at >= FLO_FRESH_LOOK_MS;
|
|
207
256
|
const at = look ? floSheetIndex(d.sheets(), look) : -1;
|
|
208
257
|
d.bubble.classList.toggle('waiting', waiting);
|
|
209
258
|
if (waiting) {
|
|
@@ -211,9 +260,12 @@ export function mountFilterFlo(d) {
|
|
|
211
260
|
d.sentence.textContent = state.text;
|
|
212
261
|
d.where.textContent = state.chat ? '' : 'Answer it in the terminal where the read is running.';
|
|
213
262
|
} else {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
d.
|
|
263
|
+
// Where it is, from the picture FloLess handed over; with none, only what is known for certain (#3093).
|
|
264
|
+
const seen = state.seen || null;
|
|
265
|
+
d.head.textContent = look ? floWhere(look, sheetName(at), stale)
|
|
266
|
+
: seen?.whole && !seen.sheets?.length ? 'No drawing picture asked for yet' : 'Working on the read';
|
|
267
|
+
d.sentence.textContent = state.note || '';
|
|
268
|
+
d.where.textContent = [stale ? floAgo(t - look.at) : '', floCount(d.sheets(), seen)].filter(Boolean).join(' · ');
|
|
217
269
|
}
|
|
218
270
|
show(d.where, !!d.where.textContent);
|
|
219
271
|
const away = !!look && at >= 0 && at !== d.active();
|
|
@@ -221,11 +273,12 @@ export function mountFilterFlo(d) {
|
|
|
221
273
|
show(d.showBtn, away);
|
|
222
274
|
show(d.answerBtn, waiting && !!state.chat);
|
|
223
275
|
if (waiting) { d.avatar?.setMood('yourcall', true); d.avatar?.rest(); }
|
|
224
|
-
else d.avatar?.setMood(look ? 'working' : 'thinking', true);
|
|
276
|
+
else d.avatar?.setMood(look && !stale ? 'working' : 'thinking', true);
|
|
225
277
|
const springing = popping === 'in';
|
|
226
278
|
place(instant || springing, look, at);
|
|
227
279
|
if (springing) { popping = ''; pop('in', last); }
|
|
228
|
-
|
|
280
|
+
// Fresh: once more when it turns into the last picture. Older: every tick, so "N min ago" stays true.
|
|
281
|
+
if (look) freshTimer = setTimeout(() => render(), stale ? FLO_AGE_TICK_MS : Math.max(0, look.at + FLO_FRESH_LOOK_MS - t) + 50);
|
|
229
282
|
}
|
|
230
283
|
|
|
231
284
|
/** Puts Flo, its bubble and the box where the state says, in stage px. `instant` while the view moves. */
|
|
@@ -234,10 +287,10 @@ export function mountFilterFlo(d) {
|
|
|
234
287
|
const W = d.stage.clientWidth, H = d.stage.clientHeight;
|
|
235
288
|
if (!W || !H) return;
|
|
236
289
|
if (look === undefined) {
|
|
237
|
-
|
|
238
|
-
look = state.mode === 'reading' && cur && t - cur.at < FLO_FRESH_LOOK_MS ? cur : null;
|
|
290
|
+
look = state.mode === 'reading' && cur ? cur : null;
|
|
239
291
|
at = look ? floSheetIndex(d.sheets(), look) : -1;
|
|
240
292
|
}
|
|
293
|
+
const stale = !!look && d.now() - look.at >= FLO_FRESH_LOOK_MS;
|
|
241
294
|
if (instant) {
|
|
242
295
|
// Glides come back two frames after the LAST move: one pending at a time, or a pan's earlier frame turns them
|
|
243
296
|
// on under its later ones and Flo trails the drawing.
|
|
@@ -258,7 +311,7 @@ export function mountFilterFlo(d) {
|
|
|
258
311
|
if (box.R - box.L < 8 || box.B - box.T < 8) box = null; // that part is out of view: no box to draw
|
|
259
312
|
p = floPerch(box || { L: Math.min(Math.max(a.x, 38), W), T: Math.max(a.y, clear.top), B: Math.max(a.y, clear.top) },
|
|
260
313
|
{ W, H }, pilot, clear);
|
|
261
|
-
} else if (look) {
|
|
314
|
+
} else if (look && !stale) {
|
|
262
315
|
// Reading a sheet that is not on screen, or a page the Filter has no single sheet for: wait at the top, with a
|
|
263
316
|
// Show button when the Filter has that sheet. The view never moves by itself.
|
|
264
317
|
p = { x: Math.max(8, (W - pilot.pw) / 2), y: clear.top, left: false };
|
|
@@ -278,6 +331,9 @@ export function mountFilterFlo(d) {
|
|
|
278
331
|
d.pilot.classList.toggle('left', p.left);
|
|
279
332
|
d.pilot.style.transform = `translate(${Math.round(p.x)}px, ${Math.round(p.y)}px)`;
|
|
280
333
|
d.scan.classList.toggle('hide', !box);
|
|
334
|
+
// An older picture is a dimmer outline; all the tiles at once show the tile grid, never one region (#3093).
|
|
335
|
+
d.scan.classList.toggle('stale', !!box && stale);
|
|
336
|
+
d.scan.classList.toggle('all', !!box && look.tiles === FLO_TILE_COUNT);
|
|
281
337
|
if (box) {
|
|
282
338
|
Object.assign(d.scan.style, { left: `${box.L}px`, top: `${box.T}px`, width: `${box.R - box.L}px`, height: `${box.B - box.T}px` });
|
|
283
339
|
const fx = p.left ? p.x + pilot.pw - pilot.fw / 2 : p.x + pilot.fw / 2, fy = p.y + 30;
|
|
@@ -301,8 +357,8 @@ export function mountFilterFlo(d) {
|
|
|
301
357
|
// The name stays "Show Flo" and aria-pressed carries the state; only the tip says what a press does now.
|
|
302
358
|
d.toggle.setAttribute('aria-label', 'Show Flo');
|
|
303
359
|
d.toggle.dataset.tip = on
|
|
304
|
-
? 'Hide Flo. While a drawing read runs, Flo shows which part of the drawing the AI
|
|
305
|
-
: 'Show Flo, which shows which part of the drawing the AI
|
|
360
|
+
? 'Hide Flo. While a drawing read runs, Flo shows which part of the drawing the AI was last given and says when it is waiting for your answer. Drag Flo to move it.'
|
|
361
|
+
: 'Show Flo, which shows which part of the drawing the AI was last given and says when it is waiting for your answer';
|
|
306
362
|
}
|
|
307
363
|
|
|
308
364
|
/** Keeps Flo where the person moved it (stage px of its top-left), or with null lets it follow the reading again. */
|
|
@@ -657,7 +657,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
657
657
|
#floFx{position:absolute;inset:0;pointer-events:none;overflow:hidden;transition:opacity .3s ease;--flo-glide:cubic-bezier(.22,1,.36,1)}
|
|
658
658
|
#floFx[hidden]{display:none}
|
|
659
659
|
#floFx.leaving{opacity:0}
|
|
660
|
-
#floScan{position:absolute;left:0;top:0;width:0;height:0;border-radius:6px;overflow:hidden;background:color-mix(in srgb,var(--brand) 6%,transparent);transition:left .95s var(--flo-glide),top .95s var(--flo-glide),width .95s var(--flo-glide),height .95s var(--flo-glide),opacity .4s ease}
|
|
660
|
+
#floScan{position:absolute;left:0;top:0;width:0;height:0;border-radius:6px;overflow:hidden;background:color-mix(in srgb,var(--brand) 6%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 45%,transparent);transition:left .95s var(--flo-glide),top .95s var(--flo-glide),width .95s var(--flo-glide),height .95s var(--flo-glide),opacity .4s ease}
|
|
661
661
|
#floScan.hide{opacity:0}
|
|
662
662
|
#floScan i{position:absolute;width:16px;height:16px;border:2px solid var(--brand)}
|
|
663
663
|
#floScan i:nth-of-type(1){left:0;top:0;border-right:0;border-bottom:0;border-top-left-radius:6px}
|
|
@@ -667,6 +667,12 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
667
667
|
/* A slow light down the box, then a rest: it sits over linework people read for half an hour. */
|
|
668
668
|
#floScan span{position:absolute;inset:0;transform:translateY(-100%);background:linear-gradient(to bottom,transparent calc(100% - 46px),color-mix(in srgb,var(--brand) 25%,transparent));animation:flo-sweep 7s linear infinite}
|
|
669
669
|
#floScan.hide span{animation:none}
|
|
670
|
+
/* #3093: all nine tiles at once. The sheet is framed with its thirds drawn faintly, so it never reads as one region. */
|
|
671
|
+
#floScan.all{--flo-grid:color-mix(in srgb,var(--brand) 22%,transparent);background-color:color-mix(in srgb,var(--brand) 6%,transparent);background-image:linear-gradient(90deg,var(--flo-grid) 1px,transparent 1px),linear-gradient(var(--flo-grid) 1px,transparent 1px);background-size:calc(100% / 3) calc(100% / 3)}
|
|
672
|
+
/* An older picture: the last one handed over, not what is read now. Dashed against solid says so without colour. */
|
|
673
|
+
#floScan.stale{background:none;border:2px dashed color-mix(in srgb,var(--brand) 70%,transparent);box-shadow:none;opacity:.9}
|
|
674
|
+
#floScan.stale.hide{opacity:0}
|
|
675
|
+
#floScan.stale i,#floScan.stale span{display:none}
|
|
670
676
|
@keyframes flo-sweep{36%{transform:translateY(0)}36.1%,100%{transform:translateY(-100%)}}
|
|
671
677
|
#floPilot{position:absolute;left:0;top:0;display:flex;align-items:flex-start;gap:4px;transition:transform 1.1s var(--flo-glide)}
|
|
672
678
|
#floPilot.left{flex-direction:row-reverse}
|
|
@@ -895,7 +901,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
895
901
|
</div>
|
|
896
902
|
<!-- #2926: Flo, showing which part of the drawing the AI is reading. Below the stage's bars in the stacking
|
|
897
903
|
order, so it never covers them. The bubble is NOT a live region (it changes every few seconds and the
|
|
898
|
-
progress strip already says
|
|
904
|
+
progress strip already says what the AI reports doing); #floLive says "Waiting for your answer" once, on the way in. -->
|
|
899
905
|
<div id="floFx" hidden>
|
|
900
906
|
<div id="floScan" class="hide" aria-hidden="true"><span></span><i></i><i></i><i></i><i></i></div>
|
|
901
907
|
<div id="floPilot">
|
|
@@ -905,7 +911,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
905
911
|
<button id="floMin" type="button" aria-label="Minimize Flo" data-command-id="filter.flo-minimize" data-tip="Minimize Flo. Bring it back with Show Flo."><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8"/></svg></button>
|
|
906
912
|
<p><b id="floHead"></b> <span id="floNow"></span></p>
|
|
907
913
|
<span id="floWhere" hidden></span>
|
|
908
|
-
<button id="floShow" type="button" data-command-id="filter.flo-show-sheet" data-tip="Show the sheet the AI
|
|
914
|
+
<button id="floShow" type="button" data-command-id="filter.flo-show-sheet" data-tip="Show the sheet the AI was last shown" hidden></button>
|
|
909
915
|
<button id="floAnswer" type="button" data-command-id="filter.flo-answer" data-tip="Open the question in AI Chat" hidden>Answer in AI Chat</button>
|
|
910
916
|
</div>
|
|
911
917
|
</div>
|
|
@@ -985,6 +991,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
985
991
|
The reporter tells the shell which surface is on screen (so the `?` sheet can put this
|
|
986
992
|
screen's commands first) and forwards `?`/F1 up, because a keydown inside an iframe never
|
|
987
993
|
reaches the shell's own handler. This surface arms nothing, so its snapshot is just its identity — see commands-filter.js. -->
|
|
994
|
+
<script src="failure-copy.js"></script>
|
|
988
995
|
<script src="filter-guidance.js"></script>
|
|
989
996
|
<!-- #2926: Flo's one drawing module and its mount, as index.html loads them (flo.js first: flo-avatar.js calls it). -->
|
|
990
997
|
<script src="flo.js"></script>
|
|
@@ -2037,7 +2044,7 @@ async function bootOnce(){
|
|
|
2037
2044
|
const note = takeUpdateNote();
|
|
2038
2045
|
let res;
|
|
2039
2046
|
try { res = await fetch('/api/contract/' + encodeURIComponent(APP_ID) + CONTRACT_QS); }
|
|
2040
|
-
catch(e){
|
|
2047
|
+
catch(e){ showLoadFailure(e); return; }
|
|
2041
2048
|
// A project read asks for 204 when no contract is stored yet. An app-keyed 404 can mean that too, or
|
|
2042
2049
|
// it can be the explicit publication-ownership refusal shared with the editor and export routes.
|
|
2043
2050
|
if(res.status === 204){ showEmpty(); return; }
|
|
@@ -2053,8 +2060,9 @@ async function bootOnce(){
|
|
|
2053
2060
|
// awaiting its first bake — leaving the user, and anyone reading their console, nothing to go on.
|
|
2054
2061
|
if(!res.ok){
|
|
2055
2062
|
console.error('steel-filter: contract read failed (' + res.status + ')');
|
|
2056
|
-
|
|
2057
|
-
|
|
2063
|
+
// #3097: the person reads what could not be done, why in FloLess words (the server's own sentence when it wrote
|
|
2064
|
+
// one, such as Steel Model access it could not confirm), and what to do: never the status number.
|
|
2065
|
+
showLoadFailure({ status: res.status, body: await res.json().catch(() => null) });
|
|
2058
2066
|
return;
|
|
2059
2067
|
}
|
|
2060
2068
|
C = await res.json();
|
|
@@ -2125,6 +2133,13 @@ function publicationEmptyState(code){
|
|
|
2125
2133
|
return null;
|
|
2126
2134
|
}
|
|
2127
2135
|
|
|
2136
|
+
/** A failed read of this drawing's filter: the shared failure sentence, headline and detail. The empty panel goes too,
|
|
2137
|
+
* as for a publication refusal: there is nothing to filter, and its "prepares this filter" hint would mislead. */
|
|
2138
|
+
function showLoadFailure(error){
|
|
2139
|
+
const parts = failureParts(error, { action: 'load this drawing’s filter data', retrySafe: true });
|
|
2140
|
+
showEmpty(parts.headline, true, parts.detail);
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2128
2143
|
function showEmpty(msg, publicationBlocked = false, detail = ''){
|
|
2129
2144
|
notifyFilterAi();
|
|
2130
2145
|
FilterFocus.fail(msg ? `The Drawing Filter cannot show this place: ${msg} The picture in AI Chat still shows it.`
|
|
@@ -4954,6 +4969,7 @@ boot();
|
|
|
4954
4969
|
head: $('floHead').textContent, now: $('floNow').textContent, where: $('floWhere').hidden ? '' : $('floWhere').textContent,
|
|
4955
4970
|
show: $('floShow').hidden ? '' : $('floShow').textContent, answer: !$('floAnswer').hidden,
|
|
4956
4971
|
box: $('floScan').classList.contains('hide') ? null : ['left', 'top', 'width', 'height'].map((k) => parseFloat($('floScan').style[k])),
|
|
4972
|
+
stale: $('floScan').classList.contains('stale'), all: $('floScan').classList.contains('all'),
|
|
4957
4973
|
pilot: $('floPilot').style.transform, live: $('floLive').textContent, pinned: filterFlo.isPinned(),
|
|
4958
4974
|
});
|
|
4959
4975
|
if(typeof ResizeObserver === 'function') new ResizeObserver(() => filterFlo.place(true)).observe(stage);
|
package/dist/web/tab-signal.js
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
//
|
|
9
9
|
// It never decides anything: aware.js tells it when a run begins, how it progresses and how it ended,
|
|
10
10
|
// and it owns no title of its own — aware.js stays the one writer of document.title and asks prefix().
|
|
11
|
+
// Inside the FloLess window (the shell's bridge, apiVersion 2 or newer) the same signal goes where a window shows it: the run's
|
|
12
|
+
// fraction drives the taskbar progress, an ending that happened while the person was away puts a dot on the taskbar icon until
|
|
13
|
+
// they are back, and the favicon is not painted (a window has no tab strip). The title prefix and the notice logic are the same.
|
|
11
14
|
// A plain script (no import/export); its one global is `flolessTabSignal`.
|
|
12
15
|
|
|
13
16
|
(function () {
|
|
@@ -41,6 +44,34 @@
|
|
|
41
44
|
let offerPending = false; // a run ended while away and permission is undecided: offer when they are back
|
|
42
45
|
let prefMemory = null; // the ≡ menu choice when the browser will not store it: it still holds for this page
|
|
43
46
|
|
|
47
|
+
/** The FloLess window's bridge, or null in a browser tab (no bridge, or one older than apiVersion 2). */
|
|
48
|
+
const shell = () => {
|
|
49
|
+
const b = window.flolessDesktop;
|
|
50
|
+
return b && typeof b.apiVersion === 'number' && b.apiVersion >= 2 ? b : null;
|
|
51
|
+
};
|
|
52
|
+
let shownProgress; // what the taskbar was last told: a fraction, or null; undefined until the first tell
|
|
53
|
+
let shownBadge; // 0 or 1, likewise
|
|
54
|
+
|
|
55
|
+
/** Tell the shell where the run stands. Only changes are sent; an indeterminate run leaves the bar cleared. */
|
|
56
|
+
function syncShell() {
|
|
57
|
+
const b = shell();
|
|
58
|
+
if (!b) return;
|
|
59
|
+
const fraction = run && run.fraction != null ? run.fraction : null;
|
|
60
|
+
const badge = ended && ended.whileAway && away() ? 1 : 0;
|
|
61
|
+
try {
|
|
62
|
+
if (typeof b.setProgress === 'function' && fraction !== shownProgress) {
|
|
63
|
+
shownProgress = fraction;
|
|
64
|
+
const r = b.setProgress(fraction);
|
|
65
|
+
if (r && typeof r.catch === 'function') r.catch(() => {});
|
|
66
|
+
}
|
|
67
|
+
if (typeof b.setBadge === 'function' && badge !== shownBadge) {
|
|
68
|
+
shownBadge = badge;
|
|
69
|
+
const r = b.setBadge(badge);
|
|
70
|
+
if (r && typeof r.catch === 'function') r.catch(() => {});
|
|
71
|
+
}
|
|
72
|
+
} catch { /* the taskbar is a courtesy; it must never break a run */ }
|
|
73
|
+
}
|
|
74
|
+
|
|
44
75
|
const reducedMotion = () => !!(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
45
76
|
const hidden = () => document.visibilityState === 'hidden';
|
|
46
77
|
// Visible but not focused (FloLess on a second monitor beside Tekla) counts as away too.
|
|
@@ -74,7 +105,7 @@
|
|
|
74
105
|
}
|
|
75
106
|
|
|
76
107
|
function loadBaseIcon() {
|
|
77
|
-
if (baseIcon || typeof Image !== 'function') return;
|
|
108
|
+
if (baseIcon || typeof Image !== 'function' || shell()) return;
|
|
78
109
|
const svg = links().find(({ href }) => /\.svg(\?|$)/.test(href || '')) || links()[0];
|
|
79
110
|
if (!svg) return;
|
|
80
111
|
const img = new Image();
|
|
@@ -88,6 +119,7 @@
|
|
|
88
119
|
}
|
|
89
120
|
|
|
90
121
|
function paint() {
|
|
122
|
+
if (shell()) return; // a window has no tab strip: the taskbar carries the signal instead (syncShell)
|
|
91
123
|
if (!run && !ended) { restoreIcon(); return; }
|
|
92
124
|
const canvas = document.createElement('canvas');
|
|
93
125
|
const g = canvas.getContext && canvas.getContext('2d');
|
|
@@ -134,6 +166,7 @@
|
|
|
134
166
|
// ── lifecycle ────────────────────────────────────────────────────────────────────────────────────
|
|
135
167
|
function changed() {
|
|
136
168
|
paint();
|
|
169
|
+
syncShell();
|
|
137
170
|
const next = prefix();
|
|
138
171
|
if (next === shownPrefix) return; // the spinner repaints the icon; the title moves only when its words do
|
|
139
172
|
shownPrefix = next;
|
|
@@ -295,6 +328,7 @@
|
|
|
295
328
|
function back() {
|
|
296
329
|
if (run) startTicking();
|
|
297
330
|
if (away()) return;
|
|
331
|
+
syncShell(); // they are back: the taskbar dot goes
|
|
298
332
|
syncMenu(); // they may have changed the browser's permission in the meantime
|
|
299
333
|
if (ended && ended.whileAway && !ended.clearTimer) ended.clearTimer = setTimeout(clearEnd, CLEAR_BACK_MS);
|
|
300
334
|
if (offerPending) offer();
|
|
@@ -302,6 +336,7 @@
|
|
|
302
336
|
function acted() { if (ended && !ended.whileAway && !ended.clearTimer && !away()) clearEnd(); }
|
|
303
337
|
// Gone again before it cleared: the ending is held until they are back for good.
|
|
304
338
|
function left() {
|
|
339
|
+
syncShell();
|
|
305
340
|
if (!ended || !away() || !ended.clearTimer) return;
|
|
306
341
|
clearTimeout(ended.clearTimer);
|
|
307
342
|
ended.clearTimer = null;
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
<button id="inspectorToggle" class="model-inspector-toggle" type="button" data-command-id="tekla-parser.inspector-toggle" data-tip="Collapse Properties" aria-label="Collapse Properties" aria-controls="inspectorPanel" aria-expanded="true"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5"/></svg></button>
|
|
62
62
|
</main>
|
|
63
63
|
<div id="toast" role="status" aria-live="polite"></div>
|
|
64
|
+
<script src="failure-copy.js"></script>
|
|
64
65
|
<script src="commands.js"></script>
|
|
65
66
|
<script src="commands-tekla-parser.js"></script>
|
|
66
67
|
<script src="instructor-reporter.js"></script>
|