pagepilot-visual-editor 1.0.17 → 1.0.18

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.
@@ -123,7 +123,7 @@ export type ContainerProps = z.infer<typeof ContainerPropsSchema> & {
123
123
  };
124
124
  export declare const ContainerPropsDefaults: {
125
125
  readonly fullWidth: false;
126
- readonly widthType: "fit";
126
+ readonly widthType: "fill";
127
127
  readonly width: 300;
128
128
  readonly widthUnit: "px";
129
129
  readonly alignment: "left";
@@ -18,5 +18,6 @@ export declare const BLOCK_STYLES: Array<{
18
18
  }>;
19
19
  export declare const BLOCK_TAG_SHORT_LABEL: Record<string, string>;
20
20
  export declare const BLOCK_LEVEL_TAGS: Set<string>;
21
+ export declare const BLOCK_TAG_DEFAULT_FONT_SIZE: Record<string, number>;
21
22
  export declare const BLOCK_PREVIEW_STYLE: Record<string, React.CSSProperties>;
22
23
  export declare const COMPACT_THRESHOLD = 1180;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Ensures only one toolbar dropdown/popover is open at a time.
3
+ *
4
+ * Each Dropdown/ColorSwatchPopover instance manages its own open state and
5
+ * its own outside-click listener independently, with no built-in awareness
6
+ * of sibling instances. Without coordination, opening one while another is
7
+ * already open leaves the first one's state stuck `open=true` (just visually
8
+ * covered), which can produce stale toggle behavior on the next click. This
9
+ * module lets each instance register a `closeSelf` callback while mounted
10
+ * and broadcast "I'm opening" so every other registered instance closes.
11
+ */
12
+ type CloseFn = () => void;
13
+ export declare function registerDropdownInstance(closeSelf: CloseFn): () => void;
14
+ /**
15
+ * Closes every currently-registered (i.e. open) instance. Callers invoke
16
+ * this right before opening themselves, at which point they are not yet
17
+ * registered (registration only happens while `open === true`), so there
18
+ * is no need to exclude "self" here.
19
+ */
20
+ export declare function closeAllDropdowns(): void;
21
+ export {};
@@ -13,7 +13,17 @@
13
13
  */
14
14
  export declare function isRangeInside(range: Range | null, el: HTMLElement | null): boolean;
15
15
  export declare function saveSelectionInside(el: HTMLElement | null): Range | null;
16
- export declare function restoreSelection(range: Range | null, el: HTMLElement | null): void;
16
+ /**
17
+ * Restores a previously-saved range and reports whether it actually landed
18
+ * inside `el`. A range captured before a DOM-mutating command (span
19
+ * replacement, unwrapping, etc.) can end up pointing at nodes that no
20
+ * longer exist by the time the NEXT command runs — `addRange` on a
21
+ * detached range either throws (caught below) or silently produces a
22
+ * selection outside `el`. Callers use the return value to fall back to a
23
+ * known-good position instead of proceeding on a selection that isn't
24
+ * really there.
25
+ */
26
+ export declare function restoreSelection(range: Range | null, el: HTMLElement | null): boolean;
17
27
  /**
18
28
  * Read the actual applied color at the caret, preserving alpha.
19
29
  *