@floless/app 0.166.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 +20570 -14555
- package/dist/schemas/drawing-check.profile.v1.schema.json +1 -1
- package/dist/schemas/steel.model.v2.schema.json +4 -2
- 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 +34 -3
- package/dist/skills/floless-app-ui/SKILL.md +2 -2
- package/dist/skills/floless-app-workflows/SKILL.md +2 -2
- package/dist/templates/college-phase-exporter.flo +11 -45
- package/dist/web/agents.js +1 -1
- package/dist/web/app.css +223 -8
- package/dist/web/app.js +53 -13
- package/dist/web/aware-update-client.js +13 -5
- package/dist/web/aware.js +559 -118
- package/dist/web/chat.css +23 -0
- package/dist/web/chat.js +1003 -83
- package/dist/web/commands-filter.js +28 -5
- package/dist/web/commands-shell.js +304 -18
- 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 +72 -12
- 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 +133 -11
- 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-ai-marks.js +45 -1
- package/dist/web/steel-editor.html +265 -58
- package/dist/web/steel-filter-flo.js +243 -23
- package/dist/web/steel-filter.html +58 -16
- package/dist/web/tab-signal.js +36 -1
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/terminal-requests.js +5 -0
- package/dist/web/tool-updates.js +220 -54
- 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 +527 -64
- 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,17 +4,29 @@
|
|
|
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;
|
|
17
23
|
export const FLO_STORAGE_KEY = 'floless:filter-flo';
|
|
24
|
+
/** How far the pointer must move on Flo before a press becomes a drag, so a click stays a click. */
|
|
25
|
+
export const FLO_DRAG_THRESHOLD = 4;
|
|
26
|
+
/** Flo springs out of Show Flo and tucks back into it; the way back is the shorter. */
|
|
27
|
+
export const FLO_POP_IN_MS = 320;
|
|
28
|
+
export const FLO_POP_OUT_MS = 240;
|
|
29
|
+
const FLO_STEP = 16;
|
|
18
30
|
|
|
19
31
|
/** The Filter sheet a look is of: the ONE sheet with its source and page number, else -1 (none, or two). */
|
|
20
32
|
export function floSheetIndex(sheets, look) {
|
|
@@ -34,11 +46,46 @@ export function floLookBox(sheet, look, bgRect) {
|
|
|
34
46
|
return { x: x0 * w, y: y0 * h, w: (x1 - x0) * w, h: (y1 - y0) * h };
|
|
35
47
|
}
|
|
36
48
|
|
|
37
|
-
/**
|
|
38
|
-
|
|
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) {
|
|
39
51
|
// The set may be several files, so the page number is of its own file.
|
|
40
|
-
if (!sheet) return `
|
|
41
|
-
|
|
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`;
|
|
42
89
|
}
|
|
43
90
|
|
|
44
91
|
/**
|
|
@@ -59,31 +106,93 @@ export function floPerch(box, stage, pilot, clear) {
|
|
|
59
106
|
|
|
60
107
|
/**
|
|
61
108
|
* The overlay. `d` is the page's half: its elements and what only it knows.
|
|
62
|
-
* root, scan, pilot, bubble, head, sentence, where, showBtn, answerBtn, toggle, live: the elements;
|
|
109
|
+
* root, scan, pilot, bubble, head, sentence, where, showBtn, answerBtn, toggle, live: the elements; minBtn: the
|
|
110
|
+
* bubble's own Minimize, which does what turning Show Flo off does;
|
|
63
111
|
* avatar: floAvatar(...)'s handle, or null; stage: the stage element;
|
|
64
112
|
* sheets(), active(), setSheet(i), focusSheets(): the Filter's sheets;
|
|
65
113
|
* toStage(x, y): a sheet point in stage px; bgRect(sheet): where the sheet's own picture lies;
|
|
66
114
|
* clearTop(), clearBottom(): px kept clear (the place bar; the zoom bar and the note above it);
|
|
67
|
-
* ask(): asks the shell to open the question in AI Chat; storage: localStorage or null; now(): ms
|
|
115
|
+
* ask(): asks the shell to open the question in AI Chat; storage: localStorage or null; now(): ms;
|
|
116
|
+
* handle: the element the person grabs to move Flo (the avatar), or null.
|
|
117
|
+
*
|
|
118
|
+
* The person may drag Flo anywhere on the stage. It then stays where it was put (as a fraction of the stage, so a
|
|
119
|
+
* resize keeps it in place) while the box goes on following the reading, until a double-click, Escape, or turning
|
|
120
|
+
* Flo off and on sends it back to following.
|
|
68
121
|
*/
|
|
69
122
|
export function mountFilterFlo(d) {
|
|
70
123
|
let state = { mode: 'off' };
|
|
71
124
|
let on = true;
|
|
72
125
|
try { on = d.storage?.getItem(FLO_STORAGE_KEY) !== 'off'; } catch { /* private mode: on, the default */ }
|
|
73
126
|
let cur = null, queue = [], tour = 0, freshTimer = 0, leaving = 0, lastSeq = 0, last = null, spoken = '', read = null, unpin = 0;
|
|
127
|
+
/** Where the person put Flo, as fractions of the stage; null while Flo follows the reading. */
|
|
128
|
+
let pin = null;
|
|
129
|
+
/** Where Flo is under the pointer while the person drags it (stage px), so a poll in the middle never pulls it away. */
|
|
130
|
+
let held = null;
|
|
131
|
+
/** 'in' or 'out' just after Show Flo was pressed: the next show or hide springs from or into the button. */
|
|
132
|
+
let popping = '';
|
|
133
|
+
let popAnim = null;
|
|
134
|
+
const reducedMotion = () => !!globalThis.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches;
|
|
74
135
|
|
|
75
136
|
const show = (el, yes) => { el.hidden = !yes; };
|
|
76
137
|
const sheetName = (i) => (i >= 0 ? d.sheets()[i]?.sheet || null : null);
|
|
77
138
|
|
|
139
|
+
/** The centre of Show Flo, in stage px, or null when it cannot be measured. */
|
|
140
|
+
function toggleCentre() {
|
|
141
|
+
const t = d.toggle.getBoundingClientRect?.(), s = d.stage.getBoundingClientRect?.();
|
|
142
|
+
if (!t || !s || !t.width) return null;
|
|
143
|
+
return { x: t.left - s.left + t.width / 2, y: t.top - s.top + t.height / 2 };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Flo springing between Show Flo and `p` (its stage position): out of the button for 'in', back into it for 'out'.
|
|
148
|
+
* A plain fade for a person who asked for less motion. False when this browser cannot animate it.
|
|
149
|
+
*/
|
|
150
|
+
function pop(dir, p, done) {
|
|
151
|
+
popAnim?.cancel();
|
|
152
|
+
popAnim = null;
|
|
153
|
+
const c = toggleCentre();
|
|
154
|
+
if (typeof d.pilot.animate !== 'function' || !c || !p) return false;
|
|
155
|
+
const w = d.pilot.offsetWidth || 0, h = d.pilot.offsetHeight || 0;
|
|
156
|
+
const at = `translate(${Math.round(p.x)}px, ${Math.round(p.y)}px)`;
|
|
157
|
+
// Scaled from its top-left, so this start puts the small Flo's centre on the button's.
|
|
158
|
+
const button = `translate(${Math.round(c.x - 0.1 * w)}px, ${Math.round(c.y - 0.1 * h)}px) scale(0.2)`;
|
|
159
|
+
const still = reducedMotion();
|
|
160
|
+
const frames = still
|
|
161
|
+
? [{ transform: at, opacity: dir === 'in' ? 0 : 1 }, { transform: at, opacity: dir === 'in' ? 1 : 0 }]
|
|
162
|
+
: dir === 'in'
|
|
163
|
+
? [{ transform: button, opacity: 0 }, { opacity: 1, offset: 0.4 }, { transform: `${at} scale(1.04)`, offset: 0.8 }, { transform: at, opacity: 1 }]
|
|
164
|
+
: [{ transform: at, opacity: 1 }, { opacity: 1, offset: 0.6 }, { transform: button, opacity: 0 }];
|
|
165
|
+
d.root.classList.add('popping');
|
|
166
|
+
const anim = popAnim = d.pilot.animate(frames, {
|
|
167
|
+
duration: still ? 120 : dir === 'in' ? FLO_POP_IN_MS : FLO_POP_OUT_MS,
|
|
168
|
+
easing: dir === 'in' ? 'cubic-bezier(.22,1,.36,1)' : 'cubic-bezier(.55,0,1,.45)',
|
|
169
|
+
});
|
|
170
|
+
anim.onfinish = () => {
|
|
171
|
+
if (popAnim !== anim) return;
|
|
172
|
+
popAnim = null;
|
|
173
|
+
d.root.classList.remove('popping');
|
|
174
|
+
if (dir === 'in') { d.toggle.classList.add('landed'); setTimeout(() => d.toggle.classList.remove('landed'), 180); }
|
|
175
|
+
done?.();
|
|
176
|
+
};
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
|
|
78
180
|
function hide() {
|
|
79
181
|
clearTimeout(freshTimer);
|
|
80
182
|
d.avatar?.setMood('idle');
|
|
81
183
|
if (d.root.hidden || leaving) return;
|
|
184
|
+
const finish = () => { clearTimeout(leaving); leaving = 0; d.root.hidden = true; d.root.classList.remove('leaving'); };
|
|
185
|
+
if (popping === 'out') {
|
|
186
|
+
popping = '';
|
|
187
|
+
d.scan.classList.add('hide');
|
|
188
|
+
// The timer is the backstop: a cancelled animation never finishes.
|
|
189
|
+
if (pop('out', last, () => { if (leaving) finish(); })) { leaving = setTimeout(finish, FLO_POP_OUT_MS + 200); return; }
|
|
190
|
+
}
|
|
82
191
|
d.root.classList.add('leaving');
|
|
83
|
-
leaving = setTimeout(
|
|
192
|
+
leaving = setTimeout(finish, 300);
|
|
84
193
|
}
|
|
85
194
|
function reveal() {
|
|
86
|
-
if (leaving) { clearTimeout(leaving); leaving = 0; d.root.classList.remove('leaving'); }
|
|
195
|
+
if (leaving) { clearTimeout(leaving); leaving = 0; d.root.classList.remove('leaving'); popAnim?.cancel(); popAnim = null; d.root.classList.remove('popping'); }
|
|
87
196
|
d.root.hidden = false;
|
|
88
197
|
}
|
|
89
198
|
|
|
@@ -104,12 +213,19 @@ export function mountFilterFlo(d) {
|
|
|
104
213
|
if (state.mode === 'reading') {
|
|
105
214
|
const t = d.now(), looks = Array.isArray(state.looks) ? state.looks : [];
|
|
106
215
|
const newest = looks.reduce((m, l) => Math.max(m, l.seq), 0);
|
|
107
|
-
|
|
216
|
+
const restarted = looks.length > 0 && newest < lastSeq;
|
|
217
|
+
if (restarted) lastSeq = 0; // the server restarted and numbers looks from 1 again
|
|
108
218
|
const fresh = looks.filter((l) => l.seq > lastSeq && l.ageMs < FLO_FRESH_LOOK_MS).map((l) => ({ ...l, at: t - l.ageMs }));
|
|
109
219
|
lastSeq = Math.max(lastSeq, newest);
|
|
110
220
|
if (fresh.length) {
|
|
111
221
|
queue = fresh.slice(-FLO_CATCH_UP);
|
|
112
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 };
|
|
113
229
|
}
|
|
114
230
|
}
|
|
115
231
|
render();
|
|
@@ -118,6 +234,13 @@ export function mountFilterFlo(d) {
|
|
|
118
234
|
function render(instant = false) {
|
|
119
235
|
// The switch is there only while a read is live: with nothing to show it would be a control that does nothing.
|
|
120
236
|
d.toggle.hidden = state.mode !== 'reading' && state.mode !== 'waiting';
|
|
237
|
+
const asking = !on && state.mode === 'waiting';
|
|
238
|
+
d.toggle.classList.toggle('asking', asking);
|
|
239
|
+
if (asking) d.toggle.dataset.tip = 'Show Flo. The AI is waiting for your answer.';
|
|
240
|
+
else tipToggle();
|
|
241
|
+
// The dot is for eyes; a screen reader hears the same thing on the button.
|
|
242
|
+
if (asking) d.toggle.setAttribute('aria-description', 'The AI is waiting for your answer');
|
|
243
|
+
else d.toggle.removeAttribute('aria-description');
|
|
121
244
|
const mode = on ? state.mode : 'off';
|
|
122
245
|
const waiting = mode === 'waiting';
|
|
123
246
|
// Said once on the way in (and again only if what it waits on changes), never per poll: the bubble is not a
|
|
@@ -128,7 +251,8 @@ export function mountFilterFlo(d) {
|
|
|
128
251
|
reveal();
|
|
129
252
|
clearTimeout(freshTimer);
|
|
130
253
|
const t = d.now();
|
|
131
|
-
const look = mode === 'reading' && cur
|
|
254
|
+
const look = mode === 'reading' && cur ? cur : null;
|
|
255
|
+
const stale = !!look && t - look.at >= FLO_FRESH_LOOK_MS;
|
|
132
256
|
const at = look ? floSheetIndex(d.sheets(), look) : -1;
|
|
133
257
|
d.bubble.classList.toggle('waiting', waiting);
|
|
134
258
|
if (waiting) {
|
|
@@ -136,9 +260,12 @@ export function mountFilterFlo(d) {
|
|
|
136
260
|
d.sentence.textContent = state.text;
|
|
137
261
|
d.where.textContent = state.chat ? '' : 'Answer it in the terminal where the read is running.';
|
|
138
262
|
} else {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
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(' · ');
|
|
142
269
|
}
|
|
143
270
|
show(d.where, !!d.where.textContent);
|
|
144
271
|
const away = !!look && at >= 0 && at !== d.active();
|
|
@@ -146,9 +273,12 @@ export function mountFilterFlo(d) {
|
|
|
146
273
|
show(d.showBtn, away);
|
|
147
274
|
show(d.answerBtn, waiting && !!state.chat);
|
|
148
275
|
if (waiting) { d.avatar?.setMood('yourcall', true); d.avatar?.rest(); }
|
|
149
|
-
else d.avatar?.setMood(look ? 'working' : 'thinking', true);
|
|
150
|
-
|
|
151
|
-
|
|
276
|
+
else d.avatar?.setMood(look && !stale ? 'working' : 'thinking', true);
|
|
277
|
+
const springing = popping === 'in';
|
|
278
|
+
place(instant || springing, look, at);
|
|
279
|
+
if (springing) { popping = ''; pop('in', last); }
|
|
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);
|
|
152
282
|
}
|
|
153
283
|
|
|
154
284
|
/** Puts Flo, its bubble and the box where the state says, in stage px. `instant` while the view moves. */
|
|
@@ -157,10 +287,10 @@ export function mountFilterFlo(d) {
|
|
|
157
287
|
const W = d.stage.clientWidth, H = d.stage.clientHeight;
|
|
158
288
|
if (!W || !H) return;
|
|
159
289
|
if (look === undefined) {
|
|
160
|
-
|
|
161
|
-
look = state.mode === 'reading' && cur && t - cur.at < FLO_FRESH_LOOK_MS ? cur : null;
|
|
290
|
+
look = state.mode === 'reading' && cur ? cur : null;
|
|
162
291
|
at = look ? floSheetIndex(d.sheets(), look) : -1;
|
|
163
292
|
}
|
|
293
|
+
const stale = !!look && d.now() - look.at >= FLO_FRESH_LOOK_MS;
|
|
164
294
|
if (instant) {
|
|
165
295
|
// Glides come back two frames after the LAST move: one pending at a time, or a pan's earlier frame turns them
|
|
166
296
|
// on under its later ones and Flo trails the drawing.
|
|
@@ -181,7 +311,7 @@ export function mountFilterFlo(d) {
|
|
|
181
311
|
if (box.R - box.L < 8 || box.B - box.T < 8) box = null; // that part is out of view: no box to draw
|
|
182
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) },
|
|
183
313
|
{ W, H }, pilot, clear);
|
|
184
|
-
} else if (look) {
|
|
314
|
+
} else if (look && !stale) {
|
|
185
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
|
|
186
316
|
// Show button when the Filter has that sheet. The view never moves by itself.
|
|
187
317
|
p = { x: Math.max(8, (W - pilot.pw) / 2), y: clear.top, left: false };
|
|
@@ -189,10 +319,21 @@ export function mountFilterFlo(d) {
|
|
|
189
319
|
// Between pictures: think where it stood.
|
|
190
320
|
p = last ? { ...last, y: Math.max(clear.top, Math.min(H - clear.bottom - pilot.ph, last.y)) } : { x: 16, y: clear.top, left: false };
|
|
191
321
|
}
|
|
322
|
+
if (pin) {
|
|
323
|
+
// Where the person put it, kept on the stage and clear of the bars.
|
|
324
|
+
p = { x: Math.max(8, Math.min(W - pilot.pw - 8, pin.fx * W)),
|
|
325
|
+
y: Math.max(clear.top, Math.min(H - clear.bottom - pilot.ph, pin.fy * H)), left: false };
|
|
326
|
+
}
|
|
327
|
+
// Seen in a real browser pass: a poll arriving mid-drag put Flo back where the reading had it.
|
|
328
|
+
if (held) p = { x: held.x, y: held.y, left: false };
|
|
192
329
|
last = p;
|
|
330
|
+
d.root.classList.toggle('pinned', !!pin);
|
|
193
331
|
d.pilot.classList.toggle('left', p.left);
|
|
194
332
|
d.pilot.style.transform = `translate(${Math.round(p.x)}px, ${Math.round(p.y)}px)`;
|
|
195
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);
|
|
196
337
|
if (box) {
|
|
197
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` });
|
|
198
339
|
const fx = p.left ? p.x + pilot.pw - pilot.fw / 2 : p.x + pilot.fw / 2, fy = p.y + 30;
|
|
@@ -203,11 +344,87 @@ export function mountFilterFlo(d) {
|
|
|
203
344
|
|
|
204
345
|
function setOn(next) {
|
|
205
346
|
on = !!next;
|
|
347
|
+
// Off and on again is a way back to following, as a double-click is.
|
|
348
|
+
if (pin) pinAt(null, false);
|
|
349
|
+
popping = on ? 'in' : 'out';
|
|
206
350
|
d.toggle.setAttribute('aria-pressed', String(on));
|
|
351
|
+
tipToggle();
|
|
207
352
|
try { d.storage?.setItem(FLO_STORAGE_KEY, on ? 'on' : 'off'); } catch { /* private mode */ }
|
|
208
353
|
render(true);
|
|
209
354
|
}
|
|
210
355
|
|
|
356
|
+
function tipToggle() {
|
|
357
|
+
// The name stays "Show Flo" and aria-pressed carries the state; only the tip says what a press does now.
|
|
358
|
+
d.toggle.setAttribute('aria-label', 'Show Flo');
|
|
359
|
+
d.toggle.dataset.tip = on
|
|
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';
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/** Keeps Flo where the person moved it (stage px of its top-left), or with null lets it follow the reading again. */
|
|
365
|
+
function pinAt(x, y, paint = true) {
|
|
366
|
+
const W = d.stage.clientWidth, H = d.stage.clientHeight;
|
|
367
|
+
pin = x === null || !W || !H ? null : { fx: x / W, fy: y / H };
|
|
368
|
+
if (d.handle) {
|
|
369
|
+
d.handle.dataset.tip = pin ? 'Flo stays here. Double-click it, or press Escape, to let it follow the reading again.'
|
|
370
|
+
: 'Drag Flo to move it out of the way';
|
|
371
|
+
}
|
|
372
|
+
if (paint) render(!!pin);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
if (d.handle) {
|
|
376
|
+
const h = d.handle;
|
|
377
|
+
let press = null;
|
|
378
|
+
h.addEventListener('pointerdown', (e) => {
|
|
379
|
+
if (e.button !== 0 || !last) return;
|
|
380
|
+
e.stopPropagation(); // moving Flo is not panning the drawing
|
|
381
|
+
press = { id: e.pointerId, sx: e.clientX, sy: e.clientY, x: last.x, y: last.y, moved: false, at: null };
|
|
382
|
+
// Captured on the press, not once it moves: a quick flick leaves Flo's face before its first move arrives, and
|
|
383
|
+
// that move would go to the drawing underneath (seen in a real browser pass). A click still clicks.
|
|
384
|
+
try { h.setPointerCapture(e.pointerId); } catch { /* the pointer is already gone */ }
|
|
385
|
+
});
|
|
386
|
+
h.addEventListener('pointermove', (e) => {
|
|
387
|
+
if (!press || e.pointerId !== press.id) return;
|
|
388
|
+
const dx = e.clientX - press.sx, dy = e.clientY - press.sy;
|
|
389
|
+
if (!press.moved) {
|
|
390
|
+
if (Math.hypot(dx, dy) < FLO_DRAG_THRESHOLD) return;
|
|
391
|
+
press.moved = true;
|
|
392
|
+
// The captured pointer keeps re-hovering Flo, which would bring its tip back mid-drag; the drop sets it again.
|
|
393
|
+
h.dataset.tip = '';
|
|
394
|
+
d.root.classList.add('dragging', 'instant');
|
|
395
|
+
}
|
|
396
|
+
const W = d.stage.clientWidth, H = d.stage.clientHeight, pw = d.pilot.offsetWidth || 0, ph = d.pilot.offsetHeight || 0;
|
|
397
|
+
const x = Math.max(8, Math.min(W - pw - 8, press.x + dx));
|
|
398
|
+
const y = Math.max(d.clearTop(), Math.min(H - d.clearBottom() - ph, press.y + dy));
|
|
399
|
+
d.pilot.classList.remove('left');
|
|
400
|
+
d.pilot.style.transform = `translate(${Math.round(x)}px, ${Math.round(y)}px)`;
|
|
401
|
+
press.at = { x, y };
|
|
402
|
+
held = press.at;
|
|
403
|
+
});
|
|
404
|
+
const drop = (e) => {
|
|
405
|
+
if (!press || e.pointerId !== press.id) return;
|
|
406
|
+
const done = press;
|
|
407
|
+
press = null;
|
|
408
|
+
held = null;
|
|
409
|
+
d.root.classList.remove('dragging', 'instant');
|
|
410
|
+
if (done.moved && done.at) pinAt(done.at.x, done.at.y);
|
|
411
|
+
};
|
|
412
|
+
h.addEventListener('pointerup', drop);
|
|
413
|
+
h.addEventListener('pointercancel', drop);
|
|
414
|
+
h.addEventListener('dblclick', (e) => { e.stopPropagation(); pinAt(null); });
|
|
415
|
+
h.addEventListener('keydown', (e) => {
|
|
416
|
+
// Flo is a button: Enter and Space press it, which lets it follow the reading again, as Escape does.
|
|
417
|
+
if (e.key === 'Escape' || e.key === 'Home' || e.key === 'Enter' || e.key === ' ') { if (pin) { e.preventDefault(); pinAt(null); } return; }
|
|
418
|
+
const step = e.shiftKey ? FLO_STEP * 4 : FLO_STEP;
|
|
419
|
+
const move = { ArrowLeft: [-step, 0], ArrowRight: [step, 0], ArrowUp: [0, -step], ArrowDown: [0, step] }[e.key];
|
|
420
|
+
if (!move || !last) return;
|
|
421
|
+
e.preventDefault();
|
|
422
|
+
pinAt(last.x + move[0], last.y + move[1]);
|
|
423
|
+
});
|
|
424
|
+
h.dataset.tip = 'Drag Flo to move it out of the way';
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
tipToggle();
|
|
211
428
|
d.toggle.setAttribute('aria-pressed', String(on));
|
|
212
429
|
d.toggle.addEventListener('click', () => setOn(!on));
|
|
213
430
|
d.showBtn.addEventListener('click', () => {
|
|
@@ -218,8 +435,11 @@ export function mountFilterFlo(d) {
|
|
|
218
435
|
d.focusSheets(); // the button is gone now that its sheet is on screen
|
|
219
436
|
});
|
|
220
437
|
d.answerBtn.addEventListener('click', () => d.ask());
|
|
438
|
+
// Minimize is Show Flo off, found where Flo is. The bubble is leaving, so focus goes to where Flo comes back from.
|
|
439
|
+
// With the read just ended, Show Flo is gone too: the sheet list is the nearest place left.
|
|
440
|
+
d.minBtn?.addEventListener('click', () => { setOn(false); if (!d.toggle.hidden) d.toggle.focus?.(); else d.focusSheets(); });
|
|
221
441
|
// Pan and hover pass through everything but the buttons.
|
|
222
|
-
for (const el of [d.showBtn, d.answerBtn]) el
|
|
442
|
+
for (const el of [d.showBtn, d.answerBtn, d.minBtn]) el?.addEventListener('pointerdown', (e) => e.stopPropagation());
|
|
223
443
|
|
|
224
|
-
return { update, place: (instant) => place(instant), isOn: () => on };
|
|
444
|
+
return { update, place: (instant) => place(instant), isOn: () => on, isPinned: () => !!pin };
|
|
225
445
|
}
|
|
@@ -532,19 +532,32 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
532
532
|
ellipsises (scrollWidth 84 vs clientWidth 77). A button now moves to its own line before it
|
|
533
533
|
shrinks, so the ellipsis is the second line of defence, not the first. */
|
|
534
534
|
#zoombar{position:absolute;left:12px;bottom:12px;max-width:calc(100% - 24px);overflow:hidden;display:flex;flex-wrap:wrap;gap:6px;background:var(--stage-panel);border:1px solid var(--stage-line);border-radius:8px;padding:6px 8px;box-shadow:var(--stage-shadow)}
|
|
535
|
-
|
|
536
|
-
|
|
535
|
+
/* ICONS (owner request 2026-11-01): the 3D view toolbar's compact 30px icon buttons, 16px stroked glyphs and its
|
|
536
|
+
pressed language (brand outline and brand glyph), so the app's canvas bars read as one family. Every button
|
|
537
|
+
keeps its words as aria-label and its sentence as data-tip. Four icons are 140px on one row, so the wrap
|
|
538
|
+
arithmetic above now has room to spare. */
|
|
539
|
+
#zoombar{gap:2px;padding:4px;align-items:center}
|
|
540
|
+
#zoombar button{position:relative;width:30px;height:30px;min-width:0;min-height:0;padding:0;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;border-radius:6px;box-shadow:none;color:var(--stage-mut)}
|
|
541
|
+
#zoombar button:hover{background:var(--stage-btn-hover);color:var(--stage-text)}
|
|
542
|
+
#zoombar button:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
|
|
543
|
+
#zoombar svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
|
|
544
|
+
/* Show Flo when off: the same face, struck through, so the state never rests on colour alone. */
|
|
545
|
+
#zoombar svg.zb-off{position:absolute;left:6px;top:6px}
|
|
546
|
+
#floToggle[aria-pressed="true"] svg.zb-off{display:none}
|
|
547
|
+
/* Minimized while the AI waits for an answer: a warning dot, so tucking Flo away never buries the question. */
|
|
548
|
+
#floToggle.asking::after{content:"";position:absolute;top:3px;right:3px;width:7px;height:7px;border-radius:50%;background:var(--warn);box-shadow:0 0 0 2px var(--stage-panel)}
|
|
549
|
+
#floToggle.landed{box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 35%,transparent);transition:box-shadow .16s ease}
|
|
537
550
|
/* Hover info is a READ tool, not a framing control -- the divider says so, so the bar reads as the
|
|
538
551
|
framing pair plus the canvas tools after it (Hover info, and Show Flo during a read) rather than
|
|
539
552
|
commands of one kind. aria-hidden: it is
|
|
540
553
|
decoration, and the buttons' own names already say what each does. */
|
|
541
|
-
#zoombar .zb-sep{width:1px;
|
|
554
|
+
#zoombar .zb-sep{width:1px;height:16px;margin:0 3px;background:var(--stage-line);flex:none}
|
|
542
555
|
/* Hover info ON. It reuses button.primary's exact fill — the "this is active" language the page
|
|
543
556
|
already speaks — so the pressed state costs no new colour. aria-pressed rather than a switch
|
|
544
557
|
component: this surface ships checkboxes and buttons and nothing else, and inventing a third
|
|
545
558
|
control vocabulary is precisely what the locked baseline forbids. */
|
|
546
|
-
#zoombar button[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:var(--brand
|
|
547
|
-
#zoombar button[aria-pressed="true"]:hover{background:var(--brand
|
|
559
|
+
#zoombar button[aria-pressed="true"]{background:color-mix(in srgb,var(--brand) 12%,transparent);border-color:var(--brand);color:var(--brand)}
|
|
560
|
+
#zoombar button[aria-pressed="true"]:hover{background:color-mix(in srgb,var(--brand) 20%,transparent)}
|
|
548
561
|
/* Forced colors flattens the brand fill, so the pressed state needs a cue that is not a colour. */
|
|
549
562
|
@media (forced-colors:active){#zoombar button[aria-pressed="true"]{outline:2px solid currentColor;outline-offset:-3px}}
|
|
550
563
|
/* #2777 slice D: a place AI Chat opened here. Its outline is its OWN layer in #canvas, never the #hot halo,
|
|
@@ -644,7 +657,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
644
657
|
#floFx{position:absolute;inset:0;pointer-events:none;overflow:hidden;transition:opacity .3s ease;--flo-glide:cubic-bezier(.22,1,.36,1)}
|
|
645
658
|
#floFx[hidden]{display:none}
|
|
646
659
|
#floFx.leaving{opacity:0}
|
|
647
|
-
#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}
|
|
648
661
|
#floScan.hide{opacity:0}
|
|
649
662
|
#floScan i{position:absolute;width:16px;height:16px;border:2px solid var(--brand)}
|
|
650
663
|
#floScan i:nth-of-type(1){left:0;top:0;border-right:0;border-bottom:0;border-top-left-radius:6px}
|
|
@@ -654,11 +667,21 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
654
667
|
/* A slow light down the box, then a rest: it sits over linework people read for half an hour. */
|
|
655
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}
|
|
656
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}
|
|
657
676
|
@keyframes flo-sweep{36%{transform:translateY(0)}36.1%,100%{transform:translateY(-100%)}}
|
|
658
677
|
#floPilot{position:absolute;left:0;top:0;display:flex;align-items:flex-start;gap:4px;transition:transform 1.1s var(--flo-glide)}
|
|
659
678
|
#floPilot.left{flex-direction:row-reverse}
|
|
660
679
|
#floFx.instant #floPilot,#floFx.instant #floScan{transition:none}
|
|
661
|
-
#floAvatar{flex:none}
|
|
680
|
+
#floAvatar{flex:none;pointer-events:auto;cursor:grab;touch-action:none;border-radius:50%;transition:transform .15s ease,filter .15s ease}
|
|
681
|
+
#floAvatar:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
|
|
682
|
+
#floFx.dragging #floAvatar{cursor:grabbing;transform:scale(1.06);filter:drop-shadow(0 6px 10px rgba(0,0,0,.35))}
|
|
683
|
+
#floFx.popping #floPilot{transition:none}
|
|
684
|
+
#floFx.popping #floAvatar{pointer-events:none}
|
|
662
685
|
#floAvatar .flo-avatar{display:block;--flo-line:var(--brand);--flo-fill:var(--stage-panel);--flo-hat:var(--stage-text);--flo-hat-line:var(--stage-text);--flo-pulse:var(--stage-text)}
|
|
663
686
|
/* On a light sheet a white hat needs its outline, as app.css gives Flo in the light theme. */
|
|
664
687
|
[data-theme="light"] #floAvatar .flo-avatar{--flo-hat-line:var(--brand)}
|
|
@@ -678,6 +701,13 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
678
701
|
#floWhere[hidden],#floBubble button[hidden]{display:none}
|
|
679
702
|
#floBubble button{display:block;pointer-events:auto;margin-top:7px;white-space:nowrap;background:var(--stage-btn);border-color:var(--stage-ctrl);color:var(--stage-text)}
|
|
680
703
|
#floBubble button:hover{background:var(--stage-btn-hover)}
|
|
704
|
+
/* Minimize, in the bubble's corner: the canvas bar's icon-button idiom at bubble scale, so tucking Flo away is found
|
|
705
|
+
where Flo is, not only on the bar. The bubble keeps its text clear of it. */
|
|
706
|
+
#floBubble{position:relative;padding-right:32px}
|
|
707
|
+
#floBubble #floMin{position:absolute;top:4px;right:4px;width:24px;height:24px;min-width:0;min-height:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;border-radius:5px;box-shadow:none;color:var(--stage-mut)}
|
|
708
|
+
#floBubble #floMin:hover{background:var(--stage-btn-hover);color:var(--stage-text)}
|
|
709
|
+
#floBubble #floMin:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
|
|
710
|
+
#floMin svg{width:14px;height:14px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
|
|
681
711
|
@media (prefers-reduced-motion:reduce){#floFx,#floPilot,#floScan{transition:none}#floScan span{display:none}}
|
|
682
712
|
/* The hovered element's own row in each facet: the checkbox the user is about to untick, lit where it
|
|
683
713
|
sits. Reuses the option-row hover fill and the left-accent idiom .sheet-option.selected already
|
|
@@ -871,16 +901,17 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
871
901
|
</div>
|
|
872
902
|
<!-- #2926: Flo, showing which part of the drawing the AI is reading. Below the stage's bars in the stacking
|
|
873
903
|
order, so it never covers them. The bubble is NOT a live region (it changes every few seconds and the
|
|
874
|
-
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. -->
|
|
875
905
|
<div id="floFx" hidden>
|
|
876
906
|
<div id="floScan" class="hide" aria-hidden="true"><span></span><i></i><i></i><i></i><i></i></div>
|
|
877
907
|
<div id="floPilot">
|
|
878
|
-
<div id="floAvatar" aria-
|
|
908
|
+
<div id="floAvatar" role="button" tabindex="0" aria-label="Move Flo" data-command-id="filter.flo-move" data-tip="Drag Flo to move it out of the way"></div>
|
|
879
909
|
<div id="floDots" aria-hidden="true"><i></i><i></i></div>
|
|
880
910
|
<div id="floBubble">
|
|
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>
|
|
881
912
|
<p><b id="floHead"></b> <span id="floNow"></span></p>
|
|
882
913
|
<span id="floWhere" hidden></span>
|
|
883
|
-
<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>
|
|
884
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>
|
|
885
916
|
</div>
|
|
886
917
|
</div>
|
|
@@ -893,7 +924,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
893
924
|
bare noun read as a category, not a command. data-tip (never title=) carries the full
|
|
894
925
|
sentence. -->
|
|
895
926
|
<div id="placebar" role="status" aria-live="polite" hidden><span id="placebarText"></span><button id="placebarClear" type="button" data-command-id="filter.place-clear" data-tip="Remove the marked place from this drawing">Clear</button></div>
|
|
896
|
-
<div id="zoombar"><button id="fit2" data-command-id="filter.fit" data-tip="Fit the whole page in view"
|
|
927
|
+
<div id="zoombar"><button id="fit2" type="button" data-command-id="filter.fit" aria-label="Fit" data-tip="Fit the whole page in view"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 6V2h4M14 6V2h-4M2 10v4h4M14 10v4h-4"/></svg></button><button id="zoomsteel2" type="button" data-command-id="filter.zoom-steel" aria-label="Zoom steel" data-tip="Zoom to fit the steel elements on this sheet"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 5V2h3M14 5V2h-3M2 11v3h3M14 11v3h-3"/><path d="M5.4 5.4h5.2M5.4 10.6h5.2M8 5.4v5.2" stroke-width="1.4"/></svg></button><span class="zb-sep" aria-hidden="true"></span><button id="hoverInfo" type="button" aria-pressed="false" aria-label="Hover info" data-command-id="filter.hover-info" data-tip="Hover info. Point at any line or label, shown or switched off, to read its layer, thickness and colour — and light up its rows in the Filters panel. Click a switched-off line to see what to tick to bring it back. Background-only linework, on layers the drawing read never picked up, can’t be read by pointing; click an empty spot to ask the original drawing what is there, where the original drawing is available."><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.2 2.4 3.2 12l2.6-2.4 1.8 4 1.7-.8-1.8-3.9 3.6-.1z"/><path d="M11.6 3.4h2.6M11.6 5.6h1.6" stroke-width="1.4"/></svg></button><button id="floToggle" type="button" aria-pressed="true" aria-label="Show Flo" hidden data-command-id="filter.flo-toggle" data-tip="Hide Flo. While a drawing read runs, Flo shows which part of the drawing the AI is reading and says when it is waiting for your answer. Drag Flo to move it."><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4.2 6.6a3.8 3.8 0 0 1 7.6 0M3 6.6h10"/><path d="M4.6 6.6v2a3.4 3.4 0 0 0 6.8 0v-2"/><path d="M6.5 8.7h.01M9.5 8.7h.01" stroke-width="2"/></svg><svg class="zb-off" viewBox="0 0 16 16" aria-hidden="true"><path d="M2.6 13.4 13.4 2.6" stroke-width="1.5"/></svg></button></div>
|
|
897
928
|
<!-- The hover readout, anchored at the line it names (see #hoverbar's CSS for why it is not docked).
|
|
898
929
|
Hidden until the pointer is on a line with the mode on; hidden again when it leaves the line, or
|
|
899
930
|
when a click opens the popover (which then says the same thing).
|
|
@@ -960,6 +991,7 @@ body.publication-blocked #empty{position:static;flex:1}
|
|
|
960
991
|
The reporter tells the shell which surface is on screen (so the `?` sheet can put this
|
|
961
992
|
screen's commands first) and forwards `?`/F1 up, because a keydown inside an iframe never
|
|
962
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>
|
|
963
995
|
<script src="filter-guidance.js"></script>
|
|
964
996
|
<!-- #2926: Flo's one drawing module and its mount, as index.html loads them (flo.js first: flo-avatar.js calls it). -->
|
|
965
997
|
<script src="flo.js"></script>
|
|
@@ -2012,7 +2044,7 @@ async function bootOnce(){
|
|
|
2012
2044
|
const note = takeUpdateNote();
|
|
2013
2045
|
let res;
|
|
2014
2046
|
try { res = await fetch('/api/contract/' + encodeURIComponent(APP_ID) + CONTRACT_QS); }
|
|
2015
|
-
catch(e){
|
|
2047
|
+
catch(e){ showLoadFailure(e); return; }
|
|
2016
2048
|
// A project read asks for 204 when no contract is stored yet. An app-keyed 404 can mean that too, or
|
|
2017
2049
|
// it can be the explicit publication-ownership refusal shared with the editor and export routes.
|
|
2018
2050
|
if(res.status === 204){ showEmpty(); return; }
|
|
@@ -2028,8 +2060,9 @@ async function bootOnce(){
|
|
|
2028
2060
|
// awaiting its first bake — leaving the user, and anyone reading their console, nothing to go on.
|
|
2029
2061
|
if(!res.ok){
|
|
2030
2062
|
console.error('steel-filter: contract read failed (' + res.status + ')');
|
|
2031
|
-
|
|
2032
|
-
|
|
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) });
|
|
2033
2066
|
return;
|
|
2034
2067
|
}
|
|
2035
2068
|
C = await res.json();
|
|
@@ -2100,6 +2133,13 @@ function publicationEmptyState(code){
|
|
|
2100
2133
|
return null;
|
|
2101
2134
|
}
|
|
2102
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
|
+
|
|
2103
2143
|
function showEmpty(msg, publicationBlocked = false, detail = ''){
|
|
2104
2144
|
notifyFilterAi();
|
|
2105
2145
|
FilterFocus.fail(msg ? `The Drawing Filter cannot show this place: ${msg} The picture in AI Chat still shows it.`
|
|
@@ -4900,7 +4940,7 @@ boot();
|
|
|
4900
4940
|
const stage = $('stage'), zoombar = $('zoombar');
|
|
4901
4941
|
filterFlo = mountFilterFlo({
|
|
4902
4942
|
root: $('floFx'), scan: $('floScan'), pilot: $('floPilot'), bubble: $('floBubble'), head: $('floHead'), sentence: $('floNow'),
|
|
4903
|
-
where: $('floWhere'), showBtn: $('floShow'), answerBtn: $('floAnswer'), toggle: $('floToggle'), live: $('floLive'),
|
|
4943
|
+
where: $('floWhere'), showBtn: $('floShow'), answerBtn: $('floAnswer'), minBtn: $('floMin'), toggle: $('floToggle'), live: $('floLive'),
|
|
4904
4944
|
avatar: typeof window.floAvatar === 'function' ? window.floAvatar($('floAvatar'), { size: 56, mood: 'idle', hat: true }) : null,
|
|
4905
4945
|
stage,
|
|
4906
4946
|
sheets: () => sheets, active: () => active, setSheet,
|
|
@@ -4920,6 +4960,7 @@ boot();
|
|
|
4920
4960
|
ask: () => { try { if(window.parent !== window) window.parent.dispatchEvent(new CustomEvent('floless:filter-flo-answer')); } catch { /* no shell */ } },
|
|
4921
4961
|
storage: (() => { try { return window.localStorage; } catch { return null; } })(),
|
|
4922
4962
|
now: () => Date.now(),
|
|
4963
|
+
handle: $('floAvatar'),
|
|
4923
4964
|
});
|
|
4924
4965
|
window.flolessFilterFlo = (state) => filterFlo.update(state);
|
|
4925
4966
|
// For a real browser pass to read the outcome; it drives nothing.
|
|
@@ -4928,7 +4969,8 @@ boot();
|
|
|
4928
4969
|
head: $('floHead').textContent, now: $('floNow').textContent, where: $('floWhere').hidden ? '' : $('floWhere').textContent,
|
|
4929
4970
|
show: $('floShow').hidden ? '' : $('floShow').textContent, answer: !$('floAnswer').hidden,
|
|
4930
4971
|
box: $('floScan').classList.contains('hide') ? null : ['left', 'top', 'width', 'height'].map((k) => parseFloat($('floScan').style[k])),
|
|
4931
|
-
|
|
4972
|
+
stale: $('floScan').classList.contains('stale'), all: $('floScan').classList.contains('all'),
|
|
4973
|
+
pilot: $('floPilot').style.transform, live: $('floLive').textContent, pinned: filterFlo.isPinned(),
|
|
4932
4974
|
});
|
|
4933
4975
|
if(typeof ResizeObserver === 'function') new ResizeObserver(() => filterFlo.place(true)).observe(stage);
|
|
4934
4976
|
}
|