cradova 3.3.3 → 3.3.5
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.
- package/README.md +2 -2
- package/dist/index.d.ts +3 -615
- package/dist/index.js +1097 -2
- package/dist/primitives/classes.d.ts +350 -0
- package/dist/primitives/dom-objects.d.ts +60 -0
- package/dist/primitives/functions.d.ts +52 -0
- package/dist/primitives/types.d.ts +89 -0
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -511,9 +511,9 @@ Join Us on [telegram](https://t.me/UiedbookHQ).
|
|
|
511
511
|
|
|
512
512
|
If you contribute code to this project, you are implicitly allowing your code to be distributed under same license. You are also implicitly verifying that all code is your original work.
|
|
513
513
|
|
|
514
|
-
## Supporting
|
|
514
|
+
## Supporting Cradova development
|
|
515
515
|
|
|
516
|
-
Your Support is a good force for change anytime you do it, you can ensure Our projects, growth, Cradova,
|
|
516
|
+
Your Support is a good force for change anytime you do it, you can ensure Our projects, growth, Cradova, Cradova, JetPath etc, growth and improvement by making a re-occuring or fixed sponsorship
|
|
517
517
|
to [github sponsors](https://github.com/sponsors/FridayCandour):
|
|
518
518
|
or crypto using
|
|
519
519
|
etheruen: `0xD7DDD4312A4e514751A582AF725238C7E6dF206c`,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,592 +1,3 @@
|
|
|
1
|
-
import * as CSS from 'csstype';
|
|
2
|
-
|
|
3
|
-
/*! *****************************************************************************
|
|
4
|
-
Copyright 2022 Friday Candour. All rights reserved.
|
|
5
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
6
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
7
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
10
|
-
and limitations under the License.
|
|
11
|
-
********************************************************************************/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Cradova event
|
|
15
|
-
*/
|
|
16
|
-
declare class cradovaEvent {
|
|
17
|
-
private listeners;
|
|
18
|
-
private active_listeners;
|
|
19
|
-
addEventListener(eventName: string, callback: () => void): Promise<void>;
|
|
20
|
-
addActiveEventListener(eventName: string, callback: () => void): Promise<void>;
|
|
21
|
-
dispatchEvent(eventName: string, eventArgs?: unknown): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Active refs is a concept for delegated screens to keep their active refs alive
|
|
24
|
-
* even in the case of naviagtion
|
|
25
|
-
* @param eventName
|
|
26
|
-
* @param eventArgs
|
|
27
|
-
*/
|
|
28
|
-
dispatchActiveEvent(eventName: string, eventArgs?: unknown): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
declare const CradovaEvent: cradovaEvent;
|
|
31
|
-
/**
|
|
32
|
-
* Cradova Ref
|
|
33
|
-
* -------
|
|
34
|
-
* create dynamic components
|
|
35
|
-
*/
|
|
36
|
-
declare class Ref<Prop extends Record<string, any> = any> {
|
|
37
|
-
private component;
|
|
38
|
-
private effects;
|
|
39
|
-
private effectuate;
|
|
40
|
-
methods: Record<string, Function>;
|
|
41
|
-
private rendered;
|
|
42
|
-
private published;
|
|
43
|
-
private preRendered;
|
|
44
|
-
private reference;
|
|
45
|
-
Signal: createSignal<any> | undefined;
|
|
46
|
-
_state: Prop[];
|
|
47
|
-
_state_track: {
|
|
48
|
-
[x: number]: boolean;
|
|
49
|
-
};
|
|
50
|
-
_state_index: number;
|
|
51
|
-
stash: Prop | undefined;
|
|
52
|
-
constructor(component: (this: Ref<Prop>, data: Prop) => HTMLElement | DocumentFragment);
|
|
53
|
-
preRender(data?: Prop, stash?: boolean): void;
|
|
54
|
-
destroyPreRendered(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Cradova Ref
|
|
57
|
-
* ---
|
|
58
|
-
* construct to add custom methods to Refs
|
|
59
|
-
* @param methodName
|
|
60
|
-
* @param method
|
|
61
|
-
* @returns void
|
|
62
|
-
*/
|
|
63
|
-
define(methodName: string, method: (this: this, ...arg: any) => void): void;
|
|
64
|
-
/**
|
|
65
|
-
* Cradova Ref
|
|
66
|
-
* ---
|
|
67
|
-
* returns html with cradova reference
|
|
68
|
-
* @param data
|
|
69
|
-
* @returns () => HTMLElement
|
|
70
|
-
*/
|
|
71
|
-
render(data?: Prop, stash?: boolean): HTMLElement | DocumentFragment;
|
|
72
|
-
instance(): HTMLElement;
|
|
73
|
-
_setExtra(Extra: createSignal<any>): void;
|
|
74
|
-
_roll_state(data: any, idx: number, get?: boolean): Prop;
|
|
75
|
-
_effect(fn: () => Promise<void> | void): void;
|
|
76
|
-
private effector;
|
|
77
|
-
/**
|
|
78
|
-
* Cradova Ref
|
|
79
|
-
* ---
|
|
80
|
-
* update ref component with new data and update the dom.
|
|
81
|
-
* @param data
|
|
82
|
-
* @returns
|
|
83
|
-
*/
|
|
84
|
-
updateState(data?: Prop, stash?: boolean): void;
|
|
85
|
-
private Activate;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* cradova
|
|
89
|
-
* ---
|
|
90
|
-
* lazy load a file
|
|
91
|
-
*/
|
|
92
|
-
declare class lazy<Type> {
|
|
93
|
-
content: Type | undefined;
|
|
94
|
-
private _cb;
|
|
95
|
-
constructor(cb: () => Promise<unknown>);
|
|
96
|
-
load(): Promise<void>;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Cradova
|
|
100
|
-
* ---
|
|
101
|
-
* make reference to dom elements
|
|
102
|
-
*/
|
|
103
|
-
declare class reference {
|
|
104
|
-
tree: Record<string, any>;
|
|
105
|
-
globalTree: Record<string, HTMLElement>;
|
|
106
|
-
/**
|
|
107
|
-
* Bind a DOM element to a reference name.
|
|
108
|
-
* @param name - The name to reference the DOM element by.
|
|
109
|
-
*/
|
|
110
|
-
bindAs(name: string): reference;
|
|
111
|
-
/**
|
|
112
|
-
* Retrieve a referenced DOM element.
|
|
113
|
-
* @param name - The name of the referenced DOM element.
|
|
114
|
-
*/
|
|
115
|
-
current<ElementType extends HTMLElement = HTMLElement>(name: string): ElementType;
|
|
116
|
-
/**
|
|
117
|
-
* Append a DOM element to the reference, overwriting any existing reference.
|
|
118
|
-
* @param name - The name to reference the DOM element by.
|
|
119
|
-
* @param element - The DOM element to reference.
|
|
120
|
-
*/
|
|
121
|
-
_appendDomForce(name: string, Element: HTMLElement): void;
|
|
122
|
-
_appendDomForceGlobal(name: string, Element: HTMLElement): void;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Cradova Signal
|
|
126
|
-
* ----
|
|
127
|
-
* Create stateful data store.
|
|
128
|
-
* Features:
|
|
129
|
-
* - create a store
|
|
130
|
-
* - create actions and fire them
|
|
131
|
-
* - bind a Ref and elements
|
|
132
|
-
* - listen to updates
|
|
133
|
-
* - set object keys instead of all values
|
|
134
|
-
* - persist changes to localStorage
|
|
135
|
-
* - update a cradova Ref automatically
|
|
136
|
-
* @constructor initial: unknown, props: {useHistory, persist}
|
|
137
|
-
*/
|
|
138
|
-
declare class createSignal<Type extends Record<string, any>> {
|
|
139
|
-
private callback;
|
|
140
|
-
private persistName;
|
|
141
|
-
private actions;
|
|
142
|
-
private ref;
|
|
143
|
-
value: Type;
|
|
144
|
-
constructor(initial: Type, props?: {
|
|
145
|
-
persistName?: string | undefined;
|
|
146
|
-
});
|
|
147
|
-
/**
|
|
148
|
-
* Cradova Signal
|
|
149
|
-
* ----
|
|
150
|
-
* set signal value
|
|
151
|
-
* @param value - signal value
|
|
152
|
-
* @returns void
|
|
153
|
-
*/
|
|
154
|
-
set(value: Type | ((value: Type) => Type), shouldRefRender?: boolean): void;
|
|
155
|
-
/**
|
|
156
|
-
* Cradova Signal
|
|
157
|
-
* ----
|
|
158
|
-
* set a key value if it's an object
|
|
159
|
-
* @param key - key of the key
|
|
160
|
-
* @param value - value of the key
|
|
161
|
-
* @returns void
|
|
162
|
-
*/
|
|
163
|
-
setKey<k extends keyof Type>(key: k, value: unknown, shouldRefRender?: boolean): void;
|
|
164
|
-
/**
|
|
165
|
-
* Cradova Signal
|
|
166
|
-
* ----
|
|
167
|
-
* set a key to signal an action
|
|
168
|
-
* @param name - name of the action
|
|
169
|
-
* @param action function to execute
|
|
170
|
-
*/
|
|
171
|
-
createAction(name: string, action: (data?: unknown) => void): void;
|
|
172
|
-
/**
|
|
173
|
-
* Cradova Signal
|
|
174
|
-
* ----
|
|
175
|
-
* creates man y actions at a time
|
|
176
|
-
* @param name - name of the action
|
|
177
|
-
* @param action function to execute
|
|
178
|
-
*/
|
|
179
|
-
createActions(Actions: Record<string, (data?: unknown) => void>): void;
|
|
180
|
-
/**
|
|
181
|
-
* Cradova Signal
|
|
182
|
-
* ----
|
|
183
|
-
* fires an action if available
|
|
184
|
-
* @param key - string key of the action
|
|
185
|
-
* @param data - data for the action
|
|
186
|
-
*/
|
|
187
|
-
fireAction(key: string, data?: Type): Type;
|
|
188
|
-
/**
|
|
189
|
-
* Cradova
|
|
190
|
-
* ---
|
|
191
|
-
* is used to bind signal data to elements and Refs
|
|
192
|
-
*
|
|
193
|
-
* @param prop
|
|
194
|
-
* @returns something
|
|
195
|
-
*/
|
|
196
|
-
bind(prop: string): any;
|
|
197
|
-
private _updateState;
|
|
198
|
-
/**
|
|
199
|
-
* Cradova Signal
|
|
200
|
-
* ----
|
|
201
|
-
* set a auto - rendering component for this store
|
|
202
|
-
*
|
|
203
|
-
* @param Ref component to bind to.
|
|
204
|
-
* @param path a property in the object to send to attached ref
|
|
205
|
-
*/
|
|
206
|
-
bindRef(ref: Partial<Ref>, binding?: {
|
|
207
|
-
event?: string;
|
|
208
|
-
signalProperty: string;
|
|
209
|
-
_element_property: string;
|
|
210
|
-
}): void;
|
|
211
|
-
/**
|
|
212
|
-
* Cradova Signal
|
|
213
|
-
* ----
|
|
214
|
-
* set a update listener on value changes
|
|
215
|
-
* @param callback
|
|
216
|
-
*/
|
|
217
|
-
listen(callback: (a: Type) => void): void;
|
|
218
|
-
/**
|
|
219
|
-
* Cradova Signal
|
|
220
|
-
* ----
|
|
221
|
-
* clear the history on local storage
|
|
222
|
-
*
|
|
223
|
-
*/
|
|
224
|
-
clearPersist(): void;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Cradova Screen
|
|
228
|
-
* ---
|
|
229
|
-
* create instances of manageable pages
|
|
230
|
-
* @param name
|
|
231
|
-
* @param template
|
|
232
|
-
*/
|
|
233
|
-
declare class Screen$1 {
|
|
234
|
-
/**
|
|
235
|
-
* used internally
|
|
236
|
-
*/
|
|
237
|
-
private _name;
|
|
238
|
-
/**
|
|
239
|
-
* this should be a cradova screen component
|
|
240
|
-
*/
|
|
241
|
-
_html: ((this: Screen$1, data?: unknown) => HTMLElement | DocumentFragment) | HTMLElement | DocumentFragment;
|
|
242
|
-
_packed: boolean;
|
|
243
|
-
private _template;
|
|
244
|
-
private _callBack;
|
|
245
|
-
private _deCallBack;
|
|
246
|
-
private _persist;
|
|
247
|
-
private _delegatedRoutesCount;
|
|
248
|
-
private _dropped;
|
|
249
|
-
/**
|
|
250
|
-
* error handler for the screen
|
|
251
|
-
*/
|
|
252
|
-
_errorHandler: ((err: unknown) => void) | null;
|
|
253
|
-
constructor(cradova_screen_initials: CradovaScreenType);
|
|
254
|
-
_derive(): {
|
|
255
|
-
_name: string;
|
|
256
|
-
_callBack: ((cradovaScreenSet: HTMLElement) => void | Promise<void>) | undefined;
|
|
257
|
-
_deCallBack: ((cradovaScreenSet: HTMLElement) => void | Promise<void>) | undefined;
|
|
258
|
-
};
|
|
259
|
-
_apply_derivation(derivation: {
|
|
260
|
-
_name: string;
|
|
261
|
-
_callBack: ((cradovaScreenSet: HTMLElement) => void | Promise<void>) | undefined;
|
|
262
|
-
_deCallBack: ((cradovaScreenSet: HTMLElement) => void | Promise<void>) | undefined;
|
|
263
|
-
}): void;
|
|
264
|
-
get _delegatedRoutes(): number;
|
|
265
|
-
set _delegatedRoutes(count: number);
|
|
266
|
-
setErrorHandler(errorHandler: (err: unknown) => void): void;
|
|
267
|
-
_package(): Promise<void>;
|
|
268
|
-
onActivate(cb: () => Promise<void> | void): void;
|
|
269
|
-
onDeactivate(cb: () => Promise<void> | void): void;
|
|
270
|
-
_deActivate(): Promise<void>;
|
|
271
|
-
drop(state?: boolean): boolean | undefined;
|
|
272
|
-
_Activate(force?: boolean): Promise<void>;
|
|
273
|
-
}
|
|
274
|
-
/** cradova router
|
|
275
|
-
* ---
|
|
276
|
-
* Registers a route.
|
|
277
|
-
*
|
|
278
|
-
* @param {string} path Route path.
|
|
279
|
-
* @param screen the cradova document tree for the route.
|
|
280
|
-
*/
|
|
281
|
-
declare class Router {
|
|
282
|
-
/** cradova router
|
|
283
|
-
* ---
|
|
284
|
-
* Registers a route.
|
|
285
|
-
*
|
|
286
|
-
* accepts an object containing
|
|
287
|
-
*
|
|
288
|
-
* @param {string} path Route path.
|
|
289
|
-
* @param screen the cradova screen.
|
|
290
|
-
*/
|
|
291
|
-
static BrowserRoutes(obj: Record<string, any>): void;
|
|
292
|
-
/**
|
|
293
|
-
Go back in Navigation history
|
|
294
|
-
*/
|
|
295
|
-
static back(): void;
|
|
296
|
-
/**
|
|
297
|
-
Go forward in Navigation history
|
|
298
|
-
*/
|
|
299
|
-
static forward(): void;
|
|
300
|
-
/**
|
|
301
|
-
Pause navigation
|
|
302
|
-
*/
|
|
303
|
-
static pauseNaviagtion(): void;
|
|
304
|
-
/**
|
|
305
|
-
resume navigation
|
|
306
|
-
*/
|
|
307
|
-
static resumeNaviagtion(): void;
|
|
308
|
-
/**
|
|
309
|
-
* Cradova Router
|
|
310
|
-
* ------
|
|
311
|
-
*
|
|
312
|
-
* Navigates to a designated screen in your app
|
|
313
|
-
*
|
|
314
|
-
* @param href string
|
|
315
|
-
* @param data object
|
|
316
|
-
* @param force boolean
|
|
317
|
-
*/
|
|
318
|
-
static navigate(href: string, data?: Record<string, unknown> | null, force?: boolean): void;
|
|
319
|
-
/**
|
|
320
|
-
* Cradova Router
|
|
321
|
-
* ------
|
|
322
|
-
*
|
|
323
|
-
* Navigates to a designated screen in your app by loading a seperate page;
|
|
324
|
-
*
|
|
325
|
-
* @param pathname string
|
|
326
|
-
*/
|
|
327
|
-
static navigateNauturally(pathname: string): void;
|
|
328
|
-
/**
|
|
329
|
-
* Cradova
|
|
330
|
-
* ---
|
|
331
|
-
* Loading screen for your app
|
|
332
|
-
*
|
|
333
|
-
* lazy loaded loading use
|
|
334
|
-
*
|
|
335
|
-
* @param screen
|
|
336
|
-
*/
|
|
337
|
-
static setLoadingScreen(screen: Screen$1): void;
|
|
338
|
-
/** cradova router
|
|
339
|
-
* ---
|
|
340
|
-
* Listen for navigation events
|
|
341
|
-
*
|
|
342
|
-
* @param callback () => void
|
|
343
|
-
*/
|
|
344
|
-
static onPageEvent(callback: () => void): void;
|
|
345
|
-
/** cradova router
|
|
346
|
-
* ---
|
|
347
|
-
* get a screen ready before time.
|
|
348
|
-
*
|
|
349
|
-
* @param {string} path Route path.
|
|
350
|
-
* @param data data for the screen.
|
|
351
|
-
*/
|
|
352
|
-
static packageScreen(path: string): Promise<void>;
|
|
353
|
-
/**
|
|
354
|
-
* Cradova Router
|
|
355
|
-
* ------
|
|
356
|
-
*
|
|
357
|
-
* return last set router params
|
|
358
|
-
*
|
|
359
|
-
* .
|
|
360
|
-
*/
|
|
361
|
-
static getParams(): Record<string, unknown>;
|
|
362
|
-
/**
|
|
363
|
-
* Cradova
|
|
364
|
-
* ---
|
|
365
|
-
* Error Handler for your app
|
|
366
|
-
*
|
|
367
|
-
* @param callback
|
|
368
|
-
* @param path? page path
|
|
369
|
-
*/
|
|
370
|
-
static addErrorHandler(callback: (err: unknown) => void): void;
|
|
371
|
-
static _mount(): void;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/*! *****************************************************************************
|
|
375
|
-
Copyright 2022 Friday Candour. All rights reserved.
|
|
376
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
377
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
378
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
379
|
-
|
|
380
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
381
|
-
and limitations under the License.
|
|
382
|
-
***************************************************************************** */
|
|
383
|
-
|
|
384
|
-
type DataAttributes = {
|
|
385
|
-
[key: `data-${string}`]: string;
|
|
386
|
-
};
|
|
387
|
-
type AriaAttributes = {
|
|
388
|
-
[key: `aria-${string}`]: string;
|
|
389
|
-
};
|
|
390
|
-
type VJSType<T> = (...VJS: (undefined | string | HTMLElement | HTMLElement[] | Ref | Ref[] | DocumentFragment | DocumentFragment[] | TemplateStringsArray | Partial<T> | (() => HTMLElement) | Partial<DataAttributes> | Partial<AriaAttributes> | CSS.Properties | {
|
|
391
|
-
style?: CSS.Properties;
|
|
392
|
-
onmount?: (this: T) => void;
|
|
393
|
-
reference?: reference;
|
|
394
|
-
})[]) => T;
|
|
395
|
-
type VJS_params_TYPE<T> = (undefined | string | HTMLElement | HTMLElement[] | Ref | Ref[] | DocumentFragment | DocumentFragment[] | TemplateStringsArray | Partial<T> | (() => HTMLElement) | Partial<DataAttributes> | Partial<AriaAttributes> | CSS.Properties<string | number> | {
|
|
396
|
-
src?: string;
|
|
397
|
-
href?: string;
|
|
398
|
-
placeholder?: string;
|
|
399
|
-
type?: string;
|
|
400
|
-
action?: string;
|
|
401
|
-
name?: string;
|
|
402
|
-
alt?: string;
|
|
403
|
-
for?: string;
|
|
404
|
-
method?: string;
|
|
405
|
-
rows?: string;
|
|
406
|
-
value?: string;
|
|
407
|
-
target?: string;
|
|
408
|
-
rel?: string;
|
|
409
|
-
required?: string;
|
|
410
|
-
frameBorder?: string;
|
|
411
|
-
style?: CSS.Properties;
|
|
412
|
-
onmount?: (this: T) => void;
|
|
413
|
-
reference?: reference;
|
|
414
|
-
})[];
|
|
415
|
-
type VJS_Child_TYPE<T> = undefined | string | T | (() => T);
|
|
416
|
-
type VJS_props_TYPE = {
|
|
417
|
-
style?: CSS.Properties;
|
|
418
|
-
onmount?: () => void;
|
|
419
|
-
reference?: reference;
|
|
420
|
-
};
|
|
421
|
-
type CradovaScreenType<T = unknown> = {
|
|
422
|
-
/**
|
|
423
|
-
* Cradova screen
|
|
424
|
-
* ---
|
|
425
|
-
* title of the page
|
|
426
|
-
* .
|
|
427
|
-
*/
|
|
428
|
-
name?: string;
|
|
429
|
-
/**
|
|
430
|
-
* Cradova screen
|
|
431
|
-
* ---
|
|
432
|
-
* a css className to add to screen when rendering it
|
|
433
|
-
* Usually for adding css transitions
|
|
434
|
-
* .
|
|
435
|
-
*/
|
|
436
|
-
/**
|
|
437
|
-
* Cradova screen
|
|
438
|
-
* ---
|
|
439
|
-
* The component for the screen
|
|
440
|
-
* @param data
|
|
441
|
-
* @returns void
|
|
442
|
-
* .
|
|
443
|
-
*/
|
|
444
|
-
template: ((this: Screen, data?: T | unknown) => HTMLElement | DocumentFragment) | HTMLElement | DocumentFragment | Ref<any>;
|
|
445
|
-
/**
|
|
446
|
-
* Cradova screen
|
|
447
|
-
* ---
|
|
448
|
-
* Allows this screen render in parallel for unique routes
|
|
449
|
-
*
|
|
450
|
-
* limit is 1000
|
|
451
|
-
*
|
|
452
|
-
* .
|
|
453
|
-
*/
|
|
454
|
-
renderInParallel?: boolean;
|
|
455
|
-
/**
|
|
456
|
-
* Cradova screen
|
|
457
|
-
* ---
|
|
458
|
-
* Should this screen be cached after first render?
|
|
459
|
-
* you can use Route.navigate(url, null, true) to force later
|
|
460
|
-
*
|
|
461
|
-
* .
|
|
462
|
-
*/
|
|
463
|
-
persist?: boolean;
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
/*! *****************************************************************************
|
|
467
|
-
Copyright 2022 Friday Candour. All rights reserved.
|
|
468
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
469
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
470
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
471
|
-
|
|
472
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
473
|
-
and limitations under the License.
|
|
474
|
-
********************************************************************************/
|
|
475
|
-
|
|
476
|
-
declare const makeElement: <E extends HTMLElement>(element: E & HTMLElement, ElementChildrenAndPropertyList: VJS_params_TYPE<E>) => E;
|
|
477
|
-
declare const make: (descriptor: any) => any[];
|
|
478
|
-
declare const cra: <E extends HTMLElement>(tag: string) => VJSType<E>;
|
|
479
|
-
declare function Rhoda(l: VJSType<HTMLElement>[] | (() => any)[] | Ref[] | HTMLElement[]): DocumentFragment;
|
|
480
|
-
declare function css(identifier: string | TemplateStringsArray): void;
|
|
481
|
-
/**
|
|
482
|
-
*
|
|
483
|
-
* @param {expression} condition
|
|
484
|
-
* @param {function} elements[]
|
|
485
|
-
*/
|
|
486
|
-
declare function $if<Type>(condition: boolean, ...elements: VJS_Child_TYPE<Type | HTMLElement>[]): HTMLElement[] | undefined;
|
|
487
|
-
declare function $ifelse<Type>(condition: boolean, ifTrue: VJS_Child_TYPE<Type | HTMLElement> | VJS_Child_TYPE<Type | HTMLElement>[], ifFalse: VJS_Child_TYPE<Type | HTMLElement> | VJS_Child_TYPE<Type | HTMLElement>[]): VJS_Child_TYPE<HTMLElement | Type> | VJS_Child_TYPE<HTMLElement | Type>[];
|
|
488
|
-
declare function $case<Type>(value: any, ...elements: VJS_Child_TYPE<Type | HTMLElement>[]): (key: any) => HTMLElement[] | undefined;
|
|
489
|
-
declare function $switch(key: unknown, ...cases: ((key: any) => HTMLElement[] | undefined)[]): HTMLElement[] | undefined;
|
|
490
|
-
type LoopData<Type> = Type[];
|
|
491
|
-
declare function loop<Type>(datalist: LoopData<Type>, component: (value: Type, index?: number, array?: LoopData<Type>) => HTMLElement | DocumentFragment | undefined): HTMLElement[] | undefined;
|
|
492
|
-
/** Calculate a simple numerical representation of the URL */
|
|
493
|
-
declare const SNRU: {
|
|
494
|
-
snru: string;
|
|
495
|
-
memo_SNRU(): void;
|
|
496
|
-
};
|
|
497
|
-
/**
|
|
498
|
-
* Document fragment
|
|
499
|
-
* @param children
|
|
500
|
-
* @returns
|
|
501
|
-
*/
|
|
502
|
-
declare const frag: (children: VJSType<HTMLElement>[]) => DocumentFragment;
|
|
503
|
-
/**
|
|
504
|
-
* Cradova
|
|
505
|
-
* ---
|
|
506
|
-
* Allows functional components to manage state by providing a state value and a function to update it.
|
|
507
|
-
* @param initialValue
|
|
508
|
-
* @param ActiveRef
|
|
509
|
-
* @returns [state, setState]
|
|
510
|
-
*/
|
|
511
|
-
declare function useState<S = unknown>(initialValue: S, ActiveRef: Ref): [S, (newState: S) => void];
|
|
512
|
-
/**
|
|
513
|
-
* Cradova
|
|
514
|
-
* ---
|
|
515
|
-
Allows side effects to be performed in functional components (Refs), such as fetching data or subscribing to events.
|
|
516
|
-
* @param effect
|
|
517
|
-
* @returns
|
|
518
|
-
*/
|
|
519
|
-
declare function useEffect(effect: () => void, ActiveRef: Ref): void;
|
|
520
|
-
/**
|
|
521
|
-
* Cradova
|
|
522
|
-
* ---
|
|
523
|
-
Returns a mutable reference object of dom elements that persists across component renders.
|
|
524
|
-
* @returns reference
|
|
525
|
-
*/
|
|
526
|
-
declare function useRef(): Record<string, HTMLElement | undefined>;
|
|
527
|
-
|
|
528
|
-
declare const a: VJSType<HTMLAnchorElement>;
|
|
529
|
-
declare const article: VJSType<HTMLElement>;
|
|
530
|
-
declare const audio: VJSType<HTMLAudioElement>;
|
|
531
|
-
declare const br: VJSType<HTMLBRElement>;
|
|
532
|
-
declare const button: VJSType<HTMLButtonElement>;
|
|
533
|
-
declare const canvas: VJSType<HTMLCanvasElement>;
|
|
534
|
-
declare const caption: VJSType<HTMLTableCaptionElement>;
|
|
535
|
-
declare const col: VJSType<HTMLTableColElement>;
|
|
536
|
-
declare const colgroup: VJSType<HTMLOptGroupElement>;
|
|
537
|
-
declare const datalist: VJSType<HTMLDataListElement>;
|
|
538
|
-
declare const details: VJSType<HTMLDetailsElement>;
|
|
539
|
-
declare const dialog: VJSType<HTMLDialogElement>;
|
|
540
|
-
declare const div: VJSType<HTMLDivElement>;
|
|
541
|
-
declare const em: VJSType<HTMLElement>;
|
|
542
|
-
declare const embed: VJSType<HTMLEmbedElement>;
|
|
543
|
-
declare const figure: VJSType<HTMLElement>;
|
|
544
|
-
declare const footer: VJSType<HTMLElement>;
|
|
545
|
-
declare const form: VJSType<HTMLFormElement>;
|
|
546
|
-
declare const h1: VJSType<HTMLHeadingElement>;
|
|
547
|
-
declare const h2: VJSType<HTMLHeadingElement>;
|
|
548
|
-
declare const h3: VJSType<HTMLHeadingElement>;
|
|
549
|
-
declare const h4: VJSType<HTMLHeadingElement>;
|
|
550
|
-
declare const h5: VJSType<HTMLHeadingElement>;
|
|
551
|
-
declare const h6: VJSType<HTMLHeadingElement>;
|
|
552
|
-
declare const head: VJSType<HTMLHeadElement>;
|
|
553
|
-
declare const header: VJSType<HTMLHeadElement>;
|
|
554
|
-
declare const hr: VJSType<HTMLHRElement>;
|
|
555
|
-
declare const i: VJSType<HTMLLIElement>;
|
|
556
|
-
declare const iframe: VJSType<HTMLIFrameElement>;
|
|
557
|
-
declare const img: VJSType<HTMLImageElement>;
|
|
558
|
-
declare const input: VJSType<HTMLInputElement>;
|
|
559
|
-
declare const label: VJSType<HTMLLabelElement>;
|
|
560
|
-
declare const li: VJSType<HTMLLIElement>;
|
|
561
|
-
declare const main: VJSType<HTMLElement>;
|
|
562
|
-
declare const nav: VJSType<HTMLElement>;
|
|
563
|
-
declare const ol: VJSType<HTMLOListElement>;
|
|
564
|
-
declare const optgroup: VJSType<HTMLOptGroupElement>;
|
|
565
|
-
declare const option: VJSType<HTMLOptionElement>;
|
|
566
|
-
declare const p: VJSType<HTMLParagraphElement>;
|
|
567
|
-
declare const progress: VJSType<HTMLProgressElement>;
|
|
568
|
-
declare const q: VJSType<HTMLQuoteElement>;
|
|
569
|
-
declare const section: VJSType<HTMLElement>;
|
|
570
|
-
declare const select: VJSType<HTMLSelectElement>;
|
|
571
|
-
declare const source: VJSType<HTMLSourceElement>;
|
|
572
|
-
declare const span: VJSType<HTMLSpanElement>;
|
|
573
|
-
declare const strong: VJSType<HTMLElement>;
|
|
574
|
-
declare const summary: VJSType<HTMLElement>;
|
|
575
|
-
declare const table: VJSType<HTMLTableElement>;
|
|
576
|
-
declare const tbody: VJSType<HTMLTableColElement>;
|
|
577
|
-
declare const td: VJSType<HTMLTableCellElement>;
|
|
578
|
-
declare const template: VJSType<HTMLTemplateElement>;
|
|
579
|
-
declare const textarea: VJSType<HTMLTextAreaElement>;
|
|
580
|
-
declare const th: VJSType<HTMLTableSectionElement>;
|
|
581
|
-
declare const title: VJSType<HTMLTitleElement>;
|
|
582
|
-
declare const tr: VJSType<HTMLTableRowElement>;
|
|
583
|
-
declare const track: VJSType<HTMLTrackElement>;
|
|
584
|
-
declare const u: VJSType<HTMLUListElement>;
|
|
585
|
-
declare const ul: VJSType<HTMLUListElement>;
|
|
586
|
-
declare const video: VJSType<HTMLVideoElement>;
|
|
587
|
-
declare const svg: (svg: string, properties?: VJS_props_TYPE) => HTMLSpanElement;
|
|
588
|
-
declare const raw: (html: string) => HTMLElement[];
|
|
589
|
-
|
|
590
1
|
/*! *****************************************************************************
|
|
591
2
|
Copyright 2022 Friday Candour. All rights reserved.
|
|
592
3
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -596,29 +7,6 @@ License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
596
7
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
597
8
|
and limitations under the License.
|
|
598
9
|
********************************************************************************/
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
* Cradova
|
|
603
|
-
* ---
|
|
604
|
-
* Creates new cradova HTML element
|
|
605
|
-
* @example
|
|
606
|
-
* // using template
|
|
607
|
-
* const p = _("p");
|
|
608
|
-
* _("p.foo.bar#poo.loo");
|
|
609
|
-
*
|
|
610
|
-
* // full example
|
|
611
|
-
* _("p", // template first
|
|
612
|
-
* // property next if wanted
|
|
613
|
-
* {style: {color: "brown"}, // optional
|
|
614
|
-
* // the rest should be children or text
|
|
615
|
-
* _("span", " am a span tag text like so"),
|
|
616
|
-
* ...
|
|
617
|
-
* )
|
|
618
|
-
*
|
|
619
|
-
* @param element_initials
|
|
620
|
-
* @returns function - cradova element
|
|
621
|
-
*/
|
|
622
|
-
declare const _: TemplateType;
|
|
623
|
-
|
|
624
|
-
export { $case, $if, $ifelse, $switch, CradovaEvent, Ref, Rhoda, Router, SNRU, Screen$1 as Screen, a, article, audio, br, button, canvas, caption, col, colgroup, cra, createSignal, css, datalist, _ as default, details, dialog, div, em, embed, figure, footer, form, frag, h1, h2, h3, h4, h5, h6, head, header, hr, i, iframe, img, input, label, lazy, li, loop, main, make, makeElement, nav, ol, optgroup, option, p, progress, q, raw, reference, section, select, source, span, strong, summary, svg, table, tbody, td, template, textarea, th, title, tr, track, u, ul, useEffect, useRef, useState, video };
|
|
10
|
+
export * from "./primitives/classes";
|
|
11
|
+
export * from "./primitives/functions";
|
|
12
|
+
export * from "./primitives/dom-objects";
|