@nika-js/onlymap 0.4.6 → 0.5.0

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.
@@ -55,6 +55,9 @@ export declare class OmMapElement extends HTMLElementBase {
55
55
  private errorPanel;
56
56
  private runtimeErrors;
57
57
  private readyFired;
58
+ private visibleSizeChecked;
59
+ /** Custom-state holder for the `om-collapsed` height-floor marker — see applyHeightFloor. */
60
+ private internals;
58
61
  private resolveReady;
59
62
  readonly ready: Promise<void>;
60
63
  private readonly viewSettle;
@@ -284,6 +287,33 @@ export declare class OmMapElement extends HTMLElementBase {
284
287
  private dispatchRendererLoad;
285
288
  /** Fires `om-map-ready` / resolves `.ready` once the first reconcile ran, the renderer is up, and no declared data URL is still loading. */
286
289
  private checkReady;
290
+ /**
291
+ * Per-element half of the base-layout guardrail: mark the host `om-collapsed`
292
+ * so the layered `min-height` floor applies, but ONLY while it genuinely
293
+ * measures zero. Gating the floor this way is what lets an explicit author
294
+ * height win outright — a map with any height never carries the state, so the
295
+ * floor rule never matches it and a 300px map stays 300px.
296
+ *
297
+ * Clear-then-re-measure makes it idempotent and self-correcting: the connect-
298
+ * time call runs mid-parse, where a parent sized by later siblings still
299
+ * measures zero, and the post-ready call drops a floor that turned out to be
300
+ * unnecessary.
301
+ *
302
+ * A custom state rather than an attribute or inline style, deliberately: the
303
+ * host's own MutationObserver treats attribute writes as manifest edits (a
304
+ * reconcile), history.ts records them as undo steps, and either would
305
+ * serialize into a saved manifest. A custom state touches none of that.
306
+ */
307
+ private applyHeightFloor;
308
+ /**
309
+ * First-shot guardrail: warn (once) if the map has no visible size once it is
310
+ * ready. The base-layout default covers a bare `<om-map>`, but a constrained
311
+ * parent (a 0-height flex/grid cell, `height:100%` under an unsized ancestor)
312
+ * can still collapse it — a silent blank map otherwise.
313
+ * Skipped headless: jsdom/happy-dom report 0×0 by design, and `mountForTest`
314
+ * sets the `headless` attribute, so this never fires in the test harness.
315
+ */
316
+ private checkVisibleSize;
287
317
  private pickPayload;
288
318
  /**
289
319
  * Dispatches to every `<om-behavior on="eventName">` (live-queried, like
@@ -1,4 +1,4 @@
1
- import { ac as _t, ad as Ct } from "./index-DSkgI4Oc.js";
1
+ import { ac as _t, ad as Ct } from "./index-DiYFebYs.js";
2
2
  function Yt(e, r, t = 2, i, o = "xy") {
3
3
  const s = r && r.length, l = s ? r[0] * t : e.length;
4
4
  let c = Ut(e, 0, l, t, !0, i && i[0], o);