cajoa 0.5.0 → 0.7.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/LICENSE +201 -201
- package/README.md +223 -215
- package/dist/index.cjs +5 -440
- package/dist/index.d.cts +2 -95
- package/dist/index.d.ts +2 -95
- package/dist/index.js +3 -407
- package/package.json +85 -78
package/dist/index.js
CHANGED
|
@@ -1,407 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function clean(owner) {
|
|
5
|
-
const fns = owner.cleanups;
|
|
6
|
-
owner.cleanups = [];
|
|
7
|
-
for (const fn of fns) fn();
|
|
8
|
-
}
|
|
9
|
-
function cleanComputation(c) {
|
|
10
|
-
for (const subs of c.deps) subs.delete(c);
|
|
11
|
-
c.deps.clear();
|
|
12
|
-
clean(c);
|
|
13
|
-
}
|
|
14
|
-
var batchDepth = 0;
|
|
15
|
-
var pending = /* @__PURE__ */ new Set();
|
|
16
|
-
function flush() {
|
|
17
|
-
const effects = [...pending];
|
|
18
|
-
pending.clear();
|
|
19
|
-
effects.forEach((effect) => effect.run());
|
|
20
|
-
}
|
|
21
|
-
function batch(fn) {
|
|
22
|
-
batchDepth++;
|
|
23
|
-
try {
|
|
24
|
-
return fn();
|
|
25
|
-
} finally {
|
|
26
|
-
batchDepth--;
|
|
27
|
-
if (batchDepth === 0) flush();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function createSignal(value) {
|
|
31
|
-
const subs = /* @__PURE__ */ new Set();
|
|
32
|
-
const get = () => {
|
|
33
|
-
if (currentEffect) {
|
|
34
|
-
subs.add(currentEffect);
|
|
35
|
-
currentEffect.deps.add(subs);
|
|
36
|
-
}
|
|
37
|
-
return value;
|
|
38
|
-
};
|
|
39
|
-
const set = (next) => {
|
|
40
|
-
const v = typeof next === "function" ? next(value) : next;
|
|
41
|
-
if (Object.is(v, value)) return;
|
|
42
|
-
value = v;
|
|
43
|
-
for (const effect of [...subs]) {
|
|
44
|
-
if (batchDepth > 0)
|
|
45
|
-
pending.add(effect);
|
|
46
|
-
else effect.run();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return [get, set];
|
|
50
|
-
}
|
|
51
|
-
function createEffect(fn) {
|
|
52
|
-
const effect = {
|
|
53
|
-
cleanups: [],
|
|
54
|
-
parent: currentOwner,
|
|
55
|
-
deps: /* @__PURE__ */ new Set(),
|
|
56
|
-
disposed: false,
|
|
57
|
-
run() {
|
|
58
|
-
if (effect.disposed) return;
|
|
59
|
-
cleanComputation(effect);
|
|
60
|
-
const prevOwner = currentOwner;
|
|
61
|
-
const prevEffect = currentEffect;
|
|
62
|
-
currentOwner = effect;
|
|
63
|
-
currentEffect = effect;
|
|
64
|
-
try {
|
|
65
|
-
fn();
|
|
66
|
-
} finally {
|
|
67
|
-
currentOwner = prevOwner;
|
|
68
|
-
currentEffect = prevEffect;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
onCleanup(() => {
|
|
73
|
-
effect.disposed = true;
|
|
74
|
-
cleanComputation(effect);
|
|
75
|
-
});
|
|
76
|
-
effect.run();
|
|
77
|
-
}
|
|
78
|
-
function onCleanup(fn) {
|
|
79
|
-
currentOwner?.cleanups.push(fn);
|
|
80
|
-
}
|
|
81
|
-
function createRoot(fn) {
|
|
82
|
-
const root = { cleanups: [], parent: currentOwner };
|
|
83
|
-
const prevOwner = currentOwner;
|
|
84
|
-
const prevEffect = currentEffect;
|
|
85
|
-
currentOwner = root;
|
|
86
|
-
currentEffect = null;
|
|
87
|
-
try {
|
|
88
|
-
return fn(() => clean(root));
|
|
89
|
-
} finally {
|
|
90
|
-
currentOwner = prevOwner;
|
|
91
|
-
currentEffect = prevEffect;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function onMount(fn) {
|
|
95
|
-
const owner = currentOwner;
|
|
96
|
-
queueMicrotask(() => {
|
|
97
|
-
const prevOwner = currentOwner;
|
|
98
|
-
const prevEffect = currentEffect;
|
|
99
|
-
currentOwner = owner;
|
|
100
|
-
currentEffect = null;
|
|
101
|
-
try {
|
|
102
|
-
fn();
|
|
103
|
-
} finally {
|
|
104
|
-
currentOwner = prevOwner;
|
|
105
|
-
currentEffect = prevEffect;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function createContext(defaultValue) {
|
|
110
|
-
return { id: /* @__PURE__ */ Symbol("cajoa-context"), defaultValue };
|
|
111
|
-
}
|
|
112
|
-
function provide(ctx, value, fn) {
|
|
113
|
-
const owner = {
|
|
114
|
-
cleanups: [],
|
|
115
|
-
parent: currentOwner,
|
|
116
|
-
context: /* @__PURE__ */ new Map([[ctx.id, value]])
|
|
117
|
-
};
|
|
118
|
-
onCleanup(() => clean(owner));
|
|
119
|
-
const prev = currentOwner;
|
|
120
|
-
currentOwner = owner;
|
|
121
|
-
try {
|
|
122
|
-
return fn();
|
|
123
|
-
} finally {
|
|
124
|
-
currentOwner = prev;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function useContext(ctx) {
|
|
128
|
-
for (let o = currentOwner; o; o = o.parent) {
|
|
129
|
-
if (o.context?.has(ctx.id)) return o.context.get(ctx.id);
|
|
130
|
-
}
|
|
131
|
-
return ctx.defaultValue;
|
|
132
|
-
}
|
|
133
|
-
function untrack(fn) {
|
|
134
|
-
const prev = currentEffect;
|
|
135
|
-
currentEffect = null;
|
|
136
|
-
try {
|
|
137
|
-
return fn();
|
|
138
|
-
} finally {
|
|
139
|
-
currentEffect = prev;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// src/renderer/dom.ts
|
|
144
|
-
var domRenderer = {
|
|
145
|
-
createElement: (tag) => document.createElement(tag),
|
|
146
|
-
createText: (value) => document.createTextNode(value),
|
|
147
|
-
createMarker: () => document.createComment(""),
|
|
148
|
-
createFragment: () => document.createDocumentFragment(),
|
|
149
|
-
isNode: (v) => typeof Node !== "undefined" && v instanceof Node,
|
|
150
|
-
insert: (parent, node, anchor = null) => {
|
|
151
|
-
parent.insertBefore(node, anchor);
|
|
152
|
-
},
|
|
153
|
-
remove: (node) => {
|
|
154
|
-
node.remove();
|
|
155
|
-
},
|
|
156
|
-
nextSibling: (node) => node.nextSibling,
|
|
157
|
-
parentNode: (node) => node.parentNode,
|
|
158
|
-
clear: (parent) => {
|
|
159
|
-
parent.replaceChildren();
|
|
160
|
-
},
|
|
161
|
-
setProp(el, key, value) {
|
|
162
|
-
const e = el;
|
|
163
|
-
if (key.startsWith("on") && typeof value === "function") {
|
|
164
|
-
e.addEventListener(key.slice(2).toLowerCase(), value);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
const name = key === "className" ? "class" : key;
|
|
168
|
-
if (value == null || value === false) e.removeAttribute(name);
|
|
169
|
-
else e.setAttribute(name, value === true ? "" : String(value));
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
// src/renderer/index.ts
|
|
174
|
-
var current = domRenderer;
|
|
175
|
-
function setRenderer(renderer) {
|
|
176
|
-
current = renderer;
|
|
177
|
-
}
|
|
178
|
-
function getRenderer() {
|
|
179
|
-
return current;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// src/dom/h.ts
|
|
183
|
-
function h(tag, props, ...children) {
|
|
184
|
-
const r = getRenderer();
|
|
185
|
-
const el = r.createElement(tag);
|
|
186
|
-
for (const [key, value] of Object.entries(props ?? {})) {
|
|
187
|
-
if (typeof value === "function" && !key.startsWith("on")) {
|
|
188
|
-
createEffect(() => r.setProp(el, key, value()));
|
|
189
|
-
} else {
|
|
190
|
-
r.setProp(el, key, value);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
appendChildren(el, children);
|
|
194
|
-
return el;
|
|
195
|
-
}
|
|
196
|
-
function toNodes(value) {
|
|
197
|
-
const r = getRenderer();
|
|
198
|
-
const out = [];
|
|
199
|
-
for (const v of [value].flat(Infinity)) {
|
|
200
|
-
if (v == null || typeof v === "boolean") continue;
|
|
201
|
-
out.push(r.isNode(v) ? v : r.createText(String(v)));
|
|
202
|
-
}
|
|
203
|
-
return out;
|
|
204
|
-
}
|
|
205
|
-
function reconcile(start, end, next) {
|
|
206
|
-
const r = getRenderer();
|
|
207
|
-
const keep = new Set(next);
|
|
208
|
-
let cur = r.nextSibling(start);
|
|
209
|
-
while (cur && cur !== end) {
|
|
210
|
-
const after = r.nextSibling(cur);
|
|
211
|
-
if (!keep.has(cur)) r.remove(cur);
|
|
212
|
-
cur = after;
|
|
213
|
-
}
|
|
214
|
-
const parent = r.parentNode(end);
|
|
215
|
-
let ref = r.nextSibling(start);
|
|
216
|
-
for (const node of next) {
|
|
217
|
-
if (node === ref) ref = r.nextSibling(ref);
|
|
218
|
-
else r.insert(parent, node, ref);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
function appendChildren(parent, children) {
|
|
222
|
-
const r = getRenderer();
|
|
223
|
-
for (const child of children.flat(Infinity)) {
|
|
224
|
-
if (typeof child === "function") {
|
|
225
|
-
const start = r.createMarker();
|
|
226
|
-
const end = r.createMarker();
|
|
227
|
-
r.insert(parent, start);
|
|
228
|
-
r.insert(parent, end);
|
|
229
|
-
createEffect(() => reconcile(start, end, toNodes(child())));
|
|
230
|
-
} else {
|
|
231
|
-
for (const node of toNodes(child)) r.insert(parent, node);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// src/dom/render.ts
|
|
237
|
-
function render(component, container) {
|
|
238
|
-
return createRoot((dispose) => {
|
|
239
|
-
const r = getRenderer();
|
|
240
|
-
const node = component();
|
|
241
|
-
r.clear(container);
|
|
242
|
-
r.insert(container, node);
|
|
243
|
-
return () => {
|
|
244
|
-
dispose();
|
|
245
|
-
r.clear(container);
|
|
246
|
-
};
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// src/reactivity/memo.ts
|
|
251
|
-
function createMemo(fn) {
|
|
252
|
-
const [value, setValue] = createSignal(void 0);
|
|
253
|
-
createEffect(() => setValue(() => fn()));
|
|
254
|
-
return value;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// src/components/show.ts
|
|
258
|
-
function Show(props) {
|
|
259
|
-
const visible = createMemo(() => !!props.when());
|
|
260
|
-
return () => visible() ? untrack(() => props.children()) : untrack(() => props.fallback?.() ?? null);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// src/components/for.ts
|
|
264
|
-
function For(props) {
|
|
265
|
-
let cache = /* @__PURE__ */ new Map();
|
|
266
|
-
onCleanup(() => {
|
|
267
|
-
cache.forEach((e) => e.dispose());
|
|
268
|
-
cache.clear();
|
|
269
|
-
});
|
|
270
|
-
return () => {
|
|
271
|
-
const items = props.each();
|
|
272
|
-
const next = /* @__PURE__ */ new Map();
|
|
273
|
-
const nodes = [];
|
|
274
|
-
items.forEach((item, i) => {
|
|
275
|
-
const k = props.key ? props.key(item, i) : item;
|
|
276
|
-
let entry = cache.get(k);
|
|
277
|
-
if (!entry) {
|
|
278
|
-
entry = createRoot((dispose) => ({
|
|
279
|
-
node: props.children(item, i),
|
|
280
|
-
dispose
|
|
281
|
-
}));
|
|
282
|
-
}
|
|
283
|
-
next.set(k, entry);
|
|
284
|
-
nodes.push(entry.node);
|
|
285
|
-
});
|
|
286
|
-
cache.forEach((entry, k) => {
|
|
287
|
-
if (!next.has(k)) entry.dispose();
|
|
288
|
-
});
|
|
289
|
-
cache = next;
|
|
290
|
-
return nodes;
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// src/jsx-runtime.ts
|
|
295
|
-
function jsx(type, props) {
|
|
296
|
-
if (typeof type === "function") return type(props ?? {});
|
|
297
|
-
const { children, ...rest } = props ?? {};
|
|
298
|
-
const kids = children === void 0 ? [] : [children];
|
|
299
|
-
return h(type, rest, ...kids);
|
|
300
|
-
}
|
|
301
|
-
var jsxs = jsx;
|
|
302
|
-
var jsxDEV = jsx;
|
|
303
|
-
function Fragment(props) {
|
|
304
|
-
const frag = getRenderer().createFragment();
|
|
305
|
-
appendChildren(frag, props.children === void 0 ? [] : [props.children]);
|
|
306
|
-
return frag;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
// src/router.ts
|
|
310
|
-
var read = () => typeof location === "undefined" ? "/" : location.pathname;
|
|
311
|
-
var [path, setPath] = createSignal(read());
|
|
312
|
-
var listening = false;
|
|
313
|
-
function listen() {
|
|
314
|
-
if (listening || typeof window === "undefined") return;
|
|
315
|
-
listening = true;
|
|
316
|
-
window.addEventListener("popstate", () => setPath(read()));
|
|
317
|
-
}
|
|
318
|
-
function navigate(to, options = {}) {
|
|
319
|
-
if (new URL(to, location.href).href === location.href) return;
|
|
320
|
-
history[options.replace ? "replaceState" : "pushState"](null, "", to);
|
|
321
|
-
setPath(read());
|
|
322
|
-
}
|
|
323
|
-
var usePath = () => path;
|
|
324
|
-
var Params = createContext({});
|
|
325
|
-
function useParams() {
|
|
326
|
-
return useContext(Params);
|
|
327
|
-
}
|
|
328
|
-
var split = (s) => s.split("/").filter(Boolean);
|
|
329
|
-
function decode(s) {
|
|
330
|
-
try {
|
|
331
|
-
return decodeURIComponent(s);
|
|
332
|
-
} catch {
|
|
333
|
-
return s;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
function match(pattern, pathname) {
|
|
337
|
-
if (pattern === "*") return {};
|
|
338
|
-
const p = split(pattern);
|
|
339
|
-
const u = split(pathname);
|
|
340
|
-
if (p.length !== u.length) return null;
|
|
341
|
-
const params = {};
|
|
342
|
-
for (let i = 0; i < p.length; i++) {
|
|
343
|
-
if (p[i].startsWith(":")) params[p[i].slice(1)] = decode(u[i]);
|
|
344
|
-
else if (p[i] !== u[i]) return null;
|
|
345
|
-
}
|
|
346
|
-
return params;
|
|
347
|
-
}
|
|
348
|
-
function Route(props) {
|
|
349
|
-
return { __route: true, path: props.path, component: props.component };
|
|
350
|
-
}
|
|
351
|
-
function Router(props) {
|
|
352
|
-
listen();
|
|
353
|
-
const routes = [props.children].flat(Infinity).filter(
|
|
354
|
-
(r) => r?.__route === true
|
|
355
|
-
);
|
|
356
|
-
return () => {
|
|
357
|
-
const current2 = path();
|
|
358
|
-
for (const route of routes) {
|
|
359
|
-
const params = match(route.path, current2);
|
|
360
|
-
if (params) {
|
|
361
|
-
return untrack(() => provide(Params, params, () => route.component()));
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return null;
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function Link(props) {
|
|
368
|
-
const { href, children, ...rest } = props;
|
|
369
|
-
const onClick = (e) => {
|
|
370
|
-
if (/^[a-z][a-z0-9+.-]*:|^\/\//i.test(href)) return;
|
|
371
|
-
if (e.defaultPrevented || e.button !== 0) return;
|
|
372
|
-
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
373
|
-
e.preventDefault();
|
|
374
|
-
navigate(href);
|
|
375
|
-
};
|
|
376
|
-
return h("a", { ...rest, href, onClick }, children);
|
|
377
|
-
}
|
|
378
|
-
export {
|
|
379
|
-
For,
|
|
380
|
-
Fragment,
|
|
381
|
-
Link,
|
|
382
|
-
Route,
|
|
383
|
-
Router,
|
|
384
|
-
Show,
|
|
385
|
-
batch,
|
|
386
|
-
createContext,
|
|
387
|
-
createEffect,
|
|
388
|
-
createMemo,
|
|
389
|
-
createRoot,
|
|
390
|
-
createSignal,
|
|
391
|
-
domRenderer,
|
|
392
|
-
getRenderer,
|
|
393
|
-
h,
|
|
394
|
-
jsx,
|
|
395
|
-
jsxDEV,
|
|
396
|
-
jsxs,
|
|
397
|
-
navigate,
|
|
398
|
-
onCleanup,
|
|
399
|
-
onMount,
|
|
400
|
-
provide,
|
|
401
|
-
render,
|
|
402
|
-
setRenderer,
|
|
403
|
-
untrack,
|
|
404
|
-
useContext,
|
|
405
|
-
useParams,
|
|
406
|
-
usePath
|
|
407
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@cajoa/core";
|
|
3
|
+
export * from "@cajoa/dom";
|
package/package.json
CHANGED
|
@@ -1,78 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cajoa",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A beginner-friendly
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": {
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"default": "./dist/index.js"
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
|
-
"types": "./dist/index.d.cts",
|
|
17
|
-
"default": "./dist/index.cjs"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"./jsx-runtime": {
|
|
21
|
-
"import": {
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
|
-
"default": "./dist/index.js"
|
|
24
|
-
},
|
|
25
|
-
"require": {
|
|
26
|
-
"types": "./dist/index.d.cts",
|
|
27
|
-
"default": "./dist/index.cjs"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"./jsx-dev-runtime": {
|
|
31
|
-
"import": {
|
|
32
|
-
"types": "./dist/index.d.ts",
|
|
33
|
-
"default": "./dist/index.js"
|
|
34
|
-
},
|
|
35
|
-
"require": {
|
|
36
|
-
"types": "./dist/index.d.cts",
|
|
37
|
-
"default": "./dist/index.cjs"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "cajoa",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "A small, beginner-friendly frontend framework built on signals and JSX.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"./jsx-runtime": {
|
|
21
|
+
"import": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"types": "./dist/index.d.cts",
|
|
27
|
+
"default": "./dist/index.cjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./jsx-dev-runtime": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/index.d.cts",
|
|
37
|
+
"default": "./dist/index.cjs"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"typesVersions": {
|
|
42
|
+
"*": {
|
|
43
|
+
"jsx-runtime": [
|
|
44
|
+
"./dist/index.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"jsx-dev-runtime": [
|
|
47
|
+
"./dist/index.d.ts"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"dist"
|
|
56
|
+
],
|
|
57
|
+
"sideEffects": true,
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@cajoa/core": "^0.7.0",
|
|
60
|
+
"@cajoa/dom": "^0.7.0"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
64
|
+
"check:package": "publint && attw --pack ."
|
|
65
|
+
},
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/CajoaTS/Cajoa.git",
|
|
69
|
+
"directory": "packages/cajoa"
|
|
70
|
+
},
|
|
71
|
+
"keywords": [
|
|
72
|
+
"frontend",
|
|
73
|
+
"framework",
|
|
74
|
+
"signals",
|
|
75
|
+
"reactive",
|
|
76
|
+
"ui",
|
|
77
|
+
"cajoa"
|
|
78
|
+
],
|
|
79
|
+
"author": "cjmgrc",
|
|
80
|
+
"license": "Apache-2.0",
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://github.com/CajoaTS/Cajoa/issues"
|
|
83
|
+
},
|
|
84
|
+
"homepage": "https://github.com/CajoaTS/Cajoa#readme"
|
|
85
|
+
}
|