@azerothjs/core 0.3.0-alpha.3 → 0.4.0-beta.1
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 +83 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -21
- package/dist/index.js.map +1 -1
- package/package.json +30 -16
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# @azerothjs/core
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
An umbrella package that re-exports the framework's public packages from one
|
|
6
|
+
place. Installing `@azerothjs/core` gives access to reactivity, the renderer, the
|
|
7
|
+
component system, the store, forms, the router, and server-side rendering through
|
|
8
|
+
a single import.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import {
|
|
12
|
+
createSignal, h, defineComponent,
|
|
13
|
+
createRouter, Link, Routes,
|
|
14
|
+
createForm, createStore,
|
|
15
|
+
renderToDocument
|
|
16
|
+
} from '@azerothjs/core';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Architecture
|
|
20
|
+
|
|
21
|
+
This package contains no implementation of its own. It re-exports the public API
|
|
22
|
+
of each underlying package:
|
|
23
|
+
|
|
24
|
+
- `@azerothjs/reactivity`
|
|
25
|
+
- `@azerothjs/renderer`
|
|
26
|
+
- `@azerothjs/component`
|
|
27
|
+
- `@azerothjs/store`
|
|
28
|
+
- `@azerothjs/form`
|
|
29
|
+
- `@azerothjs/router`
|
|
30
|
+
- `@azerothjs/server`
|
|
31
|
+
|
|
32
|
+
Importing from `@azerothjs/core` and importing from the individual packages give
|
|
33
|
+
the same exports. Tree-shaking drops anything unused either way, so the choice is
|
|
34
|
+
about explicitness and dependency surface, not bundle size. Use `@azerothjs/core`
|
|
35
|
+
for convenience in an application; depend on individual packages when you want a
|
|
36
|
+
narrower dependency list (for example a library that only needs reactivity).
|
|
37
|
+
|
|
38
|
+
## Components
|
|
39
|
+
|
|
40
|
+
| File | Role |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `index.ts` | Re-exports the public API of every underlying package. |
|
|
43
|
+
|
|
44
|
+
For the documentation of any given API, see the README of the package it comes
|
|
45
|
+
from:
|
|
46
|
+
|
|
47
|
+
- [reactivity](../reactivity/README.md)
|
|
48
|
+
- [renderer](../renderer/README.md)
|
|
49
|
+
- [component](../component/README.md)
|
|
50
|
+
- [store](../store/README.md)
|
|
51
|
+
- [form](../form/README.md)
|
|
52
|
+
- [router](../router/README.md)
|
|
53
|
+
- [server](../server/README.md)
|
|
54
|
+
|
|
55
|
+
## Building
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
npm run build -w @azerothjs/core
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
It depends on all the re-exported packages being built first; the repository root
|
|
62
|
+
`npm run build` builds in dependency order.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
A small application assembled entirely from `@azerothjs/core`:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { createSignal, h, render } from '@azerothjs/core';
|
|
70
|
+
|
|
71
|
+
function App() {
|
|
72
|
+
const [n, setN] = createSignal(0);
|
|
73
|
+
return h('button', { onClick: () => setN(c => c + 1) }, () => `Count: ${n()}`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
render(App, document.getElementById('app')!);
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Contributing
|
|
80
|
+
|
|
81
|
+
When a re-exported package adds or changes a public export, mirror it here so the
|
|
82
|
+
umbrella stays in sync. Keep this package a pure re-export with no logic of its
|
|
83
|
+
own.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createSignal, createEffect, createMemo, batch, untrack, on, onCleanup, onRootDispose, createRoot, createDeferred, createSelector, createResource, createStream, catchError } from '@azerothjs/reactivity';
|
|
2
|
-
export type { CleanupFn, Getter, Setter, Signal, Subscriber, EffectFn, DisposeFn, EqualsFn, SignalOptions, EffectOptions, Resource, Stream, StreamOptions, StreamParseMode } from '@azerothjs/reactivity';
|
|
3
|
-
export { h, render, Show, For, Switch, Match, Portal, destroyPortal, Dynamic, Suspense, Transition, createRef, classList, styleMap } from '@azerothjs/renderer';
|
|
4
|
-
export type { Props, Child, ShowProps, ForProps, MatchCase, PortalProps, DynamicProps, SuspenseProps, TransitionProps, Ref, ClassObject, StyleObject } from '@azerothjs/renderer';
|
|
1
|
+
export { createSignal, createEffect, createMemo, batch, untrack, on, onCleanup, onRootDispose, createRoot, createDeferred, createSelector, createResource, createStream, catchError, getRenderMode, isStringMode, isHydrating, runInMode } from '@azerothjs/reactivity';
|
|
2
|
+
export type { CleanupFn, Getter, Setter, Signal, Subscriber, EffectFn, DisposeFn, EqualsFn, SignalOptions, EffectOptions, Resource, Stream, StreamOptions, StreamParseMode, RenderMode, SSRNode } from '@azerothjs/reactivity';
|
|
3
|
+
export { h, render, hydrate, Show, For, Switch, Match, Portal, destroyPortal, Dynamic, Suspense, Transition, createRef, classList, styleMap, css, collectStyleSheet, resetStyleSheet } from '@azerothjs/renderer';
|
|
4
|
+
export type { Props, Child, ShowProps, ForProps, MatchCase, MatchProps, SwitchProps, PortalProps, DynamicProps, SuspenseProps, TransitionProps, Ref, ClassObject, StyleObject, ScopedClasses } from '@azerothjs/renderer';
|
|
5
5
|
export { defineComponent, destroyComponent, onMount, onDestroy, AzerothComponent, ErrorBoundary } from '@azerothjs/component';
|
|
6
6
|
export type { Component, ComponentSetup, LifecycleHook, ReactiveState, ErrorBoundaryProps } from '@azerothjs/component';
|
|
7
7
|
export { createStore } from '@azerothjs/store';
|
|
@@ -9,4 +9,6 @@ export { createForm, required, minLength, maxLength, min, max, pattern, email, u
|
|
|
9
9
|
export type { FormConfig, FormApi, FieldValidator, RegisteredFieldProps, PhoneOptions, CountryInfo } from '@azerothjs/form';
|
|
10
10
|
export { createRouter, createBrowserHistory, compilePath, parseQuery, stringifyQuery, targetToFullPath, Link, Routes, Outlet, useRoute, useMatch, useParams, useQuery, useNavigate, useLoader } from '@azerothjs/router';
|
|
11
11
|
export type { Router, Route, RouteLocation, RouteComponent, RouteMatch, Params, Query, NavigateTarget, NavigateOptions, RouterMode, RouterConfig, HistoryAdapter, PathMatcher, LinkProps, RoutesProps, OutletProps, NavigateApi } from '@azerothjs/router';
|
|
12
|
+
export { renderToString, renderToStaticMarkup, renderToDocument } from '@azerothjs/server';
|
|
13
|
+
export type { RenderToDocumentOptions } from '@azerothjs/server';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,OAAO,EACP,EAAE,EACF,SAAS,EACT,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,SAAS,EACZ,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACR,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAQ,EACR,MAAM,EACN,aAAa,EACb,eAAe,EACf,UAAU,EACV,OAAO,EACV,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACH,CAAC,EACD,MAAM,EACN,OAAO,EACP,IAAI,EACJ,GAAG,EACH,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,EACH,iBAAiB,EACjB,eAAe,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I3B,OAAO,EACH,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// Re-exports everything from the framework's public packages:
|
|
6
|
-
// @azerothjs/reactivity, @azerothjs/renderer, @azerothjs/component,
|
|
7
|
-
// @azerothjs/store, @azerothjs/form, @azerothjs/router.
|
|
1
|
+
// @azerothjs/core: umbrella package re-exporting the framework's public
|
|
2
|
+
// packages (@azerothjs/reactivity, @azerothjs/renderer, @azerothjs/component,
|
|
3
|
+
// @azerothjs/store, @azerothjs/form, @azerothjs/router).
|
|
8
4
|
//
|
|
9
5
|
// Install one package, get the whole framework:
|
|
10
6
|
//
|
|
@@ -14,26 +10,26 @@
|
|
|
14
10
|
// createForm, createStore
|
|
15
11
|
// } from '@azerothjs/core';
|
|
16
12
|
//
|
|
17
|
-
// Or import individual packages directly
|
|
18
|
-
// dependency surface
|
|
13
|
+
// Or import individual packages directly for the same exports with a smaller
|
|
14
|
+
// dependency surface:
|
|
19
15
|
//
|
|
20
16
|
// import { createSignal } from '@azerothjs/reactivity';
|
|
21
17
|
// import { createRouter } from '@azerothjs/router';
|
|
22
18
|
//
|
|
23
|
-
// Tree-shaking
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
export {
|
|
29
|
-
//
|
|
30
|
-
export { h, render, Show, For, Switch, Match, Portal, destroyPortal, Dynamic, Suspense, Transition, createRef, classList, styleMap } from '@azerothjs/renderer';
|
|
31
|
-
// ── Component ───────────────────────────────────────────────────────────────
|
|
19
|
+
// Tree-shaking drops unused exports either way, so the choice is one of
|
|
20
|
+
// explicitness, not bundle size.
|
|
21
|
+
// Reactivity
|
|
22
|
+
export { createSignal, createEffect, createMemo, batch, untrack, on, onCleanup, onRootDispose, createRoot, createDeferred, createSelector, createResource, createStream, catchError, getRenderMode, isStringMode, isHydrating, runInMode } from '@azerothjs/reactivity';
|
|
23
|
+
// Renderer
|
|
24
|
+
export { h, render, hydrate, Show, For, Switch, Match, Portal, destroyPortal, Dynamic, Suspense, Transition, createRef, classList, styleMap, css, collectStyleSheet, resetStyleSheet } from '@azerothjs/renderer';
|
|
25
|
+
// Component
|
|
32
26
|
export { defineComponent, destroyComponent, onMount, onDestroy, AzerothComponent, ErrorBoundary } from '@azerothjs/component';
|
|
33
|
-
//
|
|
27
|
+
// Store
|
|
34
28
|
export { createStore } from '@azerothjs/store';
|
|
35
|
-
//
|
|
29
|
+
// Form
|
|
36
30
|
export { createForm, required, minLength, maxLength, min, max, pattern, email, url, oneOf, combine, phone, countries, getCountry } from '@azerothjs/form';
|
|
37
|
-
//
|
|
31
|
+
// Router
|
|
38
32
|
export { createRouter, createBrowserHistory, compilePath, parseQuery, stringifyQuery, targetToFullPath, Link, Routes, Outlet, useRoute, useMatch, useParams, useQuery, useNavigate, useLoader } from '@azerothjs/router';
|
|
33
|
+
// Server (SSR)
|
|
34
|
+
export { renderToString, renderToStaticMarkup, renderToDocument } from '@azerothjs/server';
|
|
39
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8EAA8E;AAC9E,yDAAyD;AACzD,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,aAAa;AACb,0CAA0C;AAC1C,oCAAoC;AACpC,gCAAgC;AAChC,8BAA8B;AAC9B,EAAE;AACF,6EAA6E;AAC7E,sBAAsB;AACtB,EAAE;AACF,0DAA0D;AAC1D,sDAAsD;AACtD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MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,46 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azerothjs/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-beta.1",
|
|
4
4
|
"description": "AzerothJS core — umbrella package re-exporting all AzerothJS APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports":
|
|
10
|
-
|
|
9
|
+
"exports":
|
|
10
|
+
{
|
|
11
|
+
".":
|
|
12
|
+
{
|
|
11
13
|
"types": "./dist/index.d.ts",
|
|
12
14
|
"import": "./dist/index.js",
|
|
13
15
|
"default": "./dist/index.js"
|
|
14
16
|
}
|
|
15
17
|
},
|
|
16
|
-
"files":
|
|
18
|
+
"files":
|
|
19
|
+
[
|
|
17
20
|
"dist"
|
|
18
21
|
],
|
|
19
22
|
"sideEffects": false,
|
|
20
|
-
"scripts":
|
|
23
|
+
"scripts":
|
|
24
|
+
{
|
|
21
25
|
"build": "tsc -p tsconfig.build.json",
|
|
22
26
|
"prepublishOnly": "npm run build"
|
|
23
27
|
},
|
|
24
|
-
"dependencies":
|
|
25
|
-
|
|
26
|
-
"@azerothjs/
|
|
27
|
-
"@azerothjs/
|
|
28
|
-
"@azerothjs/
|
|
29
|
-
"@azerothjs/
|
|
30
|
-
"@azerothjs/
|
|
28
|
+
"dependencies":
|
|
29
|
+
{
|
|
30
|
+
"@azerothjs/reactivity": "0.4.0-beta.1",
|
|
31
|
+
"@azerothjs/renderer": "0.4.0-beta.1",
|
|
32
|
+
"@azerothjs/component": "0.4.0-beta.1",
|
|
33
|
+
"@azerothjs/server": "0.4.0-beta.1",
|
|
34
|
+
"@azerothjs/store": "0.4.0-beta.1",
|
|
35
|
+
"@azerothjs/form": "0.4.0-beta.1",
|
|
36
|
+
"@azerothjs/router": "0.4.0-beta.1"
|
|
31
37
|
},
|
|
32
|
-
"publishConfig":
|
|
38
|
+
"publishConfig":
|
|
39
|
+
{
|
|
33
40
|
"access": "public"
|
|
34
41
|
},
|
|
35
|
-
"author":
|
|
42
|
+
"author":
|
|
43
|
+
{
|
|
44
|
+
"name": "IntelligentQuantum",
|
|
45
|
+
"email": "IntelligentQuantum@Gmail.Com",
|
|
46
|
+
"url": "https://IntelligentQuantum.Dev/"
|
|
47
|
+
},
|
|
36
48
|
"license": "MIT",
|
|
37
|
-
"repository":
|
|
49
|
+
"repository":
|
|
50
|
+
{
|
|
38
51
|
"type": "git",
|
|
39
52
|
"url": "git+https://github.com/IntelligentQuantum-Dev/AzerothJS.git",
|
|
40
53
|
"directory": "packages/core"
|
|
41
54
|
},
|
|
42
55
|
"homepage": "https://github.com/IntelligentQuantum-Dev/AzerothJS/tree/main/packages/core",
|
|
43
|
-
"bugs":
|
|
56
|
+
"bugs":
|
|
57
|
+
{
|
|
44
58
|
"url": "https://github.com/IntelligentQuantum-Dev/AzerothJS/issues"
|
|
45
59
|
}
|
|
46
60
|
}
|