litegui.ts 1.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 (113) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/@types/Inspector/index.d.ts +462 -0
  4. package/dist/@types/Inspector/index.d.ts.map +1 -0
  5. package/dist/@types/globals/index.d.ts +10 -0
  6. package/dist/@types/globals/index.d.ts.map +1 -0
  7. package/dist/Pickr/pickr.es5.min.js +3 -0
  8. package/dist/Pickr/pickr.es5.min.js.map +1 -0
  9. package/dist/Pickr/pickr.min.js +3 -0
  10. package/dist/Pickr/pickr.min.js.map +1 -0
  11. package/dist/Pickr/themes/classic.min.css +2 -0
  12. package/dist/Pickr/themes/monolith.min.css +2 -0
  13. package/dist/Pickr/themes/nano.min.css +2 -0
  14. package/dist/area.d.ts +277 -0
  15. package/dist/area.d.ts.map +1 -0
  16. package/dist/console.d.ts +27 -0
  17. package/dist/console.d.ts.map +1 -0
  18. package/dist/core.d.ts +438 -0
  19. package/dist/core.d.ts.map +1 -0
  20. package/dist/dialog.d.ts +369 -0
  21. package/dist/dialog.d.ts.map +1 -0
  22. package/dist/dragger.d.ts +132 -0
  23. package/dist/dragger.d.ts.map +1 -0
  24. package/dist/index.d.ts +17 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/inspector/array.d.ts +76 -0
  27. package/dist/inspector/array.d.ts.map +1 -0
  28. package/dist/inspector/button.d.ts +62 -0
  29. package/dist/inspector/button.d.ts.map +1 -0
  30. package/dist/inspector/checkbox.d.ts +50 -0
  31. package/dist/inspector/checkbox.d.ts.map +1 -0
  32. package/dist/inspector/color.d.ts +43 -0
  33. package/dist/inspector/color.d.ts.map +1 -0
  34. package/dist/inspector/combo.d.ts +76 -0
  35. package/dist/inspector/combo.d.ts.map +1 -0
  36. package/dist/inspector/dataTree.d.ts +20 -0
  37. package/dist/inspector/dataTree.d.ts.map +1 -0
  38. package/dist/inspector/file.d.ts +57 -0
  39. package/dist/inspector/file.d.ts.map +1 -0
  40. package/dist/inspector/flag.d.ts +36 -0
  41. package/dist/inspector/flag.d.ts.map +1 -0
  42. package/dist/inspector/icon.d.ts +60 -0
  43. package/dist/inspector/icon.d.ts.map +1 -0
  44. package/dist/inspector/index.d.ts +24 -0
  45. package/dist/inspector/index.d.ts.map +1 -0
  46. package/dist/inspector/info.d.ts +47 -0
  47. package/dist/inspector/info.d.ts.map +1 -0
  48. package/dist/inspector/inspector.d.ts +350 -0
  49. package/dist/inspector/inspector.d.ts.map +1 -0
  50. package/dist/inspector/line.d.ts +20 -0
  51. package/dist/inspector/line.d.ts.map +1 -0
  52. package/dist/inspector/list.d.ts +153 -0
  53. package/dist/inspector/list.d.ts.map +1 -0
  54. package/dist/inspector/number.d.ts +85 -0
  55. package/dist/inspector/number.d.ts.map +1 -0
  56. package/dist/inspector/pad.d.ts +66 -0
  57. package/dist/inspector/pad.d.ts.map +1 -0
  58. package/dist/inspector/seperator.d.ts +15 -0
  59. package/dist/inspector/seperator.d.ts.map +1 -0
  60. package/dist/inspector/slider.d.ts +55 -0
  61. package/dist/inspector/slider.d.ts.map +1 -0
  62. package/dist/inspector/string.d.ts +71 -0
  63. package/dist/inspector/string.d.ts.map +1 -0
  64. package/dist/inspector/stringButton.d.ts +45 -0
  65. package/dist/inspector/stringButton.d.ts.map +1 -0
  66. package/dist/inspector/tags.d.ts +53 -0
  67. package/dist/inspector/tags.d.ts.map +1 -0
  68. package/dist/inspector/textArea.d.ts +48 -0
  69. package/dist/inspector/textArea.d.ts.map +1 -0
  70. package/dist/inspector/tree.d.ts +41 -0
  71. package/dist/inspector/tree.d.ts.map +1 -0
  72. package/dist/inspector/vector.d.ts +64 -0
  73. package/dist/inspector/vector.d.ts.map +1 -0
  74. package/dist/litegui.css +2 -0
  75. package/dist/litegui.css.map +1 -0
  76. package/dist/litegui.d.ts +439 -0
  77. package/dist/litegui.d.ts.map +1 -0
  78. package/dist/litegui.js +11898 -0
  79. package/dist/litegui.js.map +1 -0
  80. package/dist/litegui.mini.js +1 -0
  81. package/dist/menubar.d.ts +279 -0
  82. package/dist/menubar.d.ts.map +1 -0
  83. package/dist/panel.d.ts +124 -0
  84. package/dist/panel.d.ts.map +1 -0
  85. package/dist/table.d.ts +105 -0
  86. package/dist/table.d.ts.map +1 -0
  87. package/dist/tabs.d.ts +426 -0
  88. package/dist/tabs.d.ts.map +1 -0
  89. package/dist/utilities.d.ts +508 -0
  90. package/dist/utilities.d.ts.map +1 -0
  91. package/dist/widgets/button.d.ts +33 -0
  92. package/dist/widgets/button.d.ts.map +1 -0
  93. package/dist/widgets/checkbox.d.ts +36 -0
  94. package/dist/widgets/checkbox.d.ts.map +1 -0
  95. package/dist/widgets/complexList.d.ts +83 -0
  96. package/dist/widgets/complexList.d.ts.map +1 -0
  97. package/dist/widgets/contextMenu.d.ts +97 -0
  98. package/dist/widgets/contextMenu.d.ts.map +1 -0
  99. package/dist/widgets/index.d.ts +10 -0
  100. package/dist/widgets/index.d.ts.map +1 -0
  101. package/dist/widgets/lineEditor.d.ts +112 -0
  102. package/dist/widgets/lineEditor.d.ts.map +1 -0
  103. package/dist/widgets/list.d.ts +59 -0
  104. package/dist/widgets/list.d.ts.map +1 -0
  105. package/dist/widgets/listBox.d.ts +47 -0
  106. package/dist/widgets/listBox.d.ts.map +1 -0
  107. package/dist/widgets/searchBox.d.ts +43 -0
  108. package/dist/widgets/searchBox.d.ts.map +1 -0
  109. package/dist/widgets/slider.d.ts +61 -0
  110. package/dist/widgets/slider.d.ts.map +1 -0
  111. package/dist/widgets/tree.d.ts +348 -0
  112. package/dist/widgets/tree.d.ts.map +1 -0
  113. package/package.json +81 -0
@@ -0,0 +1,350 @@
1
+ import type { HTMLDivElementOptions, InspectorSection, InspectorValue, InspectorWidget, InspectorWidgetTypes, GenericCreationOptions, AppendOptions, CreateWidgetOptions, ProcessElementOptions, WidgetChangeOptions, InspectorOptions, BeginGroupOptions, AddTitleOptions, AddContainerOptions, InspectorContainer, InspectorGroupWidget } from "../@types/Inspector";
2
+ import { LiteGUIObject } from "../@types/globals";
3
+ /**
4
+ * Inspector class for creating property inspectors.
5
+ * @class Inspector
6
+ * @example
7
+ * ```typescript
8
+ * const inspector = new Inspector();
9
+ * inspector.add("string", "Name", "unnamed");
10
+ * inspector.appendTo(document.body);
11
+ * ```
12
+ */
13
+ export declare class Inspector implements LiteGUIObject {
14
+ /**
15
+ * The root HTML element of the inspector.
16
+ */
17
+ root: HTMLDivElement;
18
+ /**
19
+ * List of sections within the inspector.
20
+ */
21
+ sections: InspectorSection[];
22
+ /**
23
+ * Map of values managed by the inspector.
24
+ */
25
+ values: Map<string, InspectorValue>;
26
+ /**
27
+ * List of all widgets in the inspector.
28
+ */
29
+ widgets: InspectorWidget[];
30
+ /**
31
+ * Map of widgets indexed by their name.
32
+ */
33
+ widgetsByName: Map<string, InspectorWidget>;
34
+ /**
35
+ * Internal row counter for styling even/odd rows.
36
+ */
37
+ rowNumber: number;
38
+ /**
39
+ * Width of the name column.
40
+ */
41
+ nameWidth?: number;
42
+ /**
43
+ * Default width for widgets.
44
+ */
45
+ widgetsWidth?: number;
46
+ /**
47
+ * Current tab index for accessibility.
48
+ */
49
+ tabIndex: number;
50
+ /**
51
+ * Callback triggered when any value in the inspector changes.
52
+ */
53
+ onChange?: (name?: string, value?: InspectorValue, element?: InspectorWidget) => void;
54
+ /**
55
+ * CSS class name for the root element.
56
+ */
57
+ className: string;
58
+ /**
59
+ * Number of widgets to display per row.
60
+ */
61
+ widgetsPerRow: number;
62
+ /**
63
+ * If true, displays the inspector in a single line.
64
+ */
65
+ oneLine?: boolean | null;
66
+ /**
67
+ * The currently active section.
68
+ */
69
+ currentSection?: InspectorSection;
70
+ /**
71
+ * Stack of active containers.
72
+ * @private
73
+ */
74
+ private _currentContainerStack;
75
+ /**
76
+ * The current container where widgets are appended.
77
+ * @private
78
+ */
79
+ private _currentContainer?;
80
+ /**
81
+ * Callback triggered to refresh the inspector.
82
+ */
83
+ onRefresh?: () => void;
84
+ /**
85
+ * Hook called when a property is added.
86
+ */
87
+ onAddProperty?: (name: string, instance: unknown, varname: string | number, value: unknown, options?: unknown) => void;
88
+ /**
89
+ * Name of the inspector instance.
90
+ */
91
+ name: string;
92
+ /**
93
+ * Configuration options.
94
+ */
95
+ options: InspectorOptions;
96
+ /**
97
+ * Height of the inspector.
98
+ */
99
+ height?: string | number;
100
+ /**
101
+ * Counter for generating unique names for empty widgets.
102
+ */
103
+ emptyWidgetIndex: number;
104
+ /**
105
+ * Creates an instance of the Inspector.
106
+ * @param {InspectorOptions} [options] Configuration options.
107
+ */
108
+ constructor(options?: InspectorOptions);
109
+ /**
110
+ * Retrieves all values from the widgets in the inspector.
111
+ * @returns {Map<string, InspectorValue>} A map of widget names to their values.
112
+ */
113
+ getValues(): Map<string, InspectorValue>;
114
+ /**
115
+ * Sets values for multiple widgets in the inspector.
116
+ * @param {{ [key: string]: InspectorValue }} values An object where keys are widget names and values are the new values.
117
+ */
118
+ setValues(values: {
119
+ [key: string]: InspectorValue;
120
+ }): void;
121
+ /**
122
+ * Appends the inspector to a parent element.
123
+ * @param {HTMLElement | string} parent The parent element or its selector string.
124
+ * @param {boolean} [atFront] If true, inserts the inspector at the beginning of the parent.
125
+ */
126
+ appendTo(parent?: HTMLElement | string, atFront?: boolean): void;
127
+ /**
128
+ * Removes all the widgets inside the inspector
129
+ */
130
+ clear(): void;
131
+ /**
132
+ * Tries to refresh (calls on_refresh)
133
+ */
134
+ refresh(): void;
135
+ /**
136
+ * Append widget to this inspector
137
+ * @param {InspectorWidget} widget The widget to append.
138
+ * @param {AppendOptions} options Configuration options for appending.
139
+ */
140
+ appendWidget(widget: InspectorWidget, options?: AppendOptions): void;
141
+ /**
142
+ * Pushes a container onto the stack, making it the current active container for new widgets.
143
+ * @param {InspectorContainer} container The container element to push.
144
+ */
145
+ pushContainer(container: InspectorContainer): void;
146
+ /**
147
+ * Checks if a container is currently in the stack.
148
+ * @param {InspectorContainer} container The container to check.
149
+ * @returns {boolean} True if the container is in the stack.
150
+ */
151
+ isContainerInStack(container: InspectorContainer): boolean;
152
+ /**
153
+ * Pops a container from the stack, reverting to the previous container.
154
+ * @param {HTMLElement} [container] Optional specific container to pop up to.
155
+ */
156
+ popContainer(container?: HTMLElement): void;
157
+ /**
158
+ * Configures the inspector with a list of widget creation options.
159
+ * @param {GenericCreationOptions[]} info Array of widget configuration objects.
160
+ */
161
+ setup(info: GenericCreationOptions[]): void;
162
+ /**
163
+ * Returns the widget given the name.
164
+ * @param {string | number} name The name of the widget supplied when creating it or the index of the widget.
165
+ * @returns {InspectorWidget | undefined} The widget object or undefined if not found.
166
+ */
167
+ getWidget(name: string | number): InspectorWidget | undefined;
168
+ /**
169
+ * Inspects an instance and creates widgets for its properties.
170
+ * @param {unknown} instance The instance that you want to inspect, attributes will be collected from this object.
171
+ * @param {{[key:string]: unknown}} [properties] An object with all the names of the properties you want to inspect.
172
+ * If not specified then it calls getProperties, otherwise collect them and tries to guess the type.
173
+ * @param {{ [key: string]: unknown }} [propertiesInfoExample] It overwrites the info about properties found in the object (in case the automatically guessed type is wrong).
174
+ * @param {string[]} [skipProperties] This properties will be ignored.
175
+ */
176
+ inspectInstance(instance: Record<string, unknown>, properties?: Record<string, unknown>, propertiesInfoExample?: Record<string, unknown>, skipProperties?: string[]): void;
177
+ /**
178
+ * Adds the widgets for the properties specified in the info of instance, it will create callback and onUpdate.
179
+ * @param {any} instance The instance that you want to inspect.
180
+ * @param {{[key:string]:GenericCreationOptions|undefined}} info Object containing "property name" :{ type: value, widget:..., min:..., max:... } or just "property":"type".
181
+ * @param {string[]} [skipProperties] These properties will be ignored.
182
+ */
183
+ showProperties(instance: Record<string, unknown>, info: {
184
+ [key: string]: GenericCreationOptions | undefined;
185
+ }, skipProperties?: string[]): void;
186
+ /**
187
+ * Used by all widgets to create the container of one widget.
188
+ * @param {string} [name] The string to show at the left side of the widget, if null this element wont be created and the value part will use the full width.
189
+ * @param {string | number | boolean | HTMLElement} [content] The string with the html of the elements that conform the interactive part of the widget.
190
+ * @param {CreateWidgetOptions} [options] Some generic options that any widget could have:
191
+ * - widgetName: the name used to store this widget in the widgetsByName container, if omitted the parameter name is used
192
+ * - width: the width of the widget (if omitted it will use the Inspector widgetsWidth, otherwise 100%
193
+ * - nameWidth: the width of the name part of the widget, if not specified it will use Inspector nameWidth, otherwise css default
194
+ * - contentWidth: the width of the widget content area
195
+ * - preTitle: string to append to the left side of the name, this is helpful if you want to add icons with behaviour when clicked
196
+ * - title: string or string[] to replace the name, sometimes you want to supply a different name than the one you want to show (this is helpful to retrieve values from an inspector)
197
+ * @returns {InspectorWidget} The created widget element.
198
+ */
199
+ createWidget(name?: string, content?: string | number | boolean | HTMLElement, options?: CreateWidgetOptions): InspectorWidget;
200
+ /**
201
+ * Internal method called when a widget's value changes.
202
+ * Handles callbacks, events, and value updates.
203
+ * @param {InspectorWidget} element The widget element.
204
+ * @param {string} name The name of the value/widget.
205
+ * @param {InspectorValue} value The new value.
206
+ * @param {WidgetChangeOptions} options Options containing callbacks.
207
+ * @param {boolean} [expand_value] If true and value is array, spreads arguments applied to callback.
208
+ * @param {Event} [event] The original event that triggered the change.
209
+ * @returns {any} The result of the callback.
210
+ */
211
+ onWidgetChange(element: InspectorWidget, name: string, value: InspectorValue, options: WidgetChangeOptions, expand_value?: boolean, event?: Event): void;
212
+ /**
213
+ * Resolves the proper name for a value/widget, generating a unique one if missing.
214
+ * @param {string} [widgetName] The proposed name.
215
+ * @param {GenericCreationOptions} [options] Options potentially containing a widget_name.
216
+ * @returns {string} The resolved name.
217
+ */
218
+ getValueName(widgetName?: string, options?: GenericCreationOptions): string;
219
+ /**
220
+ * Registry of available widget constructors.
221
+ * Maps widget type strings to function names or instances.
222
+ */
223
+ static widgetConstructors: {
224
+ [key: string]: string | ((name?: string, value?: InspectorValue, options?: CreateWidgetOptions) => InspectorWidget);
225
+ };
226
+ /**
227
+ * Registers a new custom widget type.
228
+ * @param {string} name The type name of the widget.
229
+ * @param {string | Function} constructor The constructor function or method name.
230
+ */
231
+ static registerWidget(name: string, constructor: string | ((name?: string, value?: InspectorValue, options?: CreateWidgetOptions) => InspectorWidget)): void;
232
+ /**
233
+ * Unregisters a widget type.
234
+ * @param {string} name The type name of the widget to unregister.
235
+ */
236
+ static unregisterWidget(name: string): void;
237
+ /**
238
+ * Adds a widget to the inspector, its a way to provide the widget type from a string.
239
+ * @param {InspectorWidgetTypes | string} [type] String specifying the name of the widget to use (check Inspector.widget_constructors for a complete list).
240
+ * @param {string} [name] The string to show at the left side of the widget, if null this element wont be created and the value part will use the full width.
241
+ * @param {InspectorValue} [value] The value to assign to the widget.
242
+ * @param {GenericCreationOptions} [options] Some generic options that any widget could have:
243
+ * - type: overwrites the type
244
+ * - callback: function to call when the user interacts with the widget and changes the value
245
+ * [For a bigger list check createWidget and every widget in particular]
246
+ * @returns {InspectorWidget | undefined} The widget in the form of the DOM element that contains it.
247
+ */
248
+ add(type?: InspectorWidgetTypes | string, name?: string, value?: InspectorValue, options?: GenericCreationOptions): InspectorWidget | undefined;
249
+ /**
250
+ * Retrieves the value of a specific widget by name.
251
+ * @param {string} name The name of the widget.
252
+ * @returns {InspectorValue} The value of the widget.
253
+ */
254
+ getValue(name: string): InspectorValue;
255
+ /**
256
+ * Applies standard options (id, classes, style) to a container element.
257
+ * @param {HTMLDivElement} element The DOM element to modify.
258
+ * @param {HTMLDivElementOptions} options The options containing id, className, width, height, etc.
259
+ */
260
+ applyOptions(element: HTMLDivElement, options: HTMLDivElementOptions): void;
261
+ /**
262
+ * Helper method that does nothing. Used as a placeholder for invalid widget types.
263
+ * @private
264
+ * @returns {undefined} Always returns undefined.
265
+ */
266
+ private _doNothing;
267
+ /**
268
+ * Creates an empty container but does not set it as the active stack container.
269
+ * @param {AddContainerOptions} [options] Configuration options.
270
+ * @returns {InspectorContainer} The created container element.
271
+ */
272
+ addEmptyContainer(options?: AddContainerOptions): InspectorContainer;
273
+ /**
274
+ * Creates a new container and sets it as the active container for subsequent widgets.
275
+ * @param {AddContainerOptions} options Configuration options.
276
+ * @returns {InspectorContainer} The created container element.
277
+ */
278
+ startContainer(options: AddContainerOptions): InspectorContainer;
279
+ /**
280
+ * Closes the current container and pops it from the stack.
281
+ */
282
+ endContainer(): void;
283
+ /**
284
+ * Adds a collapsible section to the inspector. Sections cannot be nested inside containers, but they contain a container.
285
+ * @param {string} [name] Title of the section.
286
+ * @param {InspectorOptions} [options] Configuration options for the section.
287
+ * @returns {InspectorSection} The created section element.
288
+ */
289
+ addSection(name?: string, options?: InspectorOptions): InspectorSection;
290
+ /**
291
+ * Changes the current active section to the specified one.
292
+ * @param {InspectorSection} section The section to make active.
293
+ */
294
+ setCurrentSection(section: InspectorSection): void;
295
+ /**
296
+ * Retrieves the currently active section.
297
+ * @returns {HTMLElement | null} The section element or null if no section is active.
298
+ */
299
+ getCurrentSection(): ParentNode | null;
300
+ /**
301
+ * Ends the current section, popping it from the stack.
302
+ */
303
+ endCurrentSection(): void;
304
+ /**
305
+ * Begins a new group of widgets. Groups provide a visual grouping and can be collapsed.
306
+ * @param {string} [name] The title of the group.
307
+ * @param {BeginGroupOptions} [options] Configuration options.
308
+ * @returns {InspectorGroupWidget} The group element.
309
+ */
310
+ beginGroup(name?: string, options?: BeginGroupOptions): InspectorGroupWidget;
311
+ /**
312
+ * Ends the current group, popping it from the stack.
313
+ */
314
+ endGroup(): void;
315
+ /**
316
+ * Creates a title bar in the widgets list to help separate widgets.
317
+ * @param {string} title The text to display in the title.
318
+ * @param {AddTitleOptions} [options] Configuration options.
319
+ * @returns {HTMLDivElement} The title widget element.
320
+ */
321
+ addTitle(title: string, options?: AddTitleOptions): InspectorWidget;
322
+ /**
323
+ * Scrolls the inspector to show the element with the specified ID.
324
+ * @param {string} id The ID of the element to scroll to.
325
+ */
326
+ scrollTo(id: string): void;
327
+ /**
328
+ * Processes options, ensuring they are in an object format.
329
+ * @param {Record<string, unknown> | (...args: unknown[]) => unknown} options The options to process.
330
+ * @returns {Record<string, unknown>} The processed options object.
331
+ */
332
+ processOptions(options?: object | ((...args: unknown[]) => unknown)): object;
333
+ /**
334
+ * Processes a widget element, applying update hooks if provided.
335
+ * @param {InspectorWidget} element The widget element.
336
+ * @param {ProcessElementOptions} options Options containing update hooks.
337
+ */
338
+ processElement(element: InspectorWidget, options: ProcessElementOptions): void;
339
+ /**
340
+ * Updates all widgets that have an onWidgetUpdate hook.
341
+ */
342
+ updateWidgets(): void;
343
+ /**
344
+ * Helper to parse a color array into a styled HTML string.
345
+ * @param {[number, number, number, number]} color The color array [r, g, b, a].
346
+ * @returns {string} The styled HTML string representing the color.
347
+ */
348
+ static parseColor(color: [number, number, number, number]): string;
349
+ }
350
+ //# sourceMappingURL=inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../src/inspector/inspector.ts"],"names":[],"mappings":"AAAA,OAAO,KACP,EACC,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAEhB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,MAAM,qBAAqB,CAAC;AAW7B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;;;;;;;;GASG;AACH,qBAAa,SAAU,YAAW,aAAa;IAE9C;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAClC;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAqC;IACxE;;OAEG;IACH,OAAO,EAAE,eAAe,EAAE,CAAM;IAChC;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAsC;IAEjF;;OAEG;IACH,SAAS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G;IACH,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,gBAAgB;IA+FvE;;;OAGG;IACH,iBAAiB,CAAC,OAAO,EAAE,gBAAgB;IAe3C;;;OAGG;IACH,iBAAiB;IAWjB;;OAEG;IACH,iBAAiB;IAKjB;;;;;OAKG;IACH,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB;IA2CrD;;OAEG;IACH,QAAQ;IASR;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;IAsBjD;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM;IAUnB;;;;OAIG;IACH,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,MAAM;IAK5E;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,qBAAqB;IAWvE;;OAEG;IACH,aAAa;IASb;;;;OAIG;WACW,UAAU,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;CAOhE"}
@@ -0,0 +1,20 @@
1
+ import { Inspector } from "./inspector";
2
+ import { LineEditorOptions } from "../widgets";
3
+ import { InspectorWidget } from "../@types/Inspector";
4
+ /**
5
+ * Adds a line editor widget to the inspector with the specified name, value, and options.
6
+ * @function AddLine
7
+ *
8
+ * @param {Inspector} that - The reference to the inspector
9
+ * @param {string} name - The name of the line widget.
10
+ * @param {number[][]} value - The initial value of the file input widget.
11
+ * @param {LineEditorOptions} [options] - The options for the file input widget.
12
+ * @returns The created file input widget element.
13
+ */
14
+ export declare function AddLineEditor(that: Inspector, name: string, value: number[][], options: LineEditorOptions): InspectorWidget;
15
+ declare module "./inspector" {
16
+ interface Inspector {
17
+ addLineEditor(name: string, value: number[][], options?: LineEditorOptions): InspectorWidget;
18
+ }
19
+ }
20
+ //# sourceMappingURL=line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/inspector/line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAiC,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAC;AAE3E;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,iBAAiB,mBAsBzG;AAED,OAAO,QAAQ,aAAa,CAAC;IAC5B,UAAU,SAAS;QAElB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,eAAe,CAAC;KAC7F;CACD"}
@@ -0,0 +1,153 @@
1
+ import { CreateWidgetOptions, InspectorActiveWidget, InspectorValue, WidgetChangeOptions } from "../@types/Inspector";
2
+ import { Inspector } from "./inspector";
3
+ /**
4
+ * Options for creating a List widget.
5
+ */
6
+ export interface AddListOptions extends CreateWidgetOptions, Omit<WidgetChangeOptions, 'callback'> {
7
+ /**
8
+ * Height of the list in pixels.
9
+ */
10
+ height?: number;
11
+ /**
12
+ * Whether the list is disabled.
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ /**
17
+ * Allow multiple items to be selected.
18
+ * @default false
19
+ */
20
+ multiSelection?: boolean;
21
+ /**
22
+ * The initially selected item value.
23
+ */
24
+ selected?: string;
25
+ /**
26
+ * Callback function to execute when an item is double-clicked.
27
+ */
28
+ onDoubleClick?: (value: string) => void;
29
+ }
30
+ /**
31
+ * Represents an item in the list.
32
+ */
33
+ export interface ListItemOptions {
34
+ /**
35
+ * Content to display for the item (can be HTML).
36
+ */
37
+ content: string;
38
+ /**
39
+ * Title tooltip for the item.
40
+ */
41
+ title: string;
42
+ /**
43
+ * Unique name/identifier for the item.
44
+ */
45
+ name: string;
46
+ /**
47
+ * Inline CSS styles for the item.
48
+ */
49
+ style: string;
50
+ /**
51
+ * URL of an icon to display with the item.
52
+ */
53
+ icon: string;
54
+ /**
55
+ * Whether the item is selected.
56
+ */
57
+ selected: boolean;
58
+ }
59
+ /**
60
+ * Interface representing the List widget.
61
+ */
62
+ export interface InspectorListWidget extends InspectorActiveWidget {
63
+ /**
64
+ * Adds a new item to the list.
65
+ * @param {string} value The value/name of the item.
66
+ * @param {boolean} selected Whether the item should be selected.
67
+ */
68
+ addItem: (value: string, selected: boolean) => void;
69
+ /**
70
+ * Removes an item from the list by name.
71
+ * @param {string} value The value/name of the item to remove.
72
+ */
73
+ removeItem: (value: string) => void;
74
+ /**
75
+ * Updates the entire list of items.
76
+ * @param {string[]} new_values Array of new item values.
77
+ * @param {string} [item_selected] The value of the item to select.
78
+ */
79
+ updateItems: (new_values: string[], item_selected?: string) => void;
80
+ /**
81
+ * Retrieves the currently selected items.
82
+ * @returns {string[]} Array of selected item names.
83
+ */
84
+ getSelected: () => string[];
85
+ /**
86
+ * Gets the list item element by its index.
87
+ * @param {number} index The index of the item.
88
+ * @returns {HTMLElement} The list item element.
89
+ */
90
+ getByIndex: (index: number) => HTMLElement;
91
+ /**
92
+ * Selects an item by its index.
93
+ * @param {number} index The index of the item to select.
94
+ * @param {boolean} [add_to_selection] If true, adds to existing selection instead of replacing it.
95
+ * @returns {HTMLElement} The selected list item element.
96
+ */
97
+ selectIndex: (index: number, add_to_selection?: boolean) => HTMLElement;
98
+ /**
99
+ * Deselects an item by its index.
100
+ * @param {number} index The index of the item to deselect.
101
+ * @returns {HTMLElement} The deselected list item element.
102
+ */
103
+ deselectIndex: (index: number) => HTMLElement;
104
+ /**
105
+ * Scrolls the list to ensure the item at the specified index is visible.
106
+ * @param {number} index The index of the item to scroll to.
107
+ */
108
+ scrollToIndex: (index: number) => void;
109
+ /**
110
+ * Selects all items in the list.
111
+ */
112
+ selectAll: () => void;
113
+ /**
114
+ * Deselects all items in the list.
115
+ */
116
+ deselectAll: () => void;
117
+ /**
118
+ * Sets the values (items) of the list.
119
+ * @param {string[]} value Array of item values.
120
+ */
121
+ setValue: (value: InspectorValue) => void;
122
+ /**
123
+ * Returns the number of items in the list.
124
+ */
125
+ getNumberOfItems: () => void;
126
+ /**
127
+ * Filters the list items based on a callback or string match.
128
+ * @param {string | ((value: number, item: HTMLElement, selected: boolean) => boolean)} [callback] filter string or callback function.
129
+ * @param {boolean} [case_sensitive] Whether the string filter is case sensitive.
130
+ */
131
+ filter: (callback?: string | ((value: number, item: HTMLElement, selected: boolean) => boolean), case_sensitive?: boolean) => void;
132
+ /**
133
+ * Selects items that match a filter callback.
134
+ * @param {(value: number, item: HTMLElement, selected: boolean) => boolean} callback Function to determine if an item should be selected.
135
+ */
136
+ selectByFilter: (callback: ((value: number, item: HTMLElement, selected: boolean) => boolean)) => void;
137
+ }
138
+ /**
139
+ * Widget to select from a list of items.
140
+ * @function AddList
141
+ * @param {Inspector} that The inspector instance.
142
+ * @param {string} [name] The name of the widget.
143
+ * @param {string[]} [values] Array of string values for the list items.
144
+ * @param {AddListOptions} [options] Configuration options.
145
+ * @returns {InspectorListWidget} The created list widget element.
146
+ */
147
+ export declare function AddList(that: Inspector, name?: string, values?: string[], options?: AddListOptions): InspectorListWidget;
148
+ declare module "./inspector" {
149
+ interface Inspector {
150
+ addList(name?: string, values?: string[], options?: AddListOptions): InspectorListWidget;
151
+ }
152
+ }
153
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/inspector/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,C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Inspector } from "./inspector";
2
+ import { Dragger, DraggerOptions } from "../dragger";
3
+ import { CreateWidgetOptions, WidgetChangeOptions, InspectorActiveWidget, InspectorValue } from "../@types/Inspector";
4
+ /**
5
+ * Options for creating a Number widget.
6
+ */
7
+ export interface AddNumberOptions extends CreateWidgetOptions, DraggerOptions, Omit<WidgetChangeOptions, 'callback'> {
8
+ /**
9
+ * Tab index for the input element.
10
+ */
11
+ tabIndex?: number;
12
+ /**
13
+ * CSS class to apply to the widget.
14
+ */
15
+ extraClass?: string;
16
+ /**
17
+ * Whether to use full number width.
18
+ */
19
+ fullNumWidth?: boolean;
20
+ /**
21
+ * Number of digits after the decimal point.
22
+ */
23
+ precision?: number;
24
+ /**
25
+ * Step value for incrementing/decrementing.
26
+ */
27
+ step?: number;
28
+ /**
29
+ * Unit string to display after the number (e.g. "px", "%").
30
+ */
31
+ units?: string;
32
+ /**
33
+ * Whether the widget is disabled.
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Callback function triggered when the value changes visually.
38
+ */
39
+ onChange?: (value: number) => number | void;
40
+ /**
41
+ * Callback function triggered after the value changes logically.
42
+ */
43
+ callback?: (value: number) => void;
44
+ /**
45
+ * Callback function triggered before the value changes (on start dragging).
46
+ */
47
+ preCallback?: () => void;
48
+ }
49
+ /**
50
+ * Interface representing the Number widget.
51
+ */
52
+ export interface InspectorNumberWidget extends InspectorActiveWidget {
53
+ /**
54
+ * Reference to the internal Dragger instance.
55
+ */
56
+ dragger: Dragger;
57
+ /**
58
+ * Sets the valid range for the number.
59
+ * @param {number} min Minimum value.
60
+ * @param {number} max Maximum value.
61
+ */
62
+ setRange: (min: number, max: number) => void;
63
+ /**
64
+ * Sets the value of the widget.
65
+ * @param {number | string} [value] The new value.
66
+ * @param {boolean} [skipEvent] If true, change event is not triggered.
67
+ */
68
+ setValue: (value?: InspectorValue, skipEvent?: boolean) => void;
69
+ }
70
+ /**
71
+ * Widget to edit numbers (it adds a dragging mini widget in the right side).
72
+ * @function AddNumber
73
+ * @param {Inspector} that The inspector instance.
74
+ * @param {string | undefined} name The name of the widget.
75
+ * @param {number | undefined} value The initial value.
76
+ * @param {AddNumberOptions | undefined} options Configuration options.
77
+ * @returns {InspectorNumberWidget} The created number widget element.
78
+ */
79
+ export declare function AddNumber(that: Inspector, name?: string, value?: number, options?: AddNumberOptions): InspectorNumberWidget;
80
+ declare module "./inspector" {
81
+ interface Inspector {
82
+ addNumber(name?: string, value?: number, options?: AddNumberOptions): InspectorNumberWidget;
83
+ }
84
+ }
85
+ //# sourceMappingURL=number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/inspector/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGtH;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB,EAAE,cAAc,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC;IAEnH;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KA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