@greypan/web-ui 6.4.0 → 8.0.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 (148) hide show
  1. package/README.CN.md +211 -50
  2. package/README.md +222 -61
  3. package/dist/assets/glass.js +1 -1
  4. package/dist/assets/glass.js.map +1 -1
  5. package/dist/assets/selection-control.js +6 -0
  6. package/dist/assets/selection-control.js.map +1 -0
  7. package/dist/assets/toast-containers.js.map +1 -1
  8. package/dist/components/autocomplete/index.d.ts +19 -5
  9. package/dist/components/autocomplete/index.js +142 -108
  10. package/dist/components/autocomplete/index.js.map +1 -1
  11. package/dist/components/autocomplete/style.js +1 -1
  12. package/dist/components/autocomplete/style.js.map +1 -1
  13. package/dist/components/avatar/index.js +4 -4
  14. package/dist/components/badge/style.js.map +1 -1
  15. package/dist/components/button/index.js +15 -15
  16. package/dist/components/button/style.js.map +1 -1
  17. package/dist/components/button-group/index.js +5 -5
  18. package/dist/components/checkbox/index.d.ts +9 -2
  19. package/dist/components/checkbox/index.js +50 -26
  20. package/dist/components/checkbox/index.js.map +1 -1
  21. package/dist/components/checkbox/style.js +1 -1
  22. package/dist/components/checkbox/style.js.map +1 -1
  23. package/dist/components/checkbox-group/index.d.ts +3 -0
  24. package/dist/components/checkbox-group/index.js +27 -16
  25. package/dist/components/checkbox-group/index.js.map +1 -1
  26. package/dist/components/checkbox-group/style.js +1 -1
  27. package/dist/components/checkbox-group/style.js.map +1 -1
  28. package/dist/components/collapse/index.js.map +1 -1
  29. package/dist/components/context-menu/index.d.ts +10 -0
  30. package/dist/components/context-menu/index.js +51 -34
  31. package/dist/components/context-menu/index.js.map +1 -1
  32. package/dist/components/dialog/index.d.ts +6 -0
  33. package/dist/components/dialog/index.js +49 -21
  34. package/dist/components/dialog/index.js.map +1 -1
  35. package/dist/components/dialog/style.js +1 -1
  36. package/dist/components/dialog/style.js.map +1 -1
  37. package/dist/components/drawer/index.d.ts +22 -4
  38. package/dist/components/drawer/index.js +141 -110
  39. package/dist/components/drawer/index.js.map +1 -1
  40. package/dist/components/drawer/style.js +1 -1
  41. package/dist/components/drawer/style.js.map +1 -1
  42. package/dist/components/dropdown/index.d.ts +21 -1
  43. package/dist/components/dropdown/index.js +77 -51
  44. package/dist/components/dropdown/index.js.map +1 -1
  45. package/dist/components/editable-text/index.d.ts +471 -0
  46. package/dist/components/editable-text/index.js +206 -0
  47. package/dist/components/editable-text/index.js.map +1 -0
  48. package/dist/components/editable-text/style.js +6 -0
  49. package/dist/components/editable-text/style.js.map +1 -0
  50. package/dist/components/image-preview/index.js +103 -80
  51. package/dist/components/image-preview/index.js.map +1 -1
  52. package/dist/components/image-preview/style.js +1 -1
  53. package/dist/components/image-preview/style.js.map +1 -1
  54. package/dist/components/index.d.ts +1 -0
  55. package/dist/components/index.js +39 -38
  56. package/dist/components/input/index.d.ts +2 -0
  57. package/dist/components/input/index.js +12 -6
  58. package/dist/components/input/index.js.map +1 -1
  59. package/dist/components/input/style.js.map +1 -1
  60. package/dist/components/input-number/index.js +15 -15
  61. package/dist/components/layout/index.js +9 -9
  62. package/dist/components/layout/index.js.map +1 -1
  63. package/dist/components/layout/style.js +1 -1
  64. package/dist/components/layout/style.js.map +1 -1
  65. package/dist/components/popover/index.d.ts +8 -2
  66. package/dist/components/popover/index.js +53 -55
  67. package/dist/components/popover/index.js.map +1 -1
  68. package/dist/components/radio/index.d.ts +1 -1
  69. package/dist/components/radio/index.js +22 -21
  70. package/dist/components/radio/index.js.map +1 -1
  71. package/dist/components/radio/style.js +1 -1
  72. package/dist/components/radio/style.js.map +1 -1
  73. package/dist/components/radio-group/index.d.ts +3 -0
  74. package/dist/components/radio-group/index.js +27 -16
  75. package/dist/components/radio-group/index.js.map +1 -1
  76. package/dist/components/radio-group/style.js +1 -1
  77. package/dist/components/radio-group/style.js.map +1 -1
  78. package/dist/components/segmented/index.d.ts +4 -1
  79. package/dist/components/segmented/index.js +42 -29
  80. package/dist/components/segmented/index.js.map +1 -1
  81. package/dist/components/segmented/style.js +1 -1
  82. package/dist/components/segmented/style.js.map +1 -1
  83. package/dist/components/segmented-trigger/style.js +1 -1
  84. package/dist/components/segmented-trigger/style.js.map +1 -1
  85. package/dist/components/select/index.d.ts +2 -0
  86. package/dist/components/select/index.js +38 -34
  87. package/dist/components/select/index.js.map +1 -1
  88. package/dist/components/slider/index.js +11 -11
  89. package/dist/components/slider/index.js.map +1 -1
  90. package/dist/components/slider/style.js +1 -1
  91. package/dist/components/slider/style.js.map +1 -1
  92. package/dist/components/svg-draw-lines/index.d.ts +13 -2
  93. package/dist/components/svg-draw-lines/index.js +44 -31
  94. package/dist/components/svg-draw-lines/index.js.map +1 -1
  95. package/dist/components/switch/index.js +12 -12
  96. package/dist/components/switch/index.js.map +1 -1
  97. package/dist/components/switch/style.js.map +1 -1
  98. package/dist/components/textarea/index.js +6 -6
  99. package/dist/components/textarea/index.js.map +1 -1
  100. package/dist/components/textarea/style.js.map +1 -1
  101. package/dist/components/theme/index.d.ts +15 -0
  102. package/dist/components/theme/index.js +178 -21
  103. package/dist/components/theme/index.js.map +1 -1
  104. package/dist/components/theme/style.js +1 -1
  105. package/dist/components/theme/style.js.map +1 -1
  106. package/dist/components/toast/index.d.ts +1 -1
  107. package/dist/components/toast/manager.d.ts +1 -3
  108. package/dist/components/toast/manager.js +92 -49
  109. package/dist/components/toast/manager.js.map +1 -1
  110. package/dist/components/toast/style.js.map +1 -1
  111. package/dist/components/toast/toast.d.ts +37 -0
  112. package/dist/components/toast/toast.js +74 -21
  113. package/dist/components/toast/toast.js.map +1 -1
  114. package/dist/components/toast/types.d.ts +0 -4
  115. package/dist/components/tooltip/index.d.ts +6 -1
  116. package/dist/components/tooltip/index.js +21 -19
  117. package/dist/components/tooltip/index.js.map +1 -1
  118. package/dist/shared/gesture/drag-gesture.js +66 -64
  119. package/dist/shared/gesture/drag-gesture.js.map +1 -1
  120. package/dist/shared/gesture/physics.js +7 -29
  121. package/dist/shared/gesture/physics.js.map +1 -1
  122. package/dist/shared/menu-behavior/index.js +3 -4
  123. package/dist/shared/menu-behavior/index.js.map +1 -1
  124. package/dist/shared/option-portal/combobox-shell.js +48 -7
  125. package/dist/shared/option-portal/combobox-shell.js.map +1 -1
  126. package/dist/shared/option-portal/index.js +9 -9
  127. package/dist/shared/overlay/anchored-panel.js +36 -31
  128. package/dist/shared/overlay/anchored-panel.js.map +1 -1
  129. package/dist/shared/overlay/native-dialog-presence.js +16 -0
  130. package/dist/shared/overlay/native-dialog-presence.js.map +1 -1
  131. package/dist/shared/overlay/nested-drawer-layers.js +7 -4
  132. package/dist/shared/overlay/nested-drawer-layers.js.map +1 -1
  133. package/dist/shared/overlay/open-overlay.js +198 -0
  134. package/dist/shared/overlay/open-overlay.js.map +1 -0
  135. package/dist/shared/overlay/presence.js +19 -22
  136. package/dist/shared/overlay/presence.js.map +1 -1
  137. package/dist/shared/theme/duration.js +9 -0
  138. package/dist/shared/theme/duration.js.map +1 -0
  139. package/dist/shared/theme/reduced-motion.js +15 -0
  140. package/dist/shared/theme/reduced-motion.js.map +1 -0
  141. package/dist/shared/theme/root-sync.js +42 -0
  142. package/dist/shared/theme/root-sync.js.map +1 -0
  143. package/package.json +1 -1
  144. package/dist/shared/overlay/composition.js +0 -57
  145. package/dist/shared/overlay/composition.js.map +0 -1
  146. package/dist/shared/overlay/lifecycle.js +0 -41
  147. package/dist/shared/overlay/lifecycle.js.map +0 -1
  148. package/dist/vite.svg +0 -1
