@archie/devtools 0.0.25 → 0.0.26
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/client/client.js
CHANGED
|
@@ -9595,15 +9595,14 @@ function installDomMetaSanitizer() {
|
|
|
9595
9595
|
_origError(msg, ...rest);
|
|
9596
9596
|
};
|
|
9597
9597
|
}
|
|
9598
|
-
installDomMetaSanitizer();
|
|
9599
9598
|
|
|
9600
9599
|
// src/client/useArchieDevToolsRuntime.ts
|
|
9601
|
-
installDomMetaSanitizer();
|
|
9602
9600
|
function useArchieDevToolsRuntime({
|
|
9603
9601
|
router,
|
|
9604
9602
|
inspector,
|
|
9605
9603
|
inspectorOptions
|
|
9606
9604
|
}) {
|
|
9605
|
+
installDomMetaSanitizer();
|
|
9607
9606
|
const stableOptionsKey = JSON.stringify(inspectorOptions ?? null);
|
|
9608
9607
|
const inspectorOptionsRef = (0, import_react20.useRef)(inspectorOptions);
|
|
9609
9608
|
inspectorOptionsRef.current = inspectorOptions;
|
package/dist/client/client.mjs
CHANGED
|
@@ -9560,15 +9560,14 @@ function installDomMetaSanitizer() {
|
|
|
9560
9560
|
_origError(msg, ...rest);
|
|
9561
9561
|
};
|
|
9562
9562
|
}
|
|
9563
|
-
installDomMetaSanitizer();
|
|
9564
9563
|
|
|
9565
9564
|
// src/client/useArchieDevToolsRuntime.ts
|
|
9566
|
-
installDomMetaSanitizer();
|
|
9567
9565
|
function useArchieDevToolsRuntime({
|
|
9568
9566
|
router,
|
|
9569
9567
|
inspector,
|
|
9570
9568
|
inspectorOptions
|
|
9571
9569
|
}) {
|
|
9570
|
+
installDomMetaSanitizer();
|
|
9572
9571
|
const stableOptionsKey = JSON.stringify(inspectorOptions ?? null);
|
|
9573
9572
|
const inspectorOptionsRef = useRef11(inspectorOptions);
|
|
9574
9573
|
inspectorOptionsRef.current = inspectorOptions;
|
|
@@ -1684,6 +1684,30 @@
|
|
|
1684
1684
|
// misread by the host as a stale mode (see runtimeBridgeHandler).
|
|
1685
1685
|
var hostCommandedEditorMode = "off"
|
|
1686
1686
|
|
|
1687
|
+
// ARCH-886 — per-page runtime feature-detection for the unified
|
|
1688
|
+
// inspect+arrange coexistence. This inspector build is served fresh
|
|
1689
|
+
// from the CDN (same URL, overwritten in place — see
|
|
1690
|
+
// docs/deploy-order.md) to EVERY published prototype, old and new
|
|
1691
|
+
// alike, so it cannot assume the PAGE it is currently inspecting was
|
|
1692
|
+
// built with a @archie/devtools new enough to understand
|
|
1693
|
+
// `set-design-mode`'s unified role. The page's own DndProvider
|
|
1694
|
+
// registers `window.__ARCHIE_DESIGN_MODE__` synchronously on mount —
|
|
1695
|
+
// well before a user can trigger SET_EDITOR_MODE from the host — so
|
|
1696
|
+
// its presence at message-handling time is an accurate, live,
|
|
1697
|
+
// per-page signal (no version number or capability handshake needed).
|
|
1698
|
+
// Pages built before this bridge existed (pre-PR#12, e.g. the 0.0.21
|
|
1699
|
+
// release) already handle the legacy `set-design-mode` command (that
|
|
1700
|
+
// handler predates the bridge and is unchanged by it) — so
|
|
1701
|
+
// unconditionally dispatching it there does not no-op, it ARMS that
|
|
1702
|
+
// page's design-mode/arrange overlay with no selection routing,
|
|
1703
|
+
// producing a second, uncoordinated hit-area layer on top of the
|
|
1704
|
+
// inspector's own hover/selection UI. Gating on the bridge avoids
|
|
1705
|
+
// that: an old page just gets clean inspect-only behavior, same as
|
|
1706
|
+
// before unification shipped.
|
|
1707
|
+
function pageSupportsUnifiedDesignMode() {
|
|
1708
|
+
return typeof window.__ARCHIE_DESIGN_MODE__ !== "undefined"
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1687
1711
|
function setEditorModeFromHost(mode, options) {
|
|
1688
1712
|
var historyMode =
|
|
1689
1713
|
options && options.hostControlledHistory ? "host" : "local"
|
|
@@ -1704,11 +1728,14 @@
|
|
|
1704
1728
|
hostCommandedEditorMode = mode === "inspect" || mode === "design" ? mode : "off"
|
|
1705
1729
|
|
|
1706
1730
|
if (mode === "inspect") {
|
|
1707
|
-
// Unified mode: visual editor (inspect) + arrange (design) coexist
|
|
1708
|
-
//
|
|
1731
|
+
// Unified mode: visual editor (inspect) + arrange (design) coexist
|
|
1732
|
+
// — gated on pageSupportsUnifiedDesignMode() (ARCH-886). The
|
|
1733
|
+
// arrange overlay stays passive until the inspector publishes a
|
|
1709
1734
|
// single-element selection (via publishSelectionToDesignMode), at
|
|
1710
1735
|
// which point it lights up the resize/drag controls on that element.
|
|
1711
|
-
|
|
1736
|
+
if (pageSupportsUnifiedDesignMode()) {
|
|
1737
|
+
dispatchHostCommand({ type: "set-design-mode", enabled: true })
|
|
1738
|
+
}
|
|
1712
1739
|
if (isInspecting) {
|
|
1713
1740
|
// Recovery re-send (focus/visibility/online): the session is
|
|
1714
1741
|
// already live. Activating again would wipe the user's current
|