@threadlabs/looma 0.1.15 → 0.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "description": "Looma web components, responsive layout primitives, a complete editor, and supported Vue adapters.",
6
6
  "license": "MIT",
@@ -33,9 +33,11 @@ function createAdapterComponent(tagName, displayName, additionalEventBindings =
33
33
  inheritAttrs: false,
34
34
  setup(_props, { attrs, slots }) {
35
35
  const elementRef = shallowRef(null);
36
+ const componentReady = shallowRef(false);
36
37
  watchEffect((onCleanup) => {
37
38
  const element = elementRef.value;
38
39
  if (!element) return;
40
+ componentReady.value = element.classList.contains("hydrated") || Boolean(element.shadowRoot);
39
41
  const adapterAttrs = attrs;
40
42
  const propertyTarget = element;
41
43
  for (const propertyName of propertyBindings) {
@@ -80,6 +82,7 @@ function createAdapterComponent(tagName, displayName, additionalEventBindings =
80
82
  {
81
83
  "data-allow-mismatch": forwardedAttrs["data-allow-mismatch"] ?? defaultHydrationMismatch,
82
84
  ...forwardedAttrs,
85
+ class: [forwardedAttrs.class, componentReady.value && "hydrated"],
83
86
  ref: (value) => {
84
87
  elementRef.value = toHTMLElement(value);
85
88
  }
@@ -2,7 +2,7 @@ import {
2
2
  IconButton,
3
3
  createAdapterComponent,
4
4
  toHTMLElement
5
- } from "../chunk-IITL6UBR.js";
5
+ } from "../chunk-5KWCMTXB.js";
6
6
 
7
7
  // src/editor/index.ts
8
8
  import "@threadlabs/looma/editor";
package/vue/index.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  Tree,
40
40
  TreeItem,
41
41
  VUE_ADAPTER_NOTE
42
- } from "./chunk-IITL6UBR.js";
42
+ } from "./chunk-5KWCMTXB.js";
43
43
  export {
44
44
  ADAPTER_COMPONENT_TAG_MAP,
45
45
  AffordanceScope,