yandel 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.
package/dist/tags.js ADDED
@@ -0,0 +1,389 @@
1
+ import { Component, Node, TagNode, } from "./node";
2
+ import { _is_string } from "./utils";
3
+ export function _is_valid_node(n) {
4
+ return (n == null || _is_string(n) || n instanceof Node || n instanceof Component);
5
+ }
6
+ function _c_t(tag, args) {
7
+ if (args?.length) {
8
+ if (args.length > 1) {
9
+ return _is_valid_node(args[0])
10
+ ? new TagNode(tag, undefined, args)
11
+ : new TagNode(tag, args[0], args.slice(1));
12
+ }
13
+ else {
14
+ return _is_valid_node(args[0])
15
+ ? new TagNode(tag, undefined, args)
16
+ : new TagNode(tag, args[0]);
17
+ }
18
+ }
19
+ return new TagNode(tag);
20
+ }
21
+ export function h1(...args) {
22
+ return _c_t("h1", args);
23
+ }
24
+ export function h2(...args) {
25
+ return _c_t("h2", args);
26
+ }
27
+ export function h3(...args) {
28
+ return _c_t("h3", args);
29
+ }
30
+ export function h4(...args) {
31
+ return _c_t("h4", args);
32
+ }
33
+ export function h5(...args) {
34
+ return _c_t("h5", args);
35
+ }
36
+ export function h6(...args) {
37
+ return _c_t("h6", args);
38
+ }
39
+ export function a(...args) {
40
+ return _c_t("a", args);
41
+ }
42
+ export function abbr(...args) {
43
+ return _c_t("abbr", args);
44
+ }
45
+ export function address(...args) {
46
+ return _c_t("address", args);
47
+ }
48
+ /**
49
+ * area - Creates area Tag node
50
+ */
51
+ export function area(props) {
52
+ return props ? _c_t("area", [props]) : _c_t("area");
53
+ }
54
+ export function article(...args) {
55
+ return _c_t("article", args);
56
+ }
57
+ export function aside(...args) {
58
+ return _c_t("aside", args);
59
+ }
60
+ export function audio(...args) {
61
+ return _c_t("audio", args);
62
+ }
63
+ export function b(...args) {
64
+ return _c_t("b", args);
65
+ }
66
+ /**
67
+ * base - Creates base Tag node
68
+ */
69
+ export function base(props) {
70
+ return props ? _c_t("base", [props]) : _c_t("base");
71
+ }
72
+ export function bdi(...args) {
73
+ return _c_t("bdi", args);
74
+ }
75
+ export function bdo(...args) {
76
+ return _c_t("bdo", args);
77
+ }
78
+ export function blockquote(...args) {
79
+ return _c_t("blockquote", args);
80
+ }
81
+ export function body(...args) {
82
+ return _c_t("body", args);
83
+ }
84
+ /**
85
+ * br - Creates br Tag node
86
+ */
87
+ export function br(props) {
88
+ return props ? _c_t("br", [props]) : _c_t("br");
89
+ }
90
+ export function button(...args) {
91
+ return _c_t("button", args);
92
+ }
93
+ export function canvas(...args) {
94
+ return _c_t("canvas", args);
95
+ }
96
+ export function caption(...args) {
97
+ return _c_t("caption", args);
98
+ }
99
+ export function cite(...args) {
100
+ return _c_t("cite", args);
101
+ }
102
+ export function code(...args) {
103
+ return _c_t("code", args);
104
+ }
105
+ /**
106
+ * col - Creates col Tag node
107
+ */
108
+ export function col(props) {
109
+ return props ? _c_t("col", [props]) : _c_t("col");
110
+ }
111
+ export function colgroup(...args) {
112
+ return _c_t("colgroup", args);
113
+ }
114
+ export function data(...args) {
115
+ return _c_t("data", args);
116
+ }
117
+ export function datalist(...args) {
118
+ return _c_t("datalist", args);
119
+ }
120
+ export function dd(...args) {
121
+ return _c_t("dd", args);
122
+ }
123
+ export function del(...args) {
124
+ return _c_t("del", args);
125
+ }
126
+ export function details(...args) {
127
+ return _c_t("details", args);
128
+ }
129
+ export function dfn(...args) {
130
+ return _c_t("dfn", args);
131
+ }
132
+ export function dialog(...args) {
133
+ return _c_t("dialog", args);
134
+ }
135
+ export function div(...args) {
136
+ return _c_t("div", args);
137
+ }
138
+ export function dl(...args) {
139
+ return _c_t("dl", args);
140
+ }
141
+ export function dt(...args) {
142
+ return _c_t("dt", args);
143
+ }
144
+ export function em(...args) {
145
+ return _c_t("em", args);
146
+ }
147
+ /**
148
+ * embed - Creates embed Tag node
149
+ */
150
+ export function embed(props) {
151
+ return props ? _c_t("embed", [props]) : _c_t("embed");
152
+ }
153
+ export function fieldset(...args) {
154
+ return _c_t("fieldset", args);
155
+ }
156
+ export function figcaption(...args) {
157
+ return _c_t("figcaption", args);
158
+ }
159
+ export function figure(...args) {
160
+ return _c_t("figure", args);
161
+ }
162
+ export function footer(...args) {
163
+ return _c_t("footer", args);
164
+ }
165
+ export function form(...args) {
166
+ return _c_t("form", args);
167
+ }
168
+ export function head(...args) {
169
+ return _c_t("head", args);
170
+ }
171
+ export function header(...args) {
172
+ return _c_t("header", args);
173
+ }
174
+ export function hgroup(...args) {
175
+ return _c_t("hgroup", args);
176
+ }
177
+ /**
178
+ * hr - Creates hr Tag node
179
+ */
180
+ export function hr(props) {
181
+ return props ? _c_t("hr", [props]) : _c_t("hr");
182
+ }
183
+ export function html(...args) {
184
+ return _c_t("html", args);
185
+ }
186
+ export function i(...args) {
187
+ return _c_t("i", args);
188
+ }
189
+ export function iframe(...args) {
190
+ return _c_t("iframe", args);
191
+ }
192
+ /**
193
+ * img - Creates img Tag node
194
+ */
195
+ export function img(props) {
196
+ return props ? _c_t("img", [props]) : _c_t("img");
197
+ }
198
+ /**
199
+ * input - Creates input Tag node
200
+ */
201
+ export function input(props) {
202
+ return props ? _c_t("input", [props]) : _c_t("input");
203
+ }
204
+ export function ins(...args) {
205
+ return _c_t("ins", args);
206
+ }
207
+ export function kbd(...args) {
208
+ return _c_t("kbd", args);
209
+ }
210
+ export function label(...args) {
211
+ return _c_t("label", args);
212
+ }
213
+ export function legend(...args) {
214
+ return _c_t("legend", args);
215
+ }
216
+ export function li(...args) {
217
+ return _c_t("li", args);
218
+ }
219
+ /**
220
+ * link - Creates link Tag node
221
+ */
222
+ export function link(props) {
223
+ return props ? _c_t("link", [props]) : _c_t("link");
224
+ }
225
+ export function main(...args) {
226
+ return _c_t("main", args);
227
+ }
228
+ export function map(...args) {
229
+ return _c_t("map", args);
230
+ }
231
+ export function mark(...args) {
232
+ return _c_t("mark", args);
233
+ }
234
+ export function menu(...args) {
235
+ return _c_t("menu", args);
236
+ }
237
+ /**
238
+ * meta - Creates meta Tag node
239
+ */
240
+ export function meta(props) {
241
+ return props ? _c_t("meta", [props]) : _c_t("meta");
242
+ }
243
+ export function meter(...args) {
244
+ return _c_t("meter", args);
245
+ }
246
+ export function nav(...args) {
247
+ return _c_t("nav", args);
248
+ }
249
+ export function noscript(...args) {
250
+ return _c_t("noscript", args);
251
+ }
252
+ export function object(...args) {
253
+ return _c_t("object", args);
254
+ }
255
+ export function ol(...args) {
256
+ return _c_t("ol", args);
257
+ }
258
+ export function optgroup(...args) {
259
+ return _c_t("optgroup", args);
260
+ }
261
+ export function option(...args) {
262
+ return _c_t("option", args);
263
+ }
264
+ export function output(...args) {
265
+ return _c_t("output", args);
266
+ }
267
+ export function p(...args) {
268
+ return _c_t("p", args);
269
+ }
270
+ export function picture(...args) {
271
+ return _c_t("picture", args);
272
+ }
273
+ export function pre(...args) {
274
+ return _c_t("pre", args);
275
+ }
276
+ export function progress(...args) {
277
+ return _c_t("progress", args);
278
+ }
279
+ export function q(...args) {
280
+ return _c_t("q", args);
281
+ }
282
+ export function rp(...args) {
283
+ return _c_t("rp", args);
284
+ }
285
+ export function rt(...args) {
286
+ return _c_t("rt", args);
287
+ }
288
+ export function ruby(...args) {
289
+ return _c_t("ruby", args);
290
+ }
291
+ export function s(...args) {
292
+ return _c_t("s", args);
293
+ }
294
+ export function samp(...args) {
295
+ return _c_t("samp", args);
296
+ }
297
+ export function script(...args) {
298
+ return _c_t("script", args);
299
+ }
300
+ export function search(...args) {
301
+ return _c_t("search", args);
302
+ }
303
+ export function section(...args) {
304
+ return _c_t("section", args);
305
+ }
306
+ export function select(...args) {
307
+ return _c_t("select", args);
308
+ }
309
+ export function small(...args) {
310
+ return _c_t("small", args);
311
+ }
312
+ /**
313
+ * source - Creates source Tag node
314
+ */
315
+ export function source(props) {
316
+ return props ? _c_t("source", [props]) : _c_t("source");
317
+ }
318
+ export function span(...args) {
319
+ return _c_t("span", args);
320
+ }
321
+ export function strong(...args) {
322
+ return _c_t("strong", args);
323
+ }
324
+ export function style(...args) {
325
+ return _c_t("style", args);
326
+ }
327
+ export function sub(...args) {
328
+ return _c_t("sub", args);
329
+ }
330
+ export function summary(...args) {
331
+ return _c_t("summary", args);
332
+ }
333
+ export function sup(...args) {
334
+ return _c_t("sup", args);
335
+ }
336
+ export function table(...args) {
337
+ return _c_t("table", args);
338
+ }
339
+ export function tbody(...args) {
340
+ return _c_t("tbody", args);
341
+ }
342
+ export function td(...args) {
343
+ return _c_t("td", args);
344
+ }
345
+ export function template(...args) {
346
+ return _c_t("template", args);
347
+ }
348
+ export function textarea(...args) {
349
+ return _c_t("textarea", args);
350
+ }
351
+ export function tfoot(...args) {
352
+ return _c_t("tfoot", args);
353
+ }
354
+ export function th(...args) {
355
+ return _c_t("th", args);
356
+ }
357
+ export function thead(...args) {
358
+ return _c_t("thead", args);
359
+ }
360
+ export function time(...args) {
361
+ return _c_t("time", args);
362
+ }
363
+ export function title(...args) {
364
+ return _c_t("title", args);
365
+ }
366
+ export function tr(...args) {
367
+ return _c_t("tr", args);
368
+ }
369
+ /**
370
+ * track - Creates track Tag node
371
+ */
372
+ export function track(props) {
373
+ return props ? _c_t("track", [props]) : _c_t("track");
374
+ }
375
+ export function u(...args) {
376
+ return _c_t("u", args);
377
+ }
378
+ export function ul(...args) {
379
+ return _c_t("ul", args);
380
+ }
381
+ export function video(...args) {
382
+ return _c_t("video", args);
383
+ }
384
+ /**
385
+ * wbr - Creates wbr Tag node
386
+ */
387
+ export function wbr(props) {
388
+ return props ? _c_t("wbr", [props]) : _c_t("wbr");
389
+ }
@@ -0,0 +1,7 @@
1
+ export declare function _is_string(t: any): t is string;
2
+ export declare class InmutBool {
3
+ private _v;
4
+ constructor(v?: boolean);
5
+ set(v: boolean): void;
6
+ get(): boolean;
7
+ }
package/dist/utils.js ADDED
@@ -0,0 +1,18 @@
1
+ export function _is_string(t) {
2
+ return typeof t === "string";
3
+ }
4
+ export class InmutBool {
5
+ _v = false;
6
+ constructor(v) {
7
+ if (v !== undefined)
8
+ this._v = v;
9
+ }
10
+ set(v) {
11
+ if (this._v)
12
+ return;
13
+ this._v = v;
14
+ }
15
+ get() {
16
+ return this._v;
17
+ }
18
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "yandel",
3
+ "description": "A reactive lightweight TS frontend framework",
4
+ "version": "1.0.0",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/zzzeros0/yandel.git"
17
+ },
18
+ "keywords": [
19
+ "framework",
20
+ "web",
21
+ "web-ui",
22
+ "render",
23
+ "web-app",
24
+ "components",
25
+ "web-components",
26
+ "html",
27
+ "ux",
28
+ "ui",
29
+ "front-end",
30
+ "frontend",
31
+ "typescript",
32
+ "ts",
33
+ "web",
34
+ "yandel",
35
+ "client"
36
+ ],
37
+ "author": "zzzeros0",
38
+ "license": "ISC",
39
+ "devDependencies": {
40
+ "typescript": "^5.8.3"
41
+ }
42
+ }