@archie/devtools 0.0.32 → 0.0.33

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.
@@ -5230,6 +5230,36 @@ function scanElements(root, depth = 0, usedNodeIds = /* @__PURE__ */ new Set(),
5230
5230
  const minW = isExplicit ? INTERACTIVE_MIN : MIN_WIDTH;
5231
5231
  const minH = isExplicit ? INTERACTIVE_MIN : MIN_HEIGHT;
5232
5232
  if (rect.width < minW || rect.height < minH || rect.width === 0 || rect.height === 0) {
5233
+ const isZeroRect = rect.width === 0 || rect.height === 0;
5234
+ const smallEligibility = isInspectorEligible(el) ?? (projectUsageMeta(el) ? "projected-usage" : null);
5235
+ if (smallEligibility !== null && !seenResolvedHosts.has(el)) {
5236
+ const nodeId2 = resolveStableNodeId(el, usedNodeIds);
5237
+ usedNodeIds.add(nodeId2);
5238
+ el.setAttribute(DND_NODE_ID_ATTR, nodeId2);
5239
+ if (!isZeroRect) {
5240
+ seenResolvedHosts.add(el);
5241
+ const surfaceMeta2 = el instanceof HTMLElement ? getDirectEditorMeta(el) ?? void 0 : void 0;
5242
+ const identityMeta3 = projectUsageMeta(el) ?? surfaceMeta2;
5243
+ const selector = getUniqueSelector(el);
5244
+ const parentEl2 = el.parentElement;
5245
+ results.push({
5246
+ nodeId: nodeId2,
5247
+ element: el,
5248
+ selector,
5249
+ sourceMetaNodeId: identityMeta3?.nodeId ?? null,
5250
+ resolvedHostNodeId: nodeId2,
5251
+ resolvedHostSelector: selector,
5252
+ resolutionKind: "direct-host",
5253
+ label: getLabel(el),
5254
+ rect,
5255
+ containerStrategy: parentEl2 && isFlexOrGridParent(parentEl2) ? resolveContainerStrategy(parentEl2) : null,
5256
+ eligibilitySource: smallEligibility,
5257
+ draggable: false,
5258
+ identityOrigin: identityMeta3?.origin ?? null,
5259
+ editorMeta: surfaceMeta2
5260
+ });
5261
+ }
5262
+ }
5233
5263
  if (!isSvgRoot) results.push(...scanElements(el, depth + 1, usedNodeIds, seenResolvedHosts));
5234
5264
  continue;
5235
5265
  }
@@ -5312,7 +5342,14 @@ function scanElements(root, depth = 0, usedNodeIds = /* @__PURE__ */ new Set(),
5312
5342
  }
5313
5343
  function buildMovedElementEntry(el, usedNodeIds) {
5314
5344
  const rect = el.getBoundingClientRect();
5315
- if (rect.width === 0 || rect.height === 0) return null;
5345
+ if (rect.width === 0 || rect.height === 0) {
5346
+ if (isInspectorEligible(el) !== null || projectUsageMeta(el) !== null) {
5347
+ const nodeId2 = resolveStableNodeId(el, usedNodeIds);
5348
+ usedNodeIds.add(nodeId2);
5349
+ el.setAttribute(DND_NODE_ID_ATTR, nodeId2);
5350
+ }
5351
+ return null;
5352
+ }
5316
5353
  const nodeId = resolveStableNodeId(el, usedNodeIds);
5317
5354
  el.setAttribute(DND_NODE_ID_ATTR, nodeId);
5318
5355
  const parentEl = el.parentElement;
@@ -5195,6 +5195,36 @@ function scanElements(root, depth = 0, usedNodeIds = /* @__PURE__ */ new Set(),
5195
5195
  const minW = isExplicit ? INTERACTIVE_MIN : MIN_WIDTH;
5196
5196
  const minH = isExplicit ? INTERACTIVE_MIN : MIN_HEIGHT;
5197
5197
  if (rect.width < minW || rect.height < minH || rect.width === 0 || rect.height === 0) {
5198
+ const isZeroRect = rect.width === 0 || rect.height === 0;
5199
+ const smallEligibility = isInspectorEligible(el) ?? (projectUsageMeta(el) ? "projected-usage" : null);
5200
+ if (smallEligibility !== null && !seenResolvedHosts.has(el)) {
5201
+ const nodeId2 = resolveStableNodeId(el, usedNodeIds);
5202
+ usedNodeIds.add(nodeId2);
5203
+ el.setAttribute(DND_NODE_ID_ATTR, nodeId2);
5204
+ if (!isZeroRect) {
5205
+ seenResolvedHosts.add(el);
5206
+ const surfaceMeta2 = el instanceof HTMLElement ? getDirectEditorMeta(el) ?? void 0 : void 0;
5207
+ const identityMeta3 = projectUsageMeta(el) ?? surfaceMeta2;
5208
+ const selector = getUniqueSelector(el);
5209
+ const parentEl2 = el.parentElement;
5210
+ results.push({
5211
+ nodeId: nodeId2,
5212
+ element: el,
5213
+ selector,
5214
+ sourceMetaNodeId: identityMeta3?.nodeId ?? null,
5215
+ resolvedHostNodeId: nodeId2,
5216
+ resolvedHostSelector: selector,
5217
+ resolutionKind: "direct-host",
5218
+ label: getLabel(el),
5219
+ rect,
5220
+ containerStrategy: parentEl2 && isFlexOrGridParent(parentEl2) ? resolveContainerStrategy(parentEl2) : null,
5221
+ eligibilitySource: smallEligibility,
5222
+ draggable: false,
5223
+ identityOrigin: identityMeta3?.origin ?? null,
5224
+ editorMeta: surfaceMeta2
5225
+ });
5226
+ }
5227
+ }
5198
5228
  if (!isSvgRoot) results.push(...scanElements(el, depth + 1, usedNodeIds, seenResolvedHosts));
5199
5229
  continue;
5200
5230
  }
@@ -5277,7 +5307,14 @@ function scanElements(root, depth = 0, usedNodeIds = /* @__PURE__ */ new Set(),
5277
5307
  }
5278
5308
  function buildMovedElementEntry(el, usedNodeIds) {
5279
5309
  const rect = el.getBoundingClientRect();
5280
- if (rect.width === 0 || rect.height === 0) return null;
5310
+ if (rect.width === 0 || rect.height === 0) {
5311
+ if (isInspectorEligible(el) !== null || projectUsageMeta(el) !== null) {
5312
+ const nodeId2 = resolveStableNodeId(el, usedNodeIds);
5313
+ usedNodeIds.add(nodeId2);
5314
+ el.setAttribute(DND_NODE_ID_ATTR, nodeId2);
5315
+ }
5316
+ return null;
5317
+ }
5281
5318
  const nodeId = resolveStableNodeId(el, usedNodeIds);
5282
5319
  el.setAttribute(DND_NODE_ID_ATTR, nodeId);
5283
5320
  const parentEl = el.parentElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archie/devtools",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "DevTools for Archie generated applications - Route synchronization and editor communication",
5
5
  "repository": {
6
6
  "type": "git",