domma-js 0.3.1-alpha → 0.7.0-alpha

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 (39) hide show
  1. package/README.md +33 -30
  2. package/assets/types/config.d.ts +127 -0
  3. package/assets/types/dates.d.ts +209 -0
  4. package/assets/types/dom.d.ts +448 -0
  5. package/assets/types/elements.d.ts +606 -0
  6. package/assets/types/http.d.ts +97 -0
  7. package/assets/types/icons.d.ts +147 -0
  8. package/assets/types/index.d.ts +197 -0
  9. package/assets/types/models.d.ts +188 -0
  10. package/assets/types/storage.d.ts +93 -0
  11. package/assets/types/tables.d.ts +327 -0
  12. package/assets/types/theme.d.ts +136 -0
  13. package/assets/types/utils.d.ts +675 -0
  14. package/bin/domma-cli.js +144 -0
  15. package/package.json +12 -5
  16. package/public/dist/bundles/domma-complete.css +2316 -170
  17. package/public/dist/bundles/domma-data-focused.css +2686 -321
  18. package/public/dist/bundles/domma-essentials.css +2686 -321
  19. package/public/dist/bundles/domma-full.css +2686 -321
  20. package/public/dist/bundles/domma-grayve.css +13839 -0
  21. package/public/dist/bundles/domma-minimal.css +1591 -9
  22. package/public/dist/domma-syntax.min.js +8 -0
  23. package/public/dist/domma.css +1586 -4
  24. package/public/dist/domma.esm.js +4 -4
  25. package/public/dist/domma.min.js +4 -4
  26. package/public/dist/elements.css +368 -17
  27. package/public/dist/grid.css +3 -3
  28. package/public/dist/syntax.css +3 -3
  29. package/public/dist/themes/domma-themes.css +216 -3
  30. package/public/dist/themes/grayve.css +213 -0
  31. package/templates/kickstart/about/index.html +241 -0
  32. package/templates/kickstart/assets/logo/placeholder.svg +6 -0
  33. package/templates/kickstart/blog/index.html +227 -0
  34. package/templates/kickstart/contact/index.html +218 -0
  35. package/templates/kickstart/css/custom.css +121 -0
  36. package/templates/kickstart/docs/index.html +310 -0
  37. package/templates/kickstart/domma.config.json +47 -0
  38. package/templates/kickstart/index.html +170 -0
  39. package/templates/kickstart/js/app.js +161 -0