@@ -0,0 +1,471 @@
1
+ import { LitElement } from 'lit';
2
+ declare const WebUiEditableText_base: {
3
+ new (...args: any[]): {
4
+ formResetCallback(): void;
5
+ formDisabledCallback(disabled: boolean): void;
6
+ formStateRestoreCallback(state: File | FormData | string | null): void;
7
+ accessKey: string;
8
+ readonly accessKeyLabel: string;
9
+ autocapitalize: string;
10
+ autocorrect: boolean;
11
+ dir: string;
12
+ draggable: boolean;
13
+ hidden: boolean | "until-found";
14
+ inert: boolean;
15
+ innerText: string;
16
+ lang: string;
17
+ readonly offsetHeight: number;
18
+ readonly offsetLeft: number;
19
+ readonly offsetParent: Element | null;
20
+ readonly offsetTop: number;
21
+ readonly offsetWidth: number;
22
+ outerText: string;
23
+ popover: string | null;
24
+ spellcheck: boolean;
25
+ title: string;
26
+ translate: boolean;
27
+ writingSuggestions: string;
28
+ attachInternals(): ElementInternals;
29
+ click(): void;
30
+ hidePopover(): void;
31
+ showPopover(options?: ShowPopoverOptions): void;
32
+ togglePopover(options?: TogglePopoverOptions | boolean): boolean;
33
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
34
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
35
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
36
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
37
+ readonly attributes: NamedNodeMap;
38
+ get classList(): DOMTokenList;
39
+ set classList(value: string);
40
+ className: string;
41
+ readonly clientHeight: number;
42
+ readonly clientLeft: number;
43
+ readonly clientTop: number;
44
+ readonly clientWidth: number;
45
+ readonly currentCSSZoom: number;
46
+ readonly customElementRegistry: CustomElementRegistry | null;
47
+ id: string;
48
+ innerHTML: string;
49
+ readonly localName: string;
50
+ readonly namespaceURI: string | null;
51
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
52
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
53
+ outerHTML: string;
54
+ readonly ownerDocument: Document;
55
+ get part(): DOMTokenList;
56
+ set part(value: string);
57
+ readonly prefix: string | null;
58
+ readonly scrollHeight: number;
59
+ scrollLeft: number;
60
+ scrollTop: number;
61
+ readonly scrollWidth: number;
62
+ readonly shadowRoot: ShadowRoot | null;
63
+ slot: string;
64
+ readonly tagName: string;
65
+ attachShadow(init: ShadowRootInit): ShadowRoot;
66
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
67
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
68
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
69
+ closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
70
+ closest<E extends Element = Element>(selectors: string): E | null;
71
+ computedStyleMap(): StylePropertyMapReadOnly;
72
+ getAttribute(qualifiedName: string): string | null;
73
+ getAttributeNS(namespace: string | null, localName: string): string | null;
74
+ getAttributeNames(): string[];
75
+ getAttributeNode(qualifiedName: string): Attr | null;
76
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
77
+ getBoundingClientRect(): DOMRect;
78
+ getClientRects(): DOMRectList;
79
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
80
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
81
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
82
+ getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
83
+ getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
84
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
85
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
86
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
87
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
88
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
89
+ getHTML(options?: GetHTMLOptions): string;
90
+ hasAttribute(qualifiedName: string): boolean;
91
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
92
+ hasAttributes(): boolean;
93
+ hasPointerCapture(pointerId: number): boolean;
94
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
95
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
96
+ insertAdjacentText(where: InsertPosition, data: string): void;
97
+ matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
98
+ matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
99
+ matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
100
+ matches(selectors: string): boolean;
101
+ releasePointerCapture(pointerId: number): void;
102
+ removeAttribute(qualifiedName: string): void;
103
+ removeAttributeNS(namespace: string | null, localName: string): void;
104
+ removeAttributeNode(attr: Attr): Attr;
105
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
106
+ requestPointerLock(options?: PointerLockOptions): Promise<void>;
107
+ scroll(options?: ScrollToOptions): void;
108
+ scroll(x: number, y: number): void;
109
+ scrollBy(options?: ScrollToOptions): void;
110
+ scrollBy(x: number, y: number): void;
111
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
112
+ scrollTo(options?: ScrollToOptions): void;
113
+ scrollTo(x: number, y: number): void;
114
+ setAttribute(qualifiedName: string, value: string): void;
115
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
116
+ setAttributeNode(attr: Attr): Attr | null;
117
+ setAttributeNodeNS(attr: Attr): Attr | null;
118
+ setHTMLUnsafe(html: string): void;
119
+ setPointerCapture(pointerId: number): void;
120
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
121
+ webkitMatchesSelector(selectors: string): boolean;
122
+ get textContent(): string;
123
+ set textContent(value: string | null);
124
+ readonly baseURI: string;
125
+ readonly childNodes: NodeListOf<ChildNode>;
126
+ readonly firstChild: ChildNode | null;
127
+ readonly isConnected: boolean;
128
+ readonly lastChild: ChildNode | null;
129
+ readonly nextSibling: ChildNode | null;
130
+ readonly nodeName: string;
131
+ readonly nodeType: number;
132
+ nodeValue: string | null;
133
+ readonly parentElement: HTMLElement | null;
134
+ readonly parentNode: ParentNode | null;
135
+ readonly previousSibling: ChildNode | null;
136
+ appendChild<T extends Node>(node: T): T;
137
+ cloneNode(subtree?: boolean): Node;
138
+ compareDocumentPosition(other: Node): number;
139
+ contains(other: Node | null): boolean;
140
+ getRootNode(options?: GetRootNodeOptions): Node;
141
+ hasChildNodes(): boolean;
142
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
143
+ isDefaultNamespace(namespace: string | null): boolean;
144
+ isEqualNode(otherNode: Node | null): boolean;
145
+ isSameNode(otherNode: Node | null): boolean;
146
+ lookupNamespaceURI(prefix: string | null): string | null;
147
+ lookupPrefix(namespace: string | null): string | null;
148
+ normalize(): void;
149
+ removeChild<T extends Node>(child: T): T;
150
+ replaceChild<T extends Node>(node: Node, child: T): T;
151
+ readonly ELEMENT_NODE: 1;
152
+ readonly ATTRIBUTE_NODE: 2;
153
+ readonly TEXT_NODE: 3;
154
+ readonly CDATA_SECTION_NODE: 4;
155
+ readonly ENTITY_REFERENCE_NODE: 5;
156
+ readonly ENTITY_NODE: 6;
157
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
158
+ readonly COMMENT_NODE: 8;
159
+ readonly DOCUMENT_NODE: 9;
160
+ readonly DOCUMENT_TYPE_NODE: 10;
161
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
162
+ readonly NOTATION_NODE: 12;
163
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
164
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
165
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
166
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
167
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
168
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
169
+ dispatchEvent(event: Event): boolean;
170
+ ariaActiveDescendantElement: Element | null;
171
+ ariaAtomic: string | null;
172
+ ariaAutoComplete: string | null;
173
+ ariaBrailleLabel: string | null;
174
+ ariaBrailleRoleDescription: string | null;
175
+ ariaBusy: string | null;
176
+ ariaChecked: string | null;
177
+ ariaColCount: string | null;
178
+ ariaColIndex: string | null;
179
+ ariaColIndexText: string | null;
180
+ ariaColSpan: string | null;
181
+ ariaControlsElements: ReadonlyArray<Element> | null;
182
+ ariaCurrent: string | null;
183
+ ariaDescribedByElements: ReadonlyArray<Element> | null;
184
+ ariaDescription: string | null;
185
+ ariaDetailsElements: ReadonlyArray<Element> | null;
186
+ ariaDisabled: string | null;
187
+ ariaErrorMessageElements: ReadonlyArray<Element> | null;
188
+ ariaExpanded: string | null;
189
+ ariaFlowToElements: ReadonlyArray<Element> | null;
190
+ ariaHasPopup: string | null;
191
+ ariaHidden: string | null;
192
+ ariaInvalid: string | null;
193
+ ariaKeyShortcuts: string | null;
194
+ ariaLabel: string | null;
195
+ ariaLabelledByElements: ReadonlyArray<Element> | null;
196
+ ariaLevel: string | null;
197
+ ariaLive: string | null;
198
+ ariaModal: string | null;
199
+ ariaMultiLine: string | null;
200
+ ariaMultiSelectable: string | null;
201
+ ariaOrientation: string | null;
202
+ ariaOwnsElements: ReadonlyArray<Element> | null;
203
+ ariaPlaceholder: string | null;
204
+ ariaPosInSet: string | null;
205
+ ariaPressed: string | null;
206
+ ariaReadOnly: string | null;
207
+ ariaRelevant: string | null;
208
+ ariaRequired: string | null;
209
+ ariaRoleDescription: string | null;
210
+ ariaRowCount: string | null;
211
+ ariaRowIndex: string | null;
212
+ ariaRowIndexText: string | null;
213
+ ariaRowSpan: string | null;
214
+ ariaSelected: string | null;
215
+ ariaSetSize: string | null;
216
+ ariaSort: string | null;
217
+ ariaValueMax: string | null;
218
+ ariaValueMin: string | null;
219
+ ariaValueNow: string | null;
220
+ ariaValueText: string | null;
221
+ role: string | null;
222
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
223
+ getAnimations(options?: GetAnimationsOptions): Animation[];
224
+ after(...nodes: (Node | string)[]): void;
225
+ before(...nodes: (Node | string)[]): void;
226
+ remove(): void;
227
+ replaceWith(...nodes: (Node | string)[]): void;
228
+ readonly nextElementSibling: Element | null;
229
+ readonly previousElementSibling: Element | null;
230
+ readonly childElementCount: number;
231
+ readonly children: HTMLCollection;
232
+ readonly firstElementChild: Element | null;
233
+ readonly lastElementChild: Element | null;
234
+ append(...nodes: (Node | string)[]): void;
235
+ moveBefore(node: Node, child: Node | null): void;
236
+ prepend(...nodes: (Node | string)[]): void;
237
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
238
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
239
+ querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
240
+ querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
241
+ querySelector<E extends Element = Element>(selectors: string): E | null;
242
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
243
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
244
+ querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
245
+ querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
246
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
247
+ replaceChildren(...nodes: (Node | string)[]): void;
248
+ readonly assignedSlot: HTMLSlotElement | null;
249
+ readonly attributeStyleMap: StylePropertyMap;
250
+ get style(): CSSStyleDeclaration;
251
+ set style(cssText: string);
252
+ contentEditable: string;
253
+ enterKeyHint: string;
254
+ inputMode: string;
255
+ readonly isContentEditable: boolean;
256
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
257
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
258
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
259
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
260
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
261
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
262
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
263
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
265
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
266
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
267
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
268
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
271
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
+ oncommand: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
275
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
276
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
277
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
278
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
279
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
280
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
281
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
282
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
283
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
284
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
285
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
286
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
287
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
288
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
289
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
290
+ onerror: OnErrorEventHandler;
291
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
292
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
293
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
294
+ oninput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
295
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
297
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
298
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
299
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
302
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
303
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
304
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
305
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
306
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
307
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
308
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
309
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
310
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
311
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
312
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
315
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
316
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
317
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
319
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
320
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
321
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
322
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
323
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
324
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
325
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
326
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
327
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
328
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
329
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
330
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
331
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
332
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
333
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
334
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
335
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
336
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
339
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
340
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
342
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
343
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
344
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
345
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
346
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
347
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
348
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
349
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
350
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
351
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
353
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
354
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
355
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
356
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
357
+ autofocus: boolean;
358
+ readonly dataset: DOMStringMap;
359
+ nonce: string;
360
+ tabIndex: number;
361
+ blur(): void;
362
+ focus(options?: FocusOptions): void;
363
+ };
364
+ formAssociated: boolean;
365
+ } & typeof LitElement;
366
+ export declare class WebUiEditableText extends WebUiEditableText_base {
367
+ static styles: import('lit').CSSResult[];
368
+ name: string;
369
+ placeholder: string;
370
+ disabled: boolean;
371
+ ariaLabel: string | null;
372
+ private _value;
373
+ /**
374
+ * `value` attribute 承载 form reset 的初值,不随当前值反射;property 暴露当前值,
375
+ * 与原生 input 的 value / defaultValue 关系一致。
376
+ */
377
+ get value(): string;
378
+ set value(v: string);
379
+ private _editor?;
380
+ private _textLayer?;
381
+ private _editing;
382
+ private _editBase;
383
+ private _pendingCaret;
384
+ private _refocusing;
385
+ private _resizeObserver;
386
+ private get _isDisabled();
387
+ private readonly _formAssociation;
388
+ private readonly _formAssociationController;
389
+ constructor();
390
+ disconnectedCallback(): void;
391
+ connectedCallback(): void;
392
+ updated(): void;
393
+ private _onHostFocus;
394
+ /**
395
+ * pointerdown 时文本层仍是命中目标,此时记录落点;浏览器随后的默认聚焦会触发
396
+ * host focus 进入编辑,偏移在那里应用到 textarea。
397
+ */
398
+ private _onPointerDown;
399
+ /** mousedown 默认聚焦被拦截等场景由 click 兜底进入编辑。 */
400
+ private _onClick;
401
+ /**
402
+ * 公共 API:进入编辑态并全选内容;已在编辑态时只重新全选。
403
+ *
404
+ * `disabled` 时不进入编辑,与 `focus()` 一致。
405
+ */
406
+ select(): void;
407
+ private _enterEditing;
408
+ private _exitEditing;
409
+ private _onInput;
410
+ /**
411
+ * blur 提交:与 Enter 同一条提交路径,草稿成为新值并派发 change。
412
+ *
413
+ * 不交还焦点:焦点已被用户移走,抢回宿主会吞掉消费者的目标焦点。
414
+ */
415
+ private _onBlur;
416
+ /**
417
+ * 提交:草稿成为新值、退出编辑,并恰好派发一次 change。Enter 与 blur 同走这一条路。
418
+ *
419
+ * `returnFocus` 区分两种来路:Enter 主动结束时把焦点交还宿主(标记防重入编辑);
420
+ * blur 是被动失焦,焦点已被用户移走,再抢回宿主会吞掉消费者的目标焦点。
421
+ * 先退出编辑再动焦点:退出时 textarea 隐藏触发的 blur 看到 _editing 已为 false,
422
+ * 不会把这次提交误判成又一次 blur 提交。
423
+ */
424
+ private _commitEditing;
425
+ /**
426
+ * 取消:恢复进入编辑时的值并派发 cancel。仅 Escape 走这一条路径。
427
+ *
428
+ * 调用方(Escape 分支)随后才交还焦点:本方法先摘除编辑态,焦点迁移触发的 blur
429
+ * 到达时 `_editing` 已为 false 而早退,不会把取消误判成 blur 提交。
430
+ */
431
+ private _cancelEditing;
432
+ /**
433
+ * 焦点交还宿主:先标记再聚焦,宿主 focus 到达时标记已消费,不会再次进入编辑;
434
+ * 标记在微任务里清掉,此后的聚焦照常进入编辑。
435
+ */
436
+ private _returnFocusToHost;
437
+ /**
438
+ * 编辑态按键归属:Enter 提交、Escape 取消。
439
+ *
440
+ * 监听挂在 window 捕获阶段而不是 shadow 内的 textarea 上:消费方(浮层仲裁者)在
441
+ * document 捕获阶段收 Escape,组件若只在 textarea 上处理,按键先被仲裁者收走,
442
+ * 于是一次 Escape 会同时取消编辑和关闭外层浮层。window 在 document 上游,
443
+ * stopPropagation 只有挂在这里才拦得住仲裁者。
444
+ */
445
+ private _claimEditingKeys;
446
+ private _releaseEditingKeys;
447
+ private readonly _onEditingKeydown;
448
+ private _setupAutosize;
449
+ private _teardownAutosize;
450
+ /**
451
+ * 编辑层高度始终跟随自身内容,不依赖文本层折出的行盒。
452
+ *
453
+ * 编辑层绝对定位并用 top/bottom 撑高,`height: auto` 量到的是包含块高度而不是内容高;
454
+ * 先归零再读 scrollHeight,拿到的才是自身内容的高度(含 1px 内边距)。
455
+ * 观察宿主而非编辑层:编辑层在文档流外,改它的高度不会反过来改动宿主尺寸。
456
+ */
457
+ private _autosizeEditor;
458
+ private get _displayText();
459
+ render(): import('lit').TemplateResult<1>;
460
+ readonly $events: {
461
+ input: Event;
462
+ change: Event;
463
+ cancel: Event;
464
+ };
465
+ }
466
+ declare global {
467
+ interface HTMLElementTagNameMap {
468
+ 'web-ui-editable-text': WebUiEditableText;
469
+ }
470
+ }
471
+ export {};
@@ -0,0 +1,206 @@
1
+ import e from "../../_virtual/_@oxc-project_runtime@0.149.0/helpers/esm/decorate.js";
2
+ import { FormAssociated as t, FormAssociationController as n, defineFormAssociation as r } from "../../shared/form-association/index.js";
3
+ import i from "./style.js";
4
+ import { LitElement as a, html as o, unsafeCSS as s } from "lit";
5
+ import { customElement as c, property as l, query as u, state as d } from "lit/decorators.js";
6
+ import { ifDefined as f } from "lit/directives/if-defined.js";
7
+ import { classMap as p } from "lit/directives/class-map.js";
8
+ //#region src/components/editable-text/index.ts
9
+ var m = "​", h = 1;
10
+ function g(e) {
11
+ for (let t of e.childNodes) if (t instanceof Text) return t;
12
+ return null;
13
+ }
14
+ function _(e, t, n) {
15
+ let r = g(e);
16
+ if (!r) return 0;
17
+ let i = r.data.length, a = document.createRange(), o = (e) => (a.setStart(r, e), a.setEnd(r, e), a.getBoundingClientRect()), s = [];
18
+ for (let t of e.getClientRects()) s.some((e) => Math.abs(e.top - t.top) <= h) || s.push(t);
19
+ if (s.length === 0) return i;
20
+ let c = s[0], l = Infinity;
21
+ for (let e of s) {
22
+ let t = Math.abs((e.top + e.bottom) / 2 - n);
23
+ t <= l && (l = t, c = e);
24
+ }
25
+ let u = 0, d = i;
26
+ for (; u < d;) {
27
+ let e = u + d >> 1;
28
+ o(e).top >= c.top - h ? d = e : u = e + 1;
29
+ }
30
+ let f = u;
31
+ for (u = f, d = i; u < d;) {
32
+ let e = u + d + 1 >> 1;
33
+ o(e).top <= c.top + h ? u = e : d = e - 1;
34
+ }
35
+ let p = Math.max(u, f);
36
+ for (u = f, d = p; u < d;) {
37
+ let e = u + d + 1 >> 1;
38
+ o(e).left <= t + h ? u = e : d = e - 1;
39
+ }
40
+ return u;
41
+ }
42
+ var v = class extends t(a) {
43
+ static {
44
+ this.styles = [s(i)];
45
+ }
46
+ get value() {
47
+ return this._value;
48
+ }
49
+ set value(e) {
50
+ let t = this._value;
51
+ this._value = e, this._formAssociation.sync(), this.requestUpdate("value", t);
52
+ }
53
+ get _isDisabled() {
54
+ return this.disabled || this._formAssociation.isFormDisabled();
55
+ }
56
+ constructor() {
57
+ super(), this.name = "", this.placeholder = "", this.disabled = !1, this.ariaLabel = null, this._value = "", this._editing = !1, this._editBase = "", this._pendingCaret = null, this._refocusing = !1, this._resizeObserver = null, this._formAssociation = r({
58
+ host: this,
59
+ getState: () => this._value,
60
+ setState: (e) => {
61
+ this.value = e;
62
+ },
63
+ getFormValue: () => this._value,
64
+ getFormState: () => this._value,
65
+ restoreState: (e) => {
66
+ typeof e == "string" && (this.value = e);
67
+ }
68
+ }).make(), this._formAssociationController = new n(this, this._formAssociation), this._onEditingKeydown = (e) => {
69
+ if (!e.isComposing && e.composedPath().includes(this)) {
70
+ if (e.key === "Escape") {
71
+ e.preventDefault(), e.stopPropagation(), this._cancelEditing(), this._returnFocusToHost();
72
+ return;
73
+ }
74
+ e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), this._commitEditing(!0));
75
+ }
76
+ }, this.addEventListener("focus", this._onHostFocus);
77
+ }
78
+ disconnectedCallback() {
79
+ super.disconnectedCallback(), this._releaseEditingKeys(), this._teardownAutosize();
80
+ }
81
+ connectedCallback() {
82
+ super.connectedCallback(), this._setupAutosize(), this._editing && this._claimEditingKeys();
83
+ }
84
+ updated() {
85
+ this._isDisabled ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"), this._editing && this._isDisabled && this._exitEditing(), this._autosizeEditor();
86
+ }
87
+ _onHostFocus() {
88
+ if (this._refocusing) {
89
+ this._refocusing = !1;
90
+ return;
91
+ }
92
+ this._enterEditing();
93
+ }
94
+ _onPointerDown(e) {
95
+ this._isDisabled || this._editing || !this._textLayer || (this._pendingCaret = _(this._textLayer, e.clientX, e.clientY));
96
+ }
97
+ _onClick() {
98
+ this._isDisabled || this._editing || this._enterEditing();
99
+ }
100
+ select() {
101
+ if (this._isDisabled) return;
102
+ this._editing || this._enterEditing();
103
+ let e = this._editor;
104
+ e?.setSelectionRange(0, e.value.length);
105
+ }
106
+ _enterEditing() {
107
+ if (this._isDisabled || this._editing) return;
108
+ this._editing = !0, this._editBase = this._value, this.toggleAttribute("editing", !0), this._claimEditingKeys();
109
+ let e = this._editor;
110
+ if (!e) return;
111
+ e.focus();
112
+ let t = this._pendingCaret ?? this._value.length;
113
+ this._pendingCaret = null;
114
+ let n = Math.max(0, Math.min(t, e.value.length));
115
+ e.setSelectionRange(n, n);
116
+ }
117
+ _exitEditing() {
118
+ this._editing && (this._editing = !1, this._releaseEditingKeys(), this.toggleAttribute("editing", !1));
119
+ }
120
+ _onInput() {
121
+ this._value = this._editor?.value ?? "", this._formAssociation.sync(), this._autosizeEditor();
122
+ }
123
+ _onBlur() {
124
+ this._editing && !this._isDisabled && this._commitEditing(!1);
125
+ }
126
+ _commitEditing(e) {
127
+ this._editing && (this._exitEditing(), e && this._returnFocusToHost(), this.dispatchEvent(new Event("change", {
128
+ bubbles: !0,
129
+ composed: !0
130
+ })));
131
+ }
132
+ _cancelEditing() {
133
+ this._editing && (this._value = this._editBase, this._formAssociation.sync(), this._exitEditing(), this._refocusing = !0, this.dispatchEvent(new Event("cancel", {
134
+ bubbles: !1,
135
+ composed: !1
136
+ })));
137
+ }
138
+ _returnFocusToHost() {
139
+ this._refocusing = !0, this.focus(), queueMicrotask(() => {
140
+ this._refocusing = !1;
141
+ });
142
+ }
143
+ _claimEditingKeys() {
144
+ window.addEventListener("keydown", this._onEditingKeydown, !0);
145
+ }
146
+ _releaseEditingKeys() {
147
+ window.removeEventListener("keydown", this._onEditingKeydown, !0);
148
+ }
149
+ _setupAutosize() {
150
+ if (this._teardownAutosize(), typeof ResizeObserver > "u") {
151
+ this._autosizeEditor();
152
+ return;
153
+ }
154
+ this._resizeObserver = new ResizeObserver(() => this._autosizeEditor()), this._resizeObserver.observe(this), this._autosizeEditor();
155
+ }
156
+ _teardownAutosize() {
157
+ this._resizeObserver?.disconnect(), this._resizeObserver = null, this._editor?.style.removeProperty("height");
158
+ }
159
+ _autosizeEditor() {
160
+ let e = this._editor;
161
+ if (!e) return;
162
+ let t = e.style.height;
163
+ e.style.height = "0px";
164
+ let n = e.scrollHeight;
165
+ e.style.height = n > 0 ? `${n}px` : t;
166
+ }
167
+ get _displayText() {
168
+ return this._value === "" ? this.placeholder === "" ? m : this.placeholder : this._value;
169
+ }
170
+ render() {
171
+ return o`
172
+ <div class="layers" @pointerdown=${this._onPointerDown} @click=${this._onClick}>
173
+ <span class=${p({
174
+ text: !0,
175
+ placeholder: this._value === ""
176
+ })}>${this._displayText}</span>
177
+ <textarea
178
+ class="editor"
179
+ .value=${this._value}
180
+ .placeholder=${this.placeholder}
181
+ ?disabled=${this._isDisabled}
182
+ aria-label=${f(this.ariaLabel)}
183
+ @input=${this._onInput}
184
+ @blur=${this._onBlur}
185
+ ></textarea>
186
+ </div>
187
+ `;
188
+ }
189
+ };
190
+ e([l({
191
+ type: String,
192
+ reflect: !0
193
+ })], v.prototype, "name", void 0), e([l({
194
+ type: String,
195
+ reflect: !0
196
+ })], v.prototype, "placeholder", void 0), e([l({
197
+ type: Boolean,
198
+ reflect: !0
199
+ })], v.prototype, "disabled", void 0), e([l({
200
+ type: String,
201
+ attribute: "aria-label"
202
+ })], v.prototype, "ariaLabel", void 0), e([d()], v.prototype, "_value", void 0), e([l({ type: String })], v.prototype, "value", null), e([u(".editor")], v.prototype, "_editor", void 0), e([u(".text")], v.prototype, "_textLayer", void 0), v = e([c("web-ui-editable-text")], v);
203
+ //#endregion
204
+ export { v as WebUiEditableText };
205
+
206
+ //# sourceMappingURL=index.js.map