@floegence/redevplugin-ui 0.6.13 → 0.6.15

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.
Files changed (2) hide show
  1. package/dist/surface.js +10 -7
  2. package/package.json +2 -2
package/dist/surface.js CHANGED
@@ -3521,7 +3521,7 @@ export class PluginSurfaceSlot {
3521
3521
  });
3522
3522
  this.#adoptOpening(lease);
3523
3523
  this.#opening = host;
3524
- setSurfaceInteractive(host.element, false);
3524
+ setSurfacePresentation(host.element, "opening");
3525
3525
  this.element.append(host.element);
3526
3526
  try {
3527
3527
  await this.#openHostUntilCancelled(host, controller, lease);
@@ -3532,7 +3532,7 @@ export class PluginSurfaceSlot {
3532
3532
  }
3533
3533
  this.#opening = undefined;
3534
3534
  this.#active = host;
3535
- setSurfaceInteractive(host.element, true);
3535
+ setSurfacePresentation(host.element, "ready");
3536
3536
  this.#setState("ready");
3537
3537
  return host;
3538
3538
  }
@@ -3602,7 +3602,7 @@ export class PluginSurfaceSlot {
3602
3602
  if (existing)
3603
3603
  return existing;
3604
3604
  this.#pendingRetirements.add(host);
3605
- setSurfaceInteractive(host.element, false);
3605
+ setSurfacePresentation(host.element, "retiring");
3606
3606
  const closing = Promise.resolve().then(async () => {
3607
3607
  try {
3608
3608
  const result = await host.close();
@@ -3706,10 +3706,13 @@ export class PluginSurfaceSlot {
3706
3706
  throw new PluginBridgeError("PLUGIN_BRIDGE_DISPOSED", "Plugin surface slot is disposed");
3707
3707
  }
3708
3708
  }
3709
- function setSurfaceInteractive(element, interactive) {
3710
- element.hidden = !interactive;
3711
- element.inert = !interactive;
3712
- element.setAttribute("aria-hidden", interactive ? "false" : "true");
3709
+ function setSurfacePresentation(element, state) {
3710
+ const ready = state === "ready";
3711
+ element.hidden = state === "retiring";
3712
+ element.inert = !ready;
3713
+ element.setAttribute("aria-hidden", ready ? "false" : "true");
3714
+ element.style.visibility = state === "opening" ? "hidden" : "";
3715
+ element.style.pointerEvents = ready ? "" : "none";
3713
3716
  }
3714
3717
  function isSurfaceInteractionMessage(value) {
3715
3718
  if (!hasExactKeys(value, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/redevplugin-ui",
3
- "version": "0.6.13",
3
+ "version": "0.6.15",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@floegence/redevplugin-contracts": "0.6.13"
35
+ "@floegence/redevplugin-contracts": "0.6.15"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"