@@ -0,0 +1,448 @@
1
+ /**
2
+ * Domma DOM Module - TypeScript Declarations
3
+ * jQuery-compatible DOM manipulation with chainable API
4
+ */
5
+
6
+ export interface Offset {
7
+ top: number;
8
+ left: number;
9
+ }
10
+
11
+ export interface Position {
12
+ top: number;
13
+ left: number;
14
+ }
15
+
16
+ export interface AnimationProperties {
17
+ [property: string]: string | number;
18
+ }
19
+
20
+ export type Duration = number | 'fast' | 'slow';
21
+
22
+ export type FilterFunction = (this: HTMLElement, index: number, element: HTMLElement) => boolean;
23
+ export type ClassFunction = (this: HTMLElement, index: number, currentClass: string) => string;
24
+ export type ContentFunction = (this: HTMLElement, index: number, currentContent: string) => string | HTMLElement | DommaCollection;
25
+ export type WrapperFunction = (this: HTMLElement, index: number) => string | HTMLElement;
26
+ export type ValueFunction = (this: HTMLElement, index: number, currentValue: number) => number | string;
27
+ export type EventHandler = (this: HTMLElement, event: Event) => void;
28
+
29
+ /**
30
+ * DommaCollection - jQuery-compatible chainable DOM collection
31
+ */
32
+ export declare class DommaCollection {
33
+ /** Array of matched elements */
34
+ elements: HTMLElement[];
35
+ /** Number of matched elements */
36
+ length: number;
37
+
38
+ constructor(selector: string | HTMLElement | NodeList | HTMLCollection | HTMLElement[] | DommaCollection, context?: Document | HTMLElement);
39
+
40
+ // ============================================
41
+ // Traversal Methods (22)
42
+ // ============================================
43
+
44
+ /** Get descendants matching selector */
45
+ find(selector: string): DommaCollection;
46
+
47
+ /** Get immediate children, optionally filtered by selector */
48
+ children(selector?: string): DommaCollection;
49
+
50
+ /** Get parent of each element, optionally filtered by selector */
51
+ parent(selector?: string): DommaCollection;
52
+
53
+ /** Get all ancestors, optionally filtered by selector */
54
+ parents(selector?: string): DommaCollection;
55
+
56
+ /** Get closest ancestor matching selector */
57
+ closest(selector: string): DommaCollection;
58
+
59
+ /** Get siblings, optionally filtered by selector */
60
+ siblings(selector?: string): DommaCollection;
61
+
62
+ /** Get next sibling, optionally filtered by selector */
63
+ next(selector?: string): DommaCollection;
64
+
65
+ /** Get all following siblings, optionally filtered by selector */
66
+ nextAll(selector?: string): DommaCollection;
67
+
68
+ /** Get previous sibling, optionally filtered by selector */
69
+ prev(selector?: string): DommaCollection;
70
+
71
+ /** Get all preceding siblings, optionally filtered by selector */
72
+ prevAll(selector?: string): DommaCollection;
73
+
74
+ /** Get first element in collection */
75
+ first(): DommaCollection;
76
+
77
+ /** Get last element in collection */
78
+ last(): DommaCollection;
79
+
80
+ /** Get element at index (supports negative indices) */
81
+ eq(index: number): DommaCollection;
82
+
83
+ /** Get raw element at index, or all elements if no index */
84
+ get(): HTMLElement[];
85
+ get(index: number): HTMLElement | undefined;
86
+
87
+ /** Filter elements by selector or function */
88
+ filter(selector: string): DommaCollection;
89
+ filter(fn: FilterFunction): DommaCollection;
90
+
91
+ /** Remove elements matching selector from collection */
92
+ not(selector: string): DommaCollection;
93
+ not(fn: FilterFunction): DommaCollection;
94
+
95
+ /** Check if any element matches selector */
96
+ is(selector: string): boolean;
97
+
98
+ /** Filter elements that have descendants matching selector */
99
+ has(selector: string): DommaCollection;
100
+
101
+ /** Add elements to the collection */
102
+ add(selector: string | HTMLElement | DommaCollection): DommaCollection;
103
+
104
+ /** Get children including text nodes */
105
+ contents(): DommaCollection;
106
+
107
+ /** Convert to array of elements */
108
+ toArray(): HTMLElement[];
109
+
110
+ /** Get index of element in collection or in parent */
111
+ index(): number;
112
+ index(selector: string): number;
113
+ index(element: HTMLElement): number;
114
+
115
+ // ============================================
116
+ // Content Methods (4)
117
+ // ============================================
118
+
119
+ /** Iterate over each element */
120
+ each(callback: (this: HTMLElement, index: number, element: HTMLElement) => void): DommaCollection;
121
+
122
+ /** Get inner HTML of first element */
123
+ html(): string;
124
+ /** Set inner HTML of all elements */
125
+ html(content: string): DommaCollection;
126
+
127
+ /** Get combined text content of all elements */
128
+ text(): string;
129
+ /** Set text content of all elements */
130
+ text(content: string): DommaCollection;
131
+
132
+ /** Get value of first form element */
133
+ val(): string | string[] | undefined;
134
+ /** Set value of all form elements */
135
+ val(value: string | string[]): DommaCollection;
136
+
137
+ // ============================================
138
+ // Attribute Methods (6)
139
+ // ============================================
140
+
141
+ /** Get attribute value */
142
+ attr(name: string): string | undefined;
143
+ /** Set attribute value */
144
+ attr(name: string, value: string): DommaCollection;
145
+ /** Set multiple attributes */
146
+ attr(attributes: Record<string, string>): DommaCollection;
147
+
148
+ /** Remove attribute(s) - space-separated */
149
+ removeAttr(name: string): DommaCollection;
150
+
151
+ /** Get property value */
152
+ prop(name: string): any;
153
+ /** Set property value */
154
+ prop(name: string, value: any): DommaCollection;
155
+ /** Set multiple properties */
156
+ prop(properties: Record<string, any>): DommaCollection;
157
+
158
+ /** Remove property */
159
+ removeProp(name: string): DommaCollection;
160
+
161
+ /** Get all data attributes */
162
+ data(): Record<string, string>;
163
+ /** Get data attribute value */
164
+ data(key: string): string | undefined;
165
+ /** Set data attribute value */
166
+ data(key: string, value: any): DommaCollection;
167
+ /** Set multiple data attributes */
168
+ data(data: Record<string, any>): DommaCollection;
169
+
170
+ /** Remove data attribute */
171
+ removeData(key: string): DommaCollection;
172
+
173
+ // ============================================
174
+ // CSS/Class Methods (5)
175
+ // ============================================
176
+
177
+ /** Get computed CSS property value */
178
+ css(property: string): string;
179
+ /** Set CSS property value */
180
+ css(property: string, value: string | number): DommaCollection;
181
+ /** Set multiple CSS properties */
182
+ css(properties: Record<string, string | number>): DommaCollection;
183
+
184
+ /** Add class(es) - space-separated */
185
+ addClass(className: string): DommaCollection;
186
+ addClass(fn: ClassFunction): DommaCollection;
187
+
188
+ /** Remove class(es) - space-separated, or all if no argument */
189
+ removeClass(): DommaCollection;
190
+ removeClass(className: string): DommaCollection;
191
+ removeClass(fn: ClassFunction): DommaCollection;
192
+
193
+ /** Toggle class(es) */
194
+ toggleClass(className: string, state?: boolean): DommaCollection;
195
+ toggleClass(fn: (this: HTMLElement, index: number, currentClass: string, state?: boolean) => string, state?: boolean): DommaCollection;
196
+
197
+ /** Check if any element has class */
198
+ hasClass(className: string): boolean;
199
+
200
+ // ============================================
201
+ // DOM Manipulation (16)
202
+ // ============================================
203
+
204
+ /** Append content to each element */
205
+ append(content: string | HTMLElement | DommaCollection): DommaCollection;
206
+ append(fn: ContentFunction): DommaCollection;
207
+
208
+ /** Prepend content to each element */
209
+ prepend(content: string | HTMLElement | DommaCollection): DommaCollection;
210
+ prepend(fn: ContentFunction): DommaCollection;
211
+
212
+ /** Insert content after each element */
213
+ after(content: string | HTMLElement | DommaCollection): DommaCollection;
214
+ after(fn: ContentFunction): DommaCollection;
215
+
216
+ /** Insert content before each element */
217
+ before(content: string | HTMLElement | DommaCollection): DommaCollection;
218
+ before(fn: ContentFunction): DommaCollection;
219
+
220
+ /** Append elements to target */
221
+ appendTo(target: string | HTMLElement | DommaCollection): DommaCollection;
222
+
223
+ /** Prepend elements to target */
224
+ prependTo(target: string | HTMLElement | DommaCollection): DommaCollection;
225
+
226
+ /** Insert elements after target */
227
+ insertAfter(target: string | HTMLElement | DommaCollection): DommaCollection;
228
+
229
+ /** Insert elements before target */
230
+ insertBefore(target: string | HTMLElement | DommaCollection): DommaCollection;
231
+
232
+ /** Wrap each element with structure */
233
+ wrap(wrapper: string | HTMLElement): DommaCollection;
234
+ wrap(fn: WrapperFunction): DommaCollection;
235
+
236
+ /** Wrap all elements together with structure */
237
+ wrapAll(wrapper: string | HTMLElement): DommaCollection;
238
+
239
+ /** Wrap inner contents of each element */
240
+ wrapInner(wrapper: string | HTMLElement): DommaCollection;
241
+ wrapInner(fn: WrapperFunction): DommaCollection;
242
+
243
+ /** Remove parent wrapper from each element */
244
+ unwrap(selector?: string): DommaCollection;
245
+
246
+ /** Remove elements from DOM */
247
+ remove(selector?: string): DommaCollection;
248
+
249
+ /** Remove elements from DOM (alias for remove) */
250
+ detach(): DommaCollection;
251
+
252
+ /** Remove all children from elements */
253
+ empty(): DommaCollection;
254
+
255
+ /** Clone elements */
256
+ clone(deep?: boolean): DommaCollection;
257
+
258
+ /** Replace each element with content */
259
+ replaceWith(content: string | HTMLElement | DommaCollection): DommaCollection;
260
+ replaceWith(fn: ContentFunction): DommaCollection;
261
+
262
+ /** Replace target with elements */
263
+ replaceAll(target: string | HTMLElement | DommaCollection): DommaCollection;
264
+
265
+ // ============================================
266
+ // Event Methods (22+)
267
+ // ============================================
268
+
269
+ /** Attach event handler */
270
+ on(event: string, handler: EventHandler): DommaCollection;
271
+ /** Attach delegated event handler */
272
+ on(event: string, selector: string, handler: EventHandler): DommaCollection;
273
+
274
+ /** Remove event handler */
275
+ off(event?: string, handler?: EventHandler): DommaCollection;
276
+ /** Remove delegated event handler */
277
+ off(event: string, selector: string, handler?: EventHandler): DommaCollection;
278
+
279
+ /** Attach handler that executes once */
280
+ one(event: string, handler: EventHandler): DommaCollection;
281
+ one(event: string, selector: string, handler: EventHandler): DommaCollection;
282
+
283
+ /** Trigger event on elements */
284
+ trigger(event: string, data?: any): DommaCollection;
285
+
286
+ /** Trigger native event */
287
+ triggerNative(eventType: string): DommaCollection;
288
+
289
+ // Event shortcuts
290
+ click(): DommaCollection;
291
+ click(handler: EventHandler): DommaCollection;
292
+
293
+ dblclick(): DommaCollection;
294
+ dblclick(handler: EventHandler): DommaCollection;
295
+
296
+ mousedown(): DommaCollection;
297
+ mousedown(handler: EventHandler): DommaCollection;
298
+
299
+ mouseup(): DommaCollection;
300
+ mouseup(handler: EventHandler): DommaCollection;
301
+
302
+ mousemove(): DommaCollection;
303
+ mousemove(handler: EventHandler): DommaCollection;
304
+
305
+ mouseover(): DommaCollection;
306
+ mouseover(handler: EventHandler): DommaCollection;
307
+
308
+ mouseout(): DommaCollection;
309
+ mouseout(handler: EventHandler): DommaCollection;
310
+
311
+ mouseenter(): DommaCollection;
312
+ mouseenter(handler: EventHandler): DommaCollection;
313
+
314
+ mouseleave(): DommaCollection;
315
+ mouseleave(handler: EventHandler): DommaCollection;
316
+
317
+ keydown(): DommaCollection;
318
+ keydown(handler: EventHandler): DommaCollection;
319
+
320
+ keyup(): DommaCollection;
321
+ keyup(handler: EventHandler): DommaCollection;
322
+
323
+ keypress(): DommaCollection;
324
+ keypress(handler: EventHandler): DommaCollection;
325
+
326
+ focus(): DommaCollection;
327
+ focus(handler: EventHandler): DommaCollection;
328
+
329
+ blur(): DommaCollection;
330
+ blur(handler: EventHandler): DommaCollection;
331
+
332
+ change(): DommaCollection;
333
+ change(handler: EventHandler): DommaCollection;
334
+
335
+ select(): DommaCollection;
336
+ select(handler: EventHandler): DommaCollection;
337
+
338
+ submit(): DommaCollection;
339
+ submit(handler: EventHandler): DommaCollection;
340
+
341
+ scroll(): DommaCollection;
342
+ scroll(handler: EventHandler): DommaCollection;
343
+
344
+ resize(): DommaCollection;
345
+ resize(handler: EventHandler): DommaCollection;
346
+
347
+ /** Handle mouseenter and mouseleave */
348
+ hover(enterHandler: EventHandler, leaveHandler?: EventHandler): DommaCollection;
349
+
350
+ // ============================================
351
+ // Effects/Animation (12)
352
+ // ============================================
353
+
354
+ /** Show elements */
355
+ show(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
356
+
357
+ /** Hide elements */
358
+ hide(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
359
+
360
+ /** Toggle visibility */
361
+ toggle(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
362
+
363
+ /** Fade in elements */
364
+ fadeIn(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
365
+
366
+ /** Fade out elements */
367
+ fadeOut(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
368
+
369
+ /** Toggle fade */
370
+ fadeToggle(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
371
+
372
+ /** Fade to specific opacity */
373
+ fadeTo(duration: Duration, opacity: number, callback?: (this: HTMLElement) => void): DommaCollection;
374
+
375
+ /** Slide up (hide) */
376
+ slideUp(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
377
+
378
+ /** Slide down (show) */
379
+ slideDown(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
380
+
381
+ /** Toggle slide */
382
+ slideToggle(duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
383
+
384
+ /** Animate CSS properties */
385
+ animate(properties: AnimationProperties, duration?: Duration, easing?: string, callback?: (this: HTMLElement) => void): DommaCollection;
386
+ animate(properties: AnimationProperties, duration?: Duration, callback?: (this: HTMLElement) => void): DommaCollection;
387
+ animate(properties: AnimationProperties, callback?: (this: HTMLElement) => void): DommaCollection;
388
+
389
+ /** Stop animations */
390
+ stop(): DommaCollection;
391
+
392
+ /** Delay next animation - returns Promise */
393
+ delay(duration: number): Promise<DommaCollection>;
394
+
395
+ // ============================================
396
+ // Dimensions (11)
397
+ // ============================================
398
+
399
+ /** Get width */
400
+ width(): number | undefined;
401
+ /** Set width */
402
+ width(value: number | string): DommaCollection;
403
+ width(fn: ValueFunction): DommaCollection;
404
+
405
+ /** Get height */
406
+ height(): number | undefined;
407
+ /** Set height */
408
+ height(value: number | string): DommaCollection;
409
+ height(fn: ValueFunction): DommaCollection;
410
+
411
+ /** Get inner width (content + padding) */
412
+ innerWidth(): number | undefined;
413
+
414
+ /** Get inner height (content + padding) */
415
+ innerHeight(): number | undefined;
416
+
417
+ /** Get outer width (content + padding + border + optional margin) */
418
+ outerWidth(includeMargin?: boolean): number | undefined;
419
+
420
+ /** Get outer height (content + padding + border + optional margin) */
421
+ outerHeight(includeMargin?: boolean): number | undefined;
422
+
423
+ /** Get offset (position relative to document) */
424
+ offset(): Offset | undefined;
425
+ /** Set offset */
426
+ offset(coords: Partial<Offset>): DommaCollection;
427
+
428
+ /** Get position (relative to offset parent) */
429
+ position(): Position | undefined;
430
+
431
+ /** Get scroll top position */
432
+ scrollTop(): number | undefined;
433
+ /** Set scroll top position */
434
+ scrollTop(value: number): DommaCollection;
435
+
436
+ /** Get scroll left position */
437
+ scrollLeft(): number | undefined;
438
+ /** Set scroll left position */
439
+ scrollLeft(value: number): DommaCollection;
440
+
441
+ /** Get offset parent */
442
+ offsetParent(): DommaCollection;
443
+ }
444
+
445
+ /**
446
+ * DOM factory function - creates DommaCollection
447
+ */
448
+ export declare function dom(selector: string | HTMLElement | NodeList | HTMLCollection | HTMLElement[] | DommaCollection, context?: Document | HTMLElement): DommaCollection;