@depup/base44__vite-plugin 1.0.4-depup.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.
Files changed (167) hide show
  1. package/README.md +34 -0
  2. package/changes.json +22 -0
  3. package/compat/agents.cjs +13 -0
  4. package/compat/base44Client.cjs +6 -0
  5. package/compat/entities.cjs +25 -0
  6. package/compat/functions.cjs +9 -0
  7. package/compat/integrations.cjs +9 -0
  8. package/dist/ErrorOverlay.d.ts +12 -0
  9. package/dist/ErrorOverlay.d.ts.map +1 -0
  10. package/dist/ErrorOverlay.js +51 -0
  11. package/dist/ErrorOverlay.js.map +1 -0
  12. package/dist/bridge.d.ts +8 -0
  13. package/dist/bridge.d.ts.map +1 -0
  14. package/dist/bridge.js +8 -0
  15. package/dist/bridge.js.map +1 -0
  16. package/dist/capabilities/inline-edit/controller.d.ts +3 -0
  17. package/dist/capabilities/inline-edit/controller.d.ts.map +1 -0
  18. package/dist/capabilities/inline-edit/controller.js +203 -0
  19. package/dist/capabilities/inline-edit/controller.js.map +1 -0
  20. package/dist/capabilities/inline-edit/dom-utils.d.ts +7 -0
  21. package/dist/capabilities/inline-edit/dom-utils.d.ts.map +1 -0
  22. package/dist/capabilities/inline-edit/dom-utils.js +59 -0
  23. package/dist/capabilities/inline-edit/dom-utils.js.map +1 -0
  24. package/dist/capabilities/inline-edit/index.d.ts +3 -0
  25. package/dist/capabilities/inline-edit/index.d.ts.map +1 -0
  26. package/dist/capabilities/inline-edit/index.js +2 -0
  27. package/dist/capabilities/inline-edit/index.js.map +1 -0
  28. package/dist/capabilities/inline-edit/types.d.ts +29 -0
  29. package/dist/capabilities/inline-edit/types.d.ts.map +1 -0
  30. package/dist/capabilities/inline-edit/types.js +2 -0
  31. package/dist/capabilities/inline-edit/types.js.map +1 -0
  32. package/dist/consts.d.ts +11 -0
  33. package/dist/consts.d.ts.map +1 -0
  34. package/dist/consts.js +11 -0
  35. package/dist/consts.js.map +1 -0
  36. package/dist/error-overlay-plugin.d.ts +3 -0
  37. package/dist/error-overlay-plugin.d.ts.map +1 -0
  38. package/dist/error-overlay-plugin.js +15 -0
  39. package/dist/error-overlay-plugin.js.map +1 -0
  40. package/dist/html-injections-plugin.d.ts +8 -0
  41. package/dist/html-injections-plugin.d.ts.map +1 -0
  42. package/dist/html-injections-plugin.js +132 -0
  43. package/dist/html-injections-plugin.js.map +1 -0
  44. package/dist/index.d.ts +9 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +158 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/injections/layer-dropdown/consts.d.ts +20 -0
  49. package/dist/injections/layer-dropdown/consts.d.ts.map +1 -0
  50. package/dist/injections/layer-dropdown/consts.js +41 -0
  51. package/dist/injections/layer-dropdown/consts.js.map +1 -0
  52. package/dist/injections/layer-dropdown/controller.d.ts +4 -0
  53. package/dist/injections/layer-dropdown/controller.d.ts.map +1 -0
  54. package/dist/injections/layer-dropdown/controller.js +88 -0
  55. package/dist/injections/layer-dropdown/controller.js.map +1 -0
  56. package/dist/injections/layer-dropdown/dropdown-ui.d.ts +13 -0
  57. package/dist/injections/layer-dropdown/dropdown-ui.d.ts.map +1 -0
  58. package/dist/injections/layer-dropdown/dropdown-ui.js +186 -0
  59. package/dist/injections/layer-dropdown/dropdown-ui.js.map +1 -0
  60. package/dist/injections/layer-dropdown/types.d.ts +26 -0
  61. package/dist/injections/layer-dropdown/types.d.ts.map +1 -0
  62. package/dist/injections/layer-dropdown/types.js +3 -0
  63. package/dist/injections/layer-dropdown/types.js.map +1 -0
  64. package/dist/injections/layer-dropdown/utils.d.ts +25 -0
  65. package/dist/injections/layer-dropdown/utils.d.ts.map +1 -0
  66. package/dist/injections/layer-dropdown/utils.js +143 -0
  67. package/dist/injections/layer-dropdown/utils.js.map +1 -0
  68. package/dist/injections/navigation-notifier.d.ts +2 -0
  69. package/dist/injections/navigation-notifier.d.ts.map +1 -0
  70. package/dist/injections/navigation-notifier.js +34 -0
  71. package/dist/injections/navigation-notifier.js.map +1 -0
  72. package/dist/injections/sandbox-hmr-notifier.d.ts +2 -0
  73. package/dist/injections/sandbox-hmr-notifier.d.ts.map +1 -0
  74. package/dist/injections/sandbox-hmr-notifier.js +10 -0
  75. package/dist/injections/sandbox-hmr-notifier.js.map +1 -0
  76. package/dist/injections/sandbox-mount-observer.d.ts +2 -0
  77. package/dist/injections/sandbox-mount-observer.d.ts.map +1 -0
  78. package/dist/injections/sandbox-mount-observer.js +18 -0
  79. package/dist/injections/sandbox-mount-observer.js.map +1 -0
  80. package/dist/injections/unhandled-errors-handlers.d.ts +2 -0
  81. package/dist/injections/unhandled-errors-handlers.d.ts.map +1 -0
  82. package/dist/injections/unhandled-errors-handlers.js +93 -0
  83. package/dist/injections/unhandled-errors-handlers.js.map +1 -0
  84. package/dist/injections/utils.d.ts +65 -0
  85. package/dist/injections/utils.d.ts.map +1 -0
  86. package/dist/injections/utils.js +186 -0
  87. package/dist/injections/utils.js.map +1 -0
  88. package/dist/injections/visual-edit-agent.d.ts +2 -0
  89. package/dist/injections/visual-edit-agent.d.ts.map +1 -0
  90. package/dist/injections/visual-edit-agent.js +583 -0
  91. package/dist/injections/visual-edit-agent.js.map +1 -0
  92. package/dist/jsx-processor.d.ts +17 -0
  93. package/dist/jsx-processor.d.ts.map +1 -0
  94. package/dist/jsx-processor.js +129 -0
  95. package/dist/jsx-processor.js.map +1 -0
  96. package/dist/jsx-utils.d.ts +16 -0
  97. package/dist/jsx-utils.d.ts.map +1 -0
  98. package/dist/jsx-utils.js +98 -0
  99. package/dist/jsx-utils.js.map +1 -0
  100. package/dist/processors/collection-id-processor.d.ts +20 -0
  101. package/dist/processors/collection-id-processor.d.ts.map +1 -0
  102. package/dist/processors/collection-id-processor.js +182 -0
  103. package/dist/processors/collection-id-processor.js.map +1 -0
  104. package/dist/processors/collection-item-field-processor.d.ts +39 -0
  105. package/dist/processors/collection-item-field-processor.d.ts.map +1 -0
  106. package/dist/processors/collection-item-field-processor.js +289 -0
  107. package/dist/processors/collection-item-field-processor.js.map +1 -0
  108. package/dist/processors/collection-item-id-processor.d.ts +12 -0
  109. package/dist/processors/collection-item-id-processor.d.ts.map +1 -0
  110. package/dist/processors/collection-item-id-processor.js +50 -0
  111. package/dist/processors/collection-item-id-processor.js.map +1 -0
  112. package/dist/processors/static-array-processor.d.ts +28 -0
  113. package/dist/processors/static-array-processor.d.ts.map +1 -0
  114. package/dist/processors/static-array-processor.js +173 -0
  115. package/dist/processors/static-array-processor.js.map +1 -0
  116. package/dist/processors/utils/collection-tracing-utils.d.ts +36 -0
  117. package/dist/processors/utils/collection-tracing-utils.d.ts.map +1 -0
  118. package/dist/processors/utils/collection-tracing-utils.js +390 -0
  119. package/dist/processors/utils/collection-tracing-utils.js.map +1 -0
  120. package/dist/processors/utils/shared-utils.d.ts +96 -0
  121. package/dist/processors/utils/shared-utils.d.ts.map +1 -0
  122. package/dist/processors/utils/shared-utils.js +600 -0
  123. package/dist/processors/utils/shared-utils.js.map +1 -0
  124. package/dist/statics/index.mjs +16 -0
  125. package/dist/statics/index.mjs.map +1 -0
  126. package/dist/utils.d.ts +2 -0
  127. package/dist/utils.d.ts.map +1 -0
  128. package/dist/utils.js +22 -0
  129. package/dist/utils.js.map +1 -0
  130. package/dist/visual-edit-plugin.d.ts +3 -0
  131. package/dist/visual-edit-plugin.d.ts.map +1 -0
  132. package/dist/visual-edit-plugin.js +100 -0
  133. package/dist/visual-edit-plugin.js.map +1 -0
  134. package/package.json +75 -0
  135. package/src/ErrorOverlay.ts +71 -0
  136. package/src/bridge.ts +8 -0
  137. package/src/capabilities/inline-edit/controller.ts +254 -0
  138. package/src/capabilities/inline-edit/dom-utils.ts +58 -0
  139. package/src/capabilities/inline-edit/index.ts +2 -0
  140. package/src/capabilities/inline-edit/types.ts +35 -0
  141. package/src/consts.ts +11 -0
  142. package/src/error-overlay-plugin.ts +19 -0
  143. package/src/html-injections-plugin.ts +166 -0
  144. package/src/index.ts +225 -0
  145. package/src/injections/layer-dropdown/LAYERS.md +258 -0
  146. package/src/injections/layer-dropdown/consts.ts +51 -0
  147. package/src/injections/layer-dropdown/controller.ts +109 -0
  148. package/src/injections/layer-dropdown/dropdown-ui.ts +242 -0
  149. package/src/injections/layer-dropdown/types.ts +30 -0
  150. package/src/injections/layer-dropdown/utils.ts +175 -0
  151. package/src/injections/navigation-notifier.ts +43 -0
  152. package/src/injections/sandbox-hmr-notifier.ts +8 -0
  153. package/src/injections/sandbox-mount-observer.ts +25 -0
  154. package/src/injections/unhandled-errors-handlers.ts +114 -0
  155. package/src/injections/utils.ts +208 -0
  156. package/src/injections/visual-edit-agent.ts +706 -0
  157. package/src/jsx-processor.ts +169 -0
  158. package/src/jsx-utils.ts +131 -0
  159. package/src/processors/collection-id-processor.ts +261 -0
  160. package/src/processors/collection-item-field-processor.ts +439 -0
  161. package/src/processors/collection-item-id-processor.ts +69 -0
  162. package/src/processors/static-array-processor.ts +260 -0
  163. package/src/processors/utils/collection-tracing-utils.ts +507 -0
  164. package/src/processors/utils/shared-utils.ts +785 -0
  165. package/src/utils.ts +27 -0
  166. package/src/visual-edit-plugin.md +358 -0
  167. package/src/visual-edit-plugin.ts +110 -0
@@ -0,0 +1,186 @@
1
+ /** Dropdown UI component for layer navigation */
2
+ import { DROPDOWN_CONTAINER_STYLES, DROPDOWN_ITEM_BASE_STYLES, DROPDOWN_ITEM_ACTIVE_COLOR, DROPDOWN_ITEM_ACTIVE_BG, DROPDOWN_ITEM_ACTIVE_FONT_WEIGHT, DROPDOWN_ITEM_HOVER_BG, DEPTH_INDENT_PX, BASE_PADDING_PX, CHEVRON_COLLAPSED, CHEVRON_EXPANDED, CHEVRON_ATTR, LAYER_DROPDOWN_ATTR, } from "./consts.js";
3
+ import { applyStyles, getLayerDisplayName } from "./utils.js";
4
+ import { PLUGIN_ELEMENT_ATTR } from "../utils.js";
5
+ let activeDropdown = null;
6
+ let activeLabel = null;
7
+ let outsideMousedownHandler = null;
8
+ let activeOnHoverEnd = null;
9
+ let activeKeydownHandler = null;
10
+ function createDropdownItem(layer, isActive, { onSelect, onHover, onHoverEnd }) {
11
+ const item = document.createElement("div");
12
+ item.textContent = getLayerDisplayName(layer);
13
+ applyStyles(item, DROPDOWN_ITEM_BASE_STYLES);
14
+ const depth = layer.depth ?? 0;
15
+ if (depth > 0) {
16
+ item.style.paddingLeft = `${BASE_PADDING_PX + depth * DEPTH_INDENT_PX}px`;
17
+ }
18
+ if (isActive) {
19
+ item.style.color = DROPDOWN_ITEM_ACTIVE_COLOR;
20
+ item.style.backgroundColor = DROPDOWN_ITEM_ACTIVE_BG;
21
+ item.style.fontWeight = DROPDOWN_ITEM_ACTIVE_FONT_WEIGHT;
22
+ }
23
+ item.addEventListener("mouseenter", () => {
24
+ if (!isActive)
25
+ item.style.backgroundColor = DROPDOWN_ITEM_HOVER_BG;
26
+ if (onHover)
27
+ onHover(layer);
28
+ });
29
+ item.addEventListener("mouseleave", () => {
30
+ if (!isActive)
31
+ item.style.backgroundColor = "transparent";
32
+ if (onHoverEnd)
33
+ onHoverEnd();
34
+ });
35
+ item.addEventListener("click", (e) => {
36
+ e.stopPropagation();
37
+ e.preventDefault();
38
+ onSelect(layer);
39
+ });
40
+ return item;
41
+ }
42
+ /** Create the dropdown DOM element with layer items */
43
+ export function createDropdownElement(layers, currentElement, callbacks) {
44
+ const container = document.createElement("div");
45
+ container.setAttribute(LAYER_DROPDOWN_ATTR, "true");
46
+ container.setAttribute(PLUGIN_ELEMENT_ATTR, "true");
47
+ applyStyles(container, DROPDOWN_CONTAINER_STYLES);
48
+ layers.forEach((layer) => {
49
+ const isActive = layer.element === currentElement;
50
+ container.appendChild(createDropdownItem(layer, isActive, callbacks));
51
+ });
52
+ return container;
53
+ }
54
+ /** Add chevron indicator and pointer-events to the label */
55
+ export function enhanceLabelWithChevron(label) {
56
+ if (label.querySelector(`[${CHEVRON_ATTR}]`))
57
+ return;
58
+ const chevron = document.createElement("span");
59
+ chevron.setAttribute(CHEVRON_ATTR, "true");
60
+ chevron.style.display = "inline-flex";
61
+ chevron.innerHTML = CHEVRON_COLLAPSED;
62
+ label.appendChild(chevron);
63
+ label.style.display = "inline-flex";
64
+ label.style.alignItems = "center";
65
+ label.style.cursor = "pointer";
66
+ label.style.userSelect = "none";
67
+ label.style.whiteSpace = "nowrap";
68
+ label.style.pointerEvents = "auto";
69
+ label.setAttribute(LAYER_DROPDOWN_ATTR, "true");
70
+ label.setAttribute(PLUGIN_ELEMENT_ATTR, "true");
71
+ }
72
+ function setupKeyboardNavigation(dropdown, layers, currentElement, { onSelect, onHover, onHoverEnd }) {
73
+ const items = Array.from(dropdown.children);
74
+ let focusedIndex = layers.findIndex((l) => l.element === currentElement);
75
+ const setFocusedItem = (index) => {
76
+ if (focusedIndex >= 0 && focusedIndex < items.length) {
77
+ const prev = items[focusedIndex];
78
+ if (prev.style.color !== DROPDOWN_ITEM_ACTIVE_COLOR) {
79
+ prev.style.backgroundColor = "transparent";
80
+ }
81
+ }
82
+ focusedIndex = index;
83
+ if (focusedIndex >= 0 && focusedIndex < items.length) {
84
+ const cur = items[focusedIndex];
85
+ if (cur.style.color !== DROPDOWN_ITEM_ACTIVE_COLOR) {
86
+ cur.style.backgroundColor = DROPDOWN_ITEM_HOVER_BG;
87
+ }
88
+ cur.scrollIntoView({ block: "nearest" });
89
+ if (onHover && focusedIndex >= 0 && focusedIndex < layers.length) {
90
+ onHover(layers[focusedIndex]);
91
+ }
92
+ }
93
+ };
94
+ activeKeydownHandler = (e) => {
95
+ if (e.key === "ArrowDown") {
96
+ e.preventDefault();
97
+ e.stopPropagation();
98
+ setFocusedItem(focusedIndex < items.length - 1 ? focusedIndex + 1 : 0);
99
+ }
100
+ else if (e.key === "ArrowUp") {
101
+ e.preventDefault();
102
+ e.stopPropagation();
103
+ setFocusedItem(focusedIndex > 0 ? focusedIndex - 1 : items.length - 1);
104
+ }
105
+ else if (e.key === "Enter" && focusedIndex >= 0 && focusedIndex < layers.length) {
106
+ e.preventDefault();
107
+ e.stopPropagation();
108
+ if (onHoverEnd)
109
+ onHoverEnd();
110
+ onSelect(layers[focusedIndex]);
111
+ closeDropdown();
112
+ }
113
+ };
114
+ document.addEventListener("keydown", activeKeydownHandler, true);
115
+ }
116
+ function setupOutsideClickHandler(dropdown, label) {
117
+ let skipFirst = true;
118
+ outsideMousedownHandler = (e) => {
119
+ if (skipFirst) {
120
+ skipFirst = false;
121
+ return;
122
+ }
123
+ const target = e.target;
124
+ if (!dropdown.contains(target) && target !== label) {
125
+ closeDropdown();
126
+ }
127
+ };
128
+ document.addEventListener("mousedown", outsideMousedownHandler, true);
129
+ }
130
+ /** Show the dropdown below the label element */
131
+ export function showDropdown(label, layers, currentElement, callbacks) {
132
+ closeDropdown();
133
+ const dropdown = createDropdownElement(layers, currentElement, {
134
+ ...callbacks,
135
+ onSelect: (layer) => {
136
+ if (callbacks.onHoverEnd)
137
+ callbacks.onHoverEnd();
138
+ callbacks.onSelect(layer);
139
+ closeDropdown();
140
+ },
141
+ });
142
+ const overlay = label.parentElement;
143
+ if (!overlay)
144
+ return;
145
+ dropdown.style.top = `${label.offsetTop + label.offsetHeight + 2}px`;
146
+ dropdown.style.left = `${label.offsetLeft}px`;
147
+ overlay.appendChild(dropdown);
148
+ activeDropdown = dropdown;
149
+ activeLabel = label;
150
+ const chevronEl = label.querySelector(`[${CHEVRON_ATTR}]`);
151
+ if (chevronEl) {
152
+ chevronEl.innerHTML = CHEVRON_EXPANDED;
153
+ }
154
+ activeOnHoverEnd = callbacks.onHoverEnd ?? null;
155
+ setupKeyboardNavigation(dropdown, layers, currentElement, callbacks);
156
+ setupOutsideClickHandler(dropdown, label);
157
+ }
158
+ /** Close the active dropdown and clean up listeners */
159
+ export function closeDropdown() {
160
+ const chevronEl = activeLabel?.querySelector(`[${CHEVRON_ATTR}]`);
161
+ if (chevronEl) {
162
+ chevronEl.innerHTML = CHEVRON_COLLAPSED;
163
+ }
164
+ activeLabel = null;
165
+ if (activeOnHoverEnd) {
166
+ activeOnHoverEnd();
167
+ activeOnHoverEnd = null;
168
+ }
169
+ if (activeDropdown && activeDropdown.parentNode) {
170
+ activeDropdown.remove();
171
+ }
172
+ activeDropdown = null;
173
+ if (outsideMousedownHandler) {
174
+ document.removeEventListener("mousedown", outsideMousedownHandler, true);
175
+ outsideMousedownHandler = null;
176
+ }
177
+ if (activeKeydownHandler) {
178
+ document.removeEventListener("keydown", activeKeydownHandler, true);
179
+ activeKeydownHandler = null;
180
+ }
181
+ }
182
+ /** Check if a dropdown is currently visible */
183
+ export function isDropdownOpen() {
184
+ return activeDropdown !== null;
185
+ }
186
+ //# sourceMappingURL=dropdown-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-ui.js","sourceRoot":"","sources":["../../../src/injections/layer-dropdown/dropdown-ui.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,IAAI,cAAc,GAA0B,IAAI,CAAC;AACjD,IAAI,WAAW,GAA0B,IAAI,CAAC;AAC9C,IAAI,uBAAuB,GAAqC,IAAI,CAAC;AACrE,IAAI,gBAAgB,GAAwB,IAAI,CAAC;AACjD,IAAI,oBAAoB,GAAwC,IAAI,CAAC;AAErE,SAAS,kBAAkB,CACzB,KAAgB,EAChB,QAAiB,EACjB,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAqB;IAEpD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,WAAW,GAAG,mBAA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 -0,0 +1,26 @@
1
+ /** Shared types for the layer-dropdown module */
2
+ export interface LayerInfo {
3
+ element: Element;
4
+ tagName: string;
5
+ selectorId: string | null;
6
+ depth?: number;
7
+ }
8
+ export type OnLayerSelect = (layer: LayerInfo) => void;
9
+ export type OnLayerHover = (layer: LayerInfo) => void;
10
+ export type OnLayerHoverEnd = () => void;
11
+ export interface DropdownCallbacks {
12
+ onSelect: OnLayerSelect;
13
+ onHover?: OnLayerHover;
14
+ onHoverEnd?: OnLayerHoverEnd;
15
+ }
16
+ export interface LayerControllerConfig {
17
+ createPreviewOverlay: (element: Element) => HTMLDivElement;
18
+ getSelectedElementId: () => string | null;
19
+ selectElement: (element: Element) => HTMLDivElement | undefined;
20
+ onDeselect: () => void;
21
+ }
22
+ export interface LayerController {
23
+ attachToOverlay: (overlay: HTMLDivElement | undefined, element: Element) => void;
24
+ cleanup: () => void;
25
+ }
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/injections/layer-dropdown/types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;AACtD,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,cAAc,CAAC;IAC3D,oBAAoB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC1C,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,cAAc,GAAG,SAAS,CAAC;IAChE,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
@@ -0,0 +1,3 @@
1
+ /** Shared types for the layer-dropdown module */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/injections/layer-dropdown/types.ts"],"names":[],"mappings":"AAAA,iDAAiD"}
@@ -0,0 +1,25 @@
1
+ /** DOM utilities for the layer-dropdown module */
2
+ import type { LayerInfo } from "./types.js";
3
+ /** Apply a style map to an element */
4
+ export declare function applyStyles(element: HTMLElement, styles: Record<string, string>): void;
5
+ /** Display name for a layer — just the real tag name */
6
+ export declare function getLayerDisplayName(layer: LayerInfo): string;
7
+ /**
8
+ * Collect instrumented descendants up to `maxDepth` instrumented nesting levels.
9
+ * Non-instrumented wrappers are walked through without counting toward depth.
10
+ * Results are in DOM order.
11
+ * When `startDepth` is provided, assigns `depth` to each item during collection.
12
+ */
13
+ export declare function getInstrumentedDescendants(parent: Element, maxDepth: number, startDepth?: number): LayerInfo[];
14
+ /**
15
+ * Build the layer chain for the dropdown:
16
+ *
17
+ * Parents – up to MAX_PARENT_DEPTH instrumented ancestors, outer → inner.
18
+ * Siblings – instrumented children of the immediate parent, at the same depth.
19
+ * Current – the selected element (highlighted), with children expanded.
20
+ * Children – instrumented descendants within MAX_CHILD_DEPTH levels, DOM order.
21
+ *
22
+ * Each item carries a `depth` for visual indentation.
23
+ */
24
+ export declare function buildLayerChain(selectedElement: Element): LayerInfo[];
25
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/injections/layer-dropdown/utils.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAKlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,sCAAsC;AACtC,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAOtF;AAED,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAE5D;AAYD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,SAAS,EAAE,CA0Bb;AAkFD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,EAAE,CAcrE"}
@@ -0,0 +1,143 @@
1
+ /** DOM utilities for the layer-dropdown module */
2
+ import { isInstrumentedElement, getElementSelectorId } from "../utils.js";
3
+ import { MAX_PARENT_DEPTH, MAX_CHILD_DEPTH } from "./consts.js";
4
+ /** Apply a style map to an element */
5
+ export function applyStyles(element, styles) {
6
+ for (const key of Object.keys(styles)) {
7
+ element.style.setProperty(key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`), styles[key]);
8
+ }
9
+ }
10
+ /** Display name for a layer — just the real tag name */
11
+ export function getLayerDisplayName(layer) {
12
+ return layer.tagName;
13
+ }
14
+ function toLayerInfo(element, depth) {
15
+ const info = {
16
+ element,
17
+ tagName: element.tagName.toLowerCase(),
18
+ selectorId: getElementSelectorId(element),
19
+ };
20
+ if (depth !== undefined)
21
+ info.depth = depth;
22
+ return info;
23
+ }
24
+ /**
25
+ * Collect instrumented descendants up to `maxDepth` instrumented nesting levels.
26
+ * Non-instrumented wrappers are walked through without counting toward depth.
27
+ * Results are in DOM order.
28
+ * When `startDepth` is provided, assigns `depth` to each item during collection.
29
+ */
30
+ export function getInstrumentedDescendants(parent, maxDepth, startDepth) {
31
+ const result = [];
32
+ function walk(el, instrDepth) {
33
+ if (instrDepth > maxDepth)
34
+ return;
35
+ for (let i = 0; i < el.children.length; i++) {
36
+ const child = el.children[i];
37
+ if (isInstrumentedElement(child)) {
38
+ const info = {
39
+ element: child,
40
+ tagName: child.tagName.toLowerCase(),
41
+ selectorId: getElementSelectorId(child),
42
+ };
43
+ if (startDepth !== undefined) {
44
+ info.depth = startDepth + instrDepth - 1;
45
+ }
46
+ result.push(info);
47
+ walk(child, instrDepth + 1);
48
+ }
49
+ else {
50
+ walk(child, instrDepth);
51
+ }
52
+ }
53
+ }
54
+ walk(parent, 1);
55
+ return result;
56
+ }
57
+ /** Collect instrumented ancestors from selected element up to MAX_PARENT_DEPTH (outermost first). */
58
+ function collectInstrumentedParents(selectedElement) {
59
+ const parents = [];
60
+ let current = selectedElement.parentElement;
61
+ while (current &&
62
+ current !== document.documentElement &&
63
+ current !== document.body &&
64
+ parents.length < MAX_PARENT_DEPTH) {
65
+ if (isInstrumentedElement(current)) {
66
+ parents.push(toLayerInfo(current));
67
+ }
68
+ current = current.parentElement;
69
+ }
70
+ parents.reverse();
71
+ return parents;
72
+ }
73
+ /** Add parents to chain with depth 0, 1, …; returns depth of selected (parents.length). */
74
+ function addParentsToChain(chain, parents) {
75
+ parents.forEach((p, i) => {
76
+ chain.push({ ...p, depth: i });
77
+ });
78
+ return parents.length;
79
+ }
80
+ /** Add selected element and its descendants at the given depth. */
81
+ function addSelfAndDescendantsToChain(chain, selectedElement, selfDepth) {
82
+ chain.push(toLayerInfo(selectedElement, selfDepth));
83
+ const descendants = getInstrumentedDescendants(selectedElement, MAX_CHILD_DEPTH, selfDepth + 1);
84
+ chain.push(...descendants);
85
+ }
86
+ /** Get the innermost instrumented parent's DOM element, or null if none. */
87
+ function getImmediateInstrParent(parents) {
88
+ return parents.at(-1)?.element ?? null;
89
+ }
90
+ /** Collect instrumented siblings of the selected element from its parent (DOM order). */
91
+ function collectSiblings(parent, selectedElement) {
92
+ const siblings = getInstrumentedDescendants(parent, 1);
93
+ if (!siblings.some((s) => s.element === selectedElement)) {
94
+ siblings.push(toLayerInfo(selectedElement));
95
+ }
96
+ return siblings;
97
+ }
98
+ /** Add siblings at selfDepth, expanding children only for the selected element. */
99
+ function appendSiblingsWithSelected(chain, siblings, selectedElement, selfDepth) {
100
+ const selectedSelectorId = getElementSelectorId(selectedElement);
101
+ const seen = new Set();
102
+ for (const sibling of siblings) {
103
+ if (sibling.element === selectedElement) {
104
+ addSelfAndDescendantsToChain(chain, selectedElement, selfDepth);
105
+ if (selectedSelectorId)
106
+ seen.add(selectedSelectorId);
107
+ }
108
+ else {
109
+ const id = sibling.selectorId;
110
+ if (id != null) {
111
+ if (id === selectedSelectorId || seen.has(id))
112
+ continue;
113
+ seen.add(id);
114
+ }
115
+ chain.push({ ...sibling, depth: selfDepth });
116
+ }
117
+ }
118
+ }
119
+ /**
120
+ * Build the layer chain for the dropdown:
121
+ *
122
+ * Parents – up to MAX_PARENT_DEPTH instrumented ancestors, outer → inner.
123
+ * Siblings – instrumented children of the immediate parent, at the same depth.
124
+ * Current – the selected element (highlighted), with children expanded.
125
+ * Children – instrumented descendants within MAX_CHILD_DEPTH levels, DOM order.
126
+ *
127
+ * Each item carries a `depth` for visual indentation.
128
+ */
129
+ export function buildLayerChain(selectedElement) {
130
+ const parents = collectInstrumentedParents(selectedElement);
131
+ const chain = [];
132
+ const selfDepth = addParentsToChain(chain, parents);
133
+ const instrParent = getImmediateInstrParent(parents);
134
+ if (instrParent) {
135
+ const siblings = collectSiblings(instrParent, selectedElement);
136
+ appendSiblingsWithSelected(chain, siblings, selectedElement, selfDepth);
137
+ }
138
+ else {
139
+ addSelfAndDescendantsToChain(chain, selectedElement, selfDepth);
140
+ }
141
+ return chain;
142
+ }
143
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/injections/layer-dropdown/utils.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAIhE,sCAAsC;AACtC,MAAM,UAAU,WAAW,CAAC,OAAoB,EAAE,MAA8B;IAC9E,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,OAAO,CAAC,KAAK,CAAC,WAAW,CACvB,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EACnD,MAAM,CAAC,GAAG,CAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,mBAAmB,CAAC,KAAgB;IAClD,OAAO,KAAK,CAAC,OAAO,CAAC;AACvB,CAAC;AAED,SAAS,WAAW,CAAC,OAAgB,EAAE,KAAc;IACnD,MAAM,IAAI,GAAc;QACtB,OAAO;QACP,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE;QACtC,UAAU,EAAE,oBAAoB,CAAC,OAAO,CAAC;KAC1C,CAAC;IACF,IAAI,KAAK,KAAK,SAAS;QAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5C,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAe,EACf,QAAgB,EAChB,UAAmB;IAEnB,MAAM,MAAM,GAAgB,EAAE,CAAC;IAE/B,SAAS,IAAI,CAAC,EAAW,EAAE,UAAkB;QAC3C,IAAI,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0BAA0B,CAAC,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;IAC1E,CAAC;SAAM,CAAC;QACN,4BAA4B,CAAC,KAAK,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=navigation-notifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-notifier.d.ts","sourceRoot":"","sources":["../../src/injections/navigation-notifier.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ if (window.self !== window.top) {
2
+ let lastUrl = window.location.href;
3
+ function notifyNavigation() {
4
+ const currentUrl = window.location.href;
5
+ if (currentUrl !== lastUrl) {
6
+ lastUrl = currentUrl;
7
+ window.parent?.postMessage({
8
+ type: "app_changed_url",
9
+ url: currentUrl,
10
+ }, "*");
11
+ }
12
+ }
13
+ // Intercept history.pushState
14
+ const originalPushState = history.pushState.bind(history);
15
+ history.pushState = function (...args) {
16
+ originalPushState(...args);
17
+ notifyNavigation();
18
+ };
19
+ // Intercept history.replaceState
20
+ const originalReplaceState = history.replaceState.bind(history);
21
+ history.replaceState = function (...args) {
22
+ originalReplaceState(...args);
23
+ notifyNavigation();
24
+ };
25
+ // Handle browser back/forward navigation
26
+ window.addEventListener("popstate", notifyNavigation);
27
+ // Notify initial URL on load
28
+ window.parent?.postMessage({
29
+ type: "app_changed_url",
30
+ url: window.location.href,
31
+ }, "*");
32
+ }
33
+ export {};
34
+ //# sourceMappingURL=navigation-notifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-notifier.js","sourceRoot":"","sources":["../../src/injections/navigation-notifier.ts"],"names":[],"mappings":"AAAA,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC;IAC/B,IAAI,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAEnC,SAAS,gBAAgB;QACvB,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxC,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;YAC3B,OAAO,GAAG,UAAU,CAAC;YACrB,MAAM,CAAC,MAAM,EAAE,WAAW,CACxB;gBACE,IAAI,EAAE,iBAAiB;gBACvB,GAAG,EAAE,UAAU;aAChB,EACD,GAAG,CACJ,CAAC;QACJ,CAAC;IACH,CAAC;IAED,8BAA8B;IAC9B,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,OAAO,CAAC,SAAS,GAAG,UAAU,GAAG,IAAI;QACnC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAAC;QAC3B,gBAAgB,EAAE,CAAC;IACrB,CAAC,CAAC;IAEF,iCAAiC;IACjC,MAAM,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,OAAO,CAAC,YAAY,GAAG,UAAU,GAAG,IAAI;QACtC,oBAAoB,CAAC,GAAG,IAAI,CAAC,CAAC;QAC9B,gBAAgB,EAAE,CAAC;IACrB,CAAC,CAAC;IAEF,yCAAyC;IACzC,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAEtD,6BAA6B;IAC7B,MAAM,CAAC,MAAM,EAAE,WAAW,CACxB;QACE,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;KAC1B,EACD,GAAG,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sandbox-hmr-notifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-hmr-notifier.d.ts","sourceRoot":"","sources":["../../src/injections/sandbox-hmr-notifier.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ if (import.meta.hot) {
2
+ import.meta.hot.on("vite:beforeUpdate", () => {
3
+ window.parent?.postMessage({ type: "sandbox:beforeUpdate" }, "*");
4
+ });
5
+ import.meta.hot.on("vite:afterUpdate", () => {
6
+ window.parent?.postMessage({ type: "sandbox:afterUpdate" }, "*");
7
+ });
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=sandbox-hmr-notifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-hmr-notifier.js","sourceRoot":"","sources":["../../src/injections/sandbox-hmr-notifier.ts"],"names":[],"mappings":"AAAA,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,EAAE,GAAG,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC1C,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,EAAE,GAAG,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sandbox-mount-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-mount-observer.d.ts","sourceRoot":"","sources":["../../src/injections/sandbox-mount-observer.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ if (window.self !== window.top) {
2
+ const observer = new MutationObserver((mutations) => {
3
+ const nodesAdded = mutations.some((mutation) => mutation.addedNodes.length > 0);
4
+ const nodesRemoved = mutations.some((mutation) => mutation.removedNodes.length > 0);
5
+ if (nodesAdded || nodesRemoved) {
6
+ const foundElmWithDataAttribute = document.body.querySelectorAll("[data-source-location], [data-dynamic-content]").length > 0;
7
+ if (foundElmWithDataAttribute) {
8
+ window.parent?.postMessage({ type: "sandbox:onMounted" }, "*");
9
+ }
10
+ else {
11
+ window.parent?.postMessage({ type: "sandbox:onUnmounted" }, "*");
12
+ }
13
+ }
14
+ });
15
+ observer.observe(document.body, { childList: true, subtree: true });
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=sandbox-mount-observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-mount-observer.js","sourceRoot":"","sources":["../../src/injections/sandbox-mount-observer.ts"],"names":[],"mappings":"AACA,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;QAClD,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAC/B,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAC7C,CAAC;QACF,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CACjC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAC/C,CAAC;QACF,IAAI,UAAU,IAAI,YAAY,EAAE,CAAC;YAC/B,MAAM,yBAAyB,GAC7B,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAC5B,gDAAgD,CACjD,CAAC,MAAM,GAAG,CAAC,CAAC;YAEf,IAAI,yBAAyB,EAAE,CAAC;gBAC9B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAAE,GAAG,CAAC,CAAC;YACjE,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,EAAE,GAAG,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=unhandled-errors-handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unhandled-errors-handlers.d.ts","sourceRoot":"","sources":["../../src/injections/unhandled-errors-handlers.ts"],"names":[],"mappings":""}
@@ -0,0 +1,93 @@
1
+ /// <reference types="vite/client" />
2
+ window.removeEventListener("unhandledrejection", handleUnhandledRejection);
3
+ window.removeEventListener("error", handleWindowError);
4
+ window.addEventListener("unhandledrejection", handleUnhandledRejection);
5
+ window.addEventListener("error", handleWindowError);
6
+ let shouldPropagateErrors = true;
7
+ let suppressionTimer = null;
8
+ let hadSuppressedErrors = false;
9
+ if (import.meta.hot) {
10
+ import.meta.hot.on("vite:beforeUpdate", () => {
11
+ shouldPropagateErrors = false;
12
+ hadSuppressedErrors = false;
13
+ if (suppressionTimer) {
14
+ clearTimeout(suppressionTimer);
15
+ }
16
+ suppressionTimer = setTimeout(() => {
17
+ shouldPropagateErrors = true;
18
+ suppressionTimer = null;
19
+ hadSuppressedErrors = false;
20
+ // No vite:afterUpdate after timeout — treat the stuck update as an error
21
+ window.parent?.postMessage({ type: "sandbox:hmrErrorsSuppressed" }, "*");
22
+ }, import.meta.env.VITE_HMR_ERROR_SUPPRESSION_DELAY ?? 10000);
23
+ });
24
+ import.meta.hot.on("vite:afterUpdate", () => {
25
+ shouldPropagateErrors = true;
26
+ if (suppressionTimer) {
27
+ clearTimeout(suppressionTimer);
28
+ suppressionTimer = null;
29
+ }
30
+ if (hadSuppressedErrors) {
31
+ window.parent?.postMessage({ type: "sandbox:hmrErrorsSuppressed" }, "*");
32
+ hadSuppressedErrors = false;
33
+ }
34
+ });
35
+ import.meta.hot.on("vite:beforeFullReload", () => {
36
+ shouldPropagateErrors = false;
37
+ hadSuppressedErrors = false;
38
+ if (suppressionTimer) {
39
+ clearTimeout(suppressionTimer);
40
+ suppressionTimer = null;
41
+ }
42
+ });
43
+ }
44
+ function onAppError({ title, details, componentName, originalError, }) {
45
+ if (originalError?.response?.status === 402) {
46
+ return;
47
+ }
48
+ if (!shouldPropagateErrors) {
49
+ hadSuppressedErrors = true;
50
+ return;
51
+ }
52
+ window.parent?.postMessage({
53
+ type: "app_error",
54
+ error: {
55
+ title: title.toString(),
56
+ details: details?.toString(),
57
+ componentName: componentName?.toString(),
58
+ stack: originalError?.stack?.toString(),
59
+ },
60
+ }, "*");
61
+ }
62
+ function handleUnhandledRejection(event) {
63
+ const stack = event.reason.stack;
64
+ // extract function name from "at X (eval" where x is the function name
65
+ const functionName = stack.match(/at\s+(\w+)\s+\(eval/)?.[1];
66
+ const msg = functionName
67
+ ? `Error in ${functionName}: ${event.reason.toString()}`
68
+ : event.reason.toString();
69
+ onAppError({
70
+ title: msg,
71
+ details: event.reason.toString(),
72
+ componentName: functionName,
73
+ originalError: event.reason,
74
+ });
75
+ }
76
+ function handleWindowError(event) {
77
+ const stack = event.error?.stack;
78
+ let functionName = stack.match(/at\s+(\w+)\s+\(eval/)?.[1];
79
+ if (functionName === "eval") {
80
+ functionName = null;
81
+ }
82
+ const msg = functionName
83
+ ? `in ${functionName}: ${event.error.toString()}`
84
+ : event.error.toString();
85
+ onAppError({
86
+ title: msg,
87
+ details: event.error.toString(),
88
+ componentName: functionName,
89
+ originalError: event.error,
90
+ });
91
+ }
92
+ export {};
93
+ //# sourceMappingURL=unhandled-errors-handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unhandled-errors-handlers.js","sourceRoot":"","sources":["../../src/injections/unhandled-errors-handlers.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC;AAC3E,MAAM,CAAC,mBAAmB,CAAC,OAAO,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