@floless/app 0.101.0 → 0.101.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 +93 -93
- package/dist/schemas/steel.takeoff.v1.schema.json +5 -4
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +4 -2
- package/dist/web/grid-core.js +164 -44
- package/dist/web/steel-3d-core.js +110 -0
- package/dist/web/steel-3d-view.js +88 -50
- package/dist/web/steel-editor.html +98 -73
- package/dist/web/steel-view-generation.js +36 -2
- package/dist/web/workspaces.js +22 -16
- package/package.json +1 -1
package/dist/web/workspaces.js
CHANGED
|
@@ -2496,9 +2496,9 @@
|
|
|
2496
2496
|
el.addEventListener('animationend', () => el.classList.remove('is-new'), { once: true });
|
|
2497
2497
|
}
|
|
2498
2498
|
|
|
2499
|
-
//
|
|
2500
|
-
//
|
|
2501
|
-
//
|
|
2499
|
+
// rename/duplicate/archive on ONE project — driven by the landing-grid card ⋯ menu (the header
|
|
2500
|
+
// project-picker is now a pure switcher with no inline actions). Never switches projects itself
|
|
2501
|
+
// except where a rename of the OPEN project must re-src its iframes — the caller decides navigation.
|
|
2502
2502
|
// Each branch updates the local `projects` array from the endpoint's result (unshift a duplicate,
|
|
2503
2503
|
// move a rename to the front, filter out an archive — the unshift mirrors createSeeded/
|
|
2504
2504
|
// createFromDrawing) and repaints the grid IMMEDIATELY, so the change is on screen WITH the toast
|
|
@@ -2515,16 +2515,20 @@
|
|
|
2515
2515
|
if (action === 'rename') {
|
|
2516
2516
|
const name = await promptName('Rename project', 'New name', proj ? proj.name : '');
|
|
2517
2517
|
if (!name) return;
|
|
2518
|
+
const wasCurrent = !!(current && current.id === id);
|
|
2518
2519
|
const { project } = await api(`/api/projects/${encodeURIComponent(id)}`, { method: 'PATCH', body: JSON.stringify({ name }) });
|
|
2519
|
-
|
|
2520
|
-
//
|
|
2521
|
-
//
|
|
2522
|
-
//
|
|
2520
|
+
// Rename now also changes the on-disk id (the folder tracks the display name), so update the grid
|
|
2521
|
+
// BY THE OLD id and re-front the card — once, with the flash, rather than as a jump a second later
|
|
2522
|
+
// when loadProjects() reconciles. The unshift must land before any openProject(newId) below so it
|
|
2523
|
+
// can find the project in `projects`.
|
|
2523
2524
|
const i = projects.findIndex((p) => p.id === id);
|
|
2524
2525
|
if (i >= 0) projects.splice(i, 1);
|
|
2525
2526
|
projects.unshift(project);
|
|
2526
2527
|
renderLanding();
|
|
2527
2528
|
flashCard(project.id, { scroll: true });
|
|
2529
|
+
// If the renamed project was the OPEN one, its editor iframes still carry ?project=<old id> —
|
|
2530
|
+
// re-open so they re-src to the new id (a stale id 404s the next contract read/write/autosave).
|
|
2531
|
+
if (wasCurrent) await openProject(project.id);
|
|
2528
2532
|
showToast(`Renamed to "${project.name}"`, 'ok');
|
|
2529
2533
|
} else if (action === 'duplicate') {
|
|
2530
2534
|
const { project } = await api(`/api/projects/${encodeURIComponent(id)}/duplicate`, { method: 'POST', body: '{}' });
|
|
@@ -2649,13 +2653,15 @@
|
|
|
2649
2653
|
const pid = escapeAttr(p.id);
|
|
2650
2654
|
const displayApp = appDisplayName(p.app);
|
|
2651
2655
|
const meta = `${escapeHtml(displayApp)} · ${escapeHtml(relAgo(p.updatedAt))}`;
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2656
|
+
// A PURE SWITCHER: no per-row Rename/Duplicate/Archive icons — project MANAGEMENT lives only on
|
|
2657
|
+
// the landing cards' ⋯ menu (a picker that only lets you switch has one predictable affordance
|
|
2658
|
+
// per row; a lone kept icon would have no rule a user could guess). Clicking a row switches.
|
|
2659
|
+
// The current project carries `.selected` (not just aria-selected) so the accent "you are here"
|
|
2660
|
+
// marker (.wf-option.selected in app.css) actually shows — mirrors the workflow picker (aware.js).
|
|
2661
|
+
// It matters more now the action icons are gone: without it the open row is visually unmarked.
|
|
2662
|
+
const here = current && current.id === p.id;
|
|
2663
|
+
return `<div class="wf-option${here ? ' selected' : ''}" role="option" id="ws-proj-opt-${pid}" data-id="${pid}" data-search="${escapeAttr((p.name + ' ' + displayApp + ' ' + p.app).toLowerCase())}" tabindex="-1" aria-selected="${here ? 'true' : 'false'}">`
|
|
2664
|
+
+ `<span class="wf-option-name">${escapeHtml(p.name)}</span><span class="wf-option-meta">${meta}</span></div>`;
|
|
2659
2665
|
}).join('');
|
|
2660
2666
|
html += `<div class="wf-empty-search" hidden>No projects match '<span class="wf-empty-term"></span>'</div>`;
|
|
2661
2667
|
$projList.innerHTML = html;
|
|
@@ -2737,8 +2743,8 @@
|
|
|
2737
2743
|
}
|
|
2738
2744
|
if ($projList) {
|
|
2739
2745
|
$projList.addEventListener('click', (e) => {
|
|
2740
|
-
|
|
2741
|
-
|
|
2746
|
+
// Pure switcher: a row click switches projects. Management (rename/duplicate/archive) is on the
|
|
2747
|
+
// landing cards only, so there are no inline action icons to hit-test around here anymore.
|
|
2742
2748
|
const o = e.target.closest('.wf-option');
|
|
2743
2749
|
if (o) selectProjById(o.dataset.id);
|
|
2744
2750
|
});
|