@floless/app 0.113.0 → 0.113.2
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/dist/floless-server.cjs +2796 -1637
- package/dist/web/app.css +3 -0
- package/dist/web/aware.js +105 -14
- package/dist/web/steel-3d-core.js +31 -0
- package/dist/web/steel-3d-view.js +35 -25
- package/dist/web/steel-editor.html +258 -72
- package/dist/web/steel-filter.html +51 -9
- package/dist/web/workspaces.js +351 -93
- package/package.json +1 -1
|
@@ -103,6 +103,16 @@ footer{margin-top:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap;bo
|
|
|
103
103
|
#canvas text.el{pointer-events:all;cursor:pointer;user-select:none}
|
|
104
104
|
#empty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;padding:40px;text-align:center;color:var(--mut)}
|
|
105
105
|
#empty.show{display:flex}
|
|
106
|
+
#empty>div{max-width:44ch}
|
|
107
|
+
#empty h1{margin:0;font-size:16px;font-weight:600;color:var(--text)}
|
|
108
|
+
#empty .empty-body{margin:8px 0 0;line-height:1.55;color:var(--mut)}
|
|
109
|
+
#empty .empty-body[hidden]{display:none}
|
|
110
|
+
body.publication-blocked header > :not(b),
|
|
111
|
+
body.publication-blocked #panel,
|
|
112
|
+
body.publication-blocked #canvas,
|
|
113
|
+
body.publication-blocked #zoombar{display:none}
|
|
114
|
+
body.publication-blocked #stage{display:flex}
|
|
115
|
+
body.publication-blocked #empty{position:static;flex:1}
|
|
106
116
|
#zoombar{position:absolute;left:12px;bottom:12px;display:flex;gap:6px;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:6px 8px;box-shadow:0 4px 14px rgba(0,0,0,.45)}
|
|
107
117
|
/* eyedropper popover */
|
|
108
118
|
#eye{position:fixed;display:none;z-index:50;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:10px;box-shadow:0 8px 24px rgba(0,0,0,.5);min-width:210px}
|
|
@@ -177,9 +187,10 @@ footer{margin-top:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap;bo
|
|
|
177
187
|
<image class="bg"></image>
|
|
178
188
|
<g id="overlay" fill="none"></g>
|
|
179
189
|
</svg>
|
|
180
|
-
<div id="empty">
|
|
190
|
+
<div id="empty" role="status" aria-live="polite">
|
|
181
191
|
<div>
|
|
182
|
-
<
|
|
192
|
+
<h1>No filter data yet.</h1>
|
|
193
|
+
<p class="empty-body" hidden></p>
|
|
183
194
|
<!-- "then reload" is GONE, and #441 is what earned that: until it landed, the pre-read verb
|
|
184
195
|
(server/steel-prepass-route.ts) broadcast nothing at all, so this hint could only tell the user
|
|
185
196
|
to refresh by hand. It now announces itself as `pre-read`.
|
|
@@ -560,11 +571,16 @@ async function bootOnce(){
|
|
|
560
571
|
let res;
|
|
561
572
|
try { res = await fetch('/api/contract/' + encodeURIComponent(APP_ID) + CONTRACT_QS); }
|
|
562
573
|
catch(e){ showEmpty('Could not reach the server.'); return; }
|
|
563
|
-
//
|
|
564
|
-
//
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
574
|
+
// A project read asks for 204 when no contract is stored yet. An app-keyed 404 can mean that too, or
|
|
575
|
+
// it can be the explicit publication-ownership refusal shared with the editor and export routes.
|
|
576
|
+
if(res.status === 204){ showEmpty(); return; }
|
|
577
|
+
if(res.status === 404){
|
|
578
|
+
const body = await res.json().catch(() => null);
|
|
579
|
+
const code = body && body.code;
|
|
580
|
+
const publication = publicationEmptyState(code);
|
|
581
|
+
publication ? showEmpty(publication.heading, true, publication.detail) : showEmpty();
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
568
584
|
// Anything else IS a failure, and saying which one matters: a bare showEmpty() presented a 402
|
|
569
585
|
// (subscription lapsed) or a 500 as "No filter data yet" — indistinguishable from a project simply
|
|
570
586
|
// awaiting its first bake — leaving the user, and anyone reading their console, nothing to go on.
|
|
@@ -587,10 +603,36 @@ async function bootOnce(){
|
|
|
587
603
|
if(note) showUpdateNote();
|
|
588
604
|
}
|
|
589
605
|
|
|
590
|
-
function
|
|
606
|
+
function publicationEmptyState(code){
|
|
607
|
+
if(code === 'project-publication-missing-project'){
|
|
608
|
+
return {
|
|
609
|
+
heading: 'The project for this model isn’t available',
|
|
610
|
+
detail: 'It may be archived, deleted, or stored on another computer. Check Archived in Workspaces; if you have a project archive, import it.',
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
if(code === 'project-publication-availability-unknown'){
|
|
614
|
+
return {
|
|
615
|
+
heading: 'Couldn’t check project availability',
|
|
616
|
+
detail: 'Open Workspaces to check for a project, then try again.',
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
if(code === 'project-publication'){
|
|
620
|
+
return {
|
|
621
|
+
heading: 'Open a project from Workspaces',
|
|
622
|
+
detail: 'This model was published from a project, and a project using this workflow is available in Workspaces. Open Workspaces to continue with a project.',
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
function showEmpty(msg, publicationBlocked = false, detail = ''){
|
|
591
629
|
const e = document.getElementById('empty');
|
|
630
|
+
document.body.classList.toggle('publication-blocked', publicationBlocked);
|
|
631
|
+
const body = e.querySelector('.empty-body');
|
|
632
|
+
body.textContent = detail;
|
|
633
|
+
body.hidden = !detail;
|
|
592
634
|
if(msg){
|
|
593
|
-
e.querySelector('
|
|
635
|
+
e.querySelector('h1').textContent = msg;
|
|
594
636
|
// The hint below explains how a filter gets BAKED ("your terminal AI reads the drawing once…"). Under an
|
|
595
637
|
// error headline — "Could not reach the server.", a 402, "No app specified." — that answers a question
|
|
596
638
|
// nobody asked and implies the thing is merely pending, so it goes away with the good news.
|