@pyreon/meta 0.21.0 → 0.23.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/README.md +97 -63
- package/package.json +35 -35
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @pyreon/meta
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Single-import barrel — the full Pyreon fundamentals + UI-system ecosystem from one package.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Re-exports 33 `@pyreon/*` packages so apps can write `import { signal, useQuery, useForm, styled, PyreonUI } from '@pyreon/meta'` instead of remembering subpackages. Tree-shake-safe by construction: meta itself and every re-exported package declare `"sideEffects": false`, so modern bundlers (Vite/Rolldown, Webpack/Next.js, esbuild, Rollup, Parcel, Bun) only pull the subgraphs you actually import. Heavy renderers stay lazy at the source — `@pyreon/document` lazy-loads PDF/DOCX/XLSX/PPTX chunks inside `render()`, and `@pyreon/charts` / `@pyreon/code` / `@pyreon/flow` lazy-load ECharts / CodeMirror grammars / elkjs inside their consumer hooks.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -10,79 +10,113 @@ Import everything from one place instead of installing each package individually
|
|
|
10
10
|
bun add @pyreon/meta
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Quick start
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
```ts
|
|
16
|
+
import {
|
|
17
|
+
// Reactivity (re-exported via @pyreon/store)
|
|
18
|
+
signal, computed, effect, batch,
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
| `@pyreon/store` | `defineStore`, `signal`, `computed`, `effect`, `batch` |
|
|
20
|
-
| `@pyreon/form` | `useForm`, `useField`, `useFieldArray`, `FormProvider` |
|
|
21
|
-
| `@pyreon/validation` | `zodSchema`, `zodField` |
|
|
22
|
-
| `@pyreon/query` | `useQuery`, `useMutation`, `QueryClient`, `QueryClientProvider` |
|
|
23
|
-
| `@pyreon/table` | `useTable`, `flexRender` |
|
|
24
|
-
| `@pyreon/virtual` | `useVirtualizer`, `useWindowVirtualizer` |
|
|
25
|
-
| `@pyreon/i18n` | `createI18n`, `I18nProvider`, `useI18n`, `Trans` |
|
|
26
|
-
| `@pyreon/feature` | `defineFeature`, `reference` |
|
|
27
|
-
| `@pyreon/state-tree` | `model`, `getSnapshot`, `applySnapshot`, `applyPatch`, `onPatch` |
|
|
28
|
-
| `@pyreon/machine` | `createMachine` |
|
|
29
|
-
| `@pyreon/permissions` | `createPermissions`, `usePermissions`, `PermissionsProvider` |
|
|
30
|
-
| `@pyreon/hotkeys` | `useHotkey`, `useHotkeyScope` |
|
|
31
|
-
| `@pyreon/storage` | `useStorage`, `useCookie`, `useIndexedDB` |
|
|
32
|
-
| `@pyreon/charts` | `Chart` (reactive ECharts with lazy loading) |
|
|
33
|
-
| `@pyreon/flow` | `createFlow`, `Flow`, `Background`, `MiniMap`, `Controls` |
|
|
34
|
-
| `@pyreon/code` | `createEditor`, `CodeEditor`, `DiffEditor`, `TabbedEditor` |
|
|
35
|
-
| `@pyreon/rx` | `rx` namespace — filter/map/pipe/debounce/throttle/… (37 fns) |
|
|
36
|
-
| `@pyreon/toast` | `toast()`, `Toaster` |
|
|
37
|
-
| `@pyreon/url-state` | `useUrlState`, `setUrlRouter` |
|
|
38
|
-
| `@pyreon/dnd` | `useDraggable`, `useDroppable`, `useSortable`, `useFileDrop` |
|
|
39
|
-
| `@pyreon/document` | `createDocument`, `render` (PDF/DOCX/XLSX/… lazy-loaded) |
|
|
40
|
-
|
|
41
|
-
### UI System
|
|
42
|
-
|
|
43
|
-
| Package | Key Exports |
|
|
44
|
-
| ------------------------- | ------------------------------------------------------------------------ |
|
|
45
|
-
| `@pyreon/styler` | `css`, `styled`, `createGlobalStyle`, `keyframes` |
|
|
46
|
-
| `@pyreon/hooks` | 25+ signal-based hooks (`useHover`, `useFocus`, `useBreakpoint`, etc.) |
|
|
47
|
-
| `@pyreon/elements` | `Element`, `Text`, `List`, `Overlay`, `Portal`, `Iterator` |
|
|
48
|
-
| `@pyreon/unistyle` | `makeItResponsive`, `normalizeTheme`, `sortBreakpoints` |
|
|
49
|
-
| `@pyreon/coolgrid` | `Col`, `Container`, `Row` |
|
|
50
|
-
| `@pyreon/kinetic` | `kinetic`, `useAnimationEnd`, `useTransitionState` |
|
|
51
|
-
| `@pyreon/kinetic-presets` | `createFade`, `createSlide`, `createScale`, `createRotate`, `createBlur` |
|
|
52
|
-
| `@pyreon/attrs` | `attrs` |
|
|
53
|
-
| `@pyreon/rocketstyle` | `rocketstyle` |
|
|
54
|
-
| `@pyreon/ui-core` | `PyreonUI`, `useMode` |
|
|
55
|
-
| `@pyreon/document-primitives` | `DocDocument`, `DocPage`, `DocText`, … + `extractDocNode` |
|
|
56
|
-
| `@pyreon/connector-document` | `extractDocumentTree`, `resolveStyles` |
|
|
20
|
+
// State management
|
|
21
|
+
defineStore, resetAllStores,
|
|
57
22
|
|
|
58
|
-
|
|
23
|
+
// Data fetching
|
|
24
|
+
QueryClient, QueryClientProvider, useQuery, useMutation,
|
|
59
25
|
|
|
60
|
-
|
|
26
|
+
// Forms
|
|
27
|
+
useForm, useField, useFieldArray, FormProvider,
|
|
28
|
+
zodSchema, zodField,
|
|
61
29
|
|
|
62
|
-
|
|
30
|
+
// i18n
|
|
31
|
+
createI18n, I18nProvider, useI18n, Trans,
|
|
63
32
|
|
|
64
|
-
|
|
65
|
-
|
|
33
|
+
// Styling
|
|
34
|
+
styled, css, keyframes,
|
|
35
|
+
PyreonUI, useMode,
|
|
66
36
|
|
|
67
|
-
|
|
37
|
+
// Hooks
|
|
38
|
+
useHover, useFocus, useBreakpoint,
|
|
68
39
|
|
|
69
|
-
|
|
40
|
+
// Layout primitives
|
|
41
|
+
Element, Text, List, Overlay, Portal,
|
|
42
|
+
Container, Row, Col,
|
|
70
43
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
signal,
|
|
75
|
-
useQuery,
|
|
76
|
-
useForm,
|
|
77
|
-
useHotkey,
|
|
44
|
+
// Misc
|
|
45
|
+
toast, Toaster,
|
|
46
|
+
useUrlState,
|
|
78
47
|
useStorage,
|
|
79
|
-
Chart,
|
|
80
|
-
createFlow,
|
|
81
|
-
styled,
|
|
82
|
-
useHover,
|
|
83
48
|
} from '@pyreon/meta'
|
|
84
49
|
```
|
|
85
50
|
|
|
51
|
+
## What's re-exported
|
|
52
|
+
|
|
53
|
+
### Fundamentals
|
|
54
|
+
|
|
55
|
+
| Source | Highlights |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `@pyreon/store` | `defineStore`, `signal`, `computed`, `effect`, `batch`, `addStorePlugin`, `resetStore`, `resetAllStores` |
|
|
58
|
+
| `@pyreon/form` | `useForm`, `useField`, `useFieldArray`, `useFormContext`, `useFormState`, `useWatch`, `FormProvider` |
|
|
59
|
+
| `@pyreon/validation` | `zodSchema`, `zodField`, `SchemaAdapter`, `ValidationIssue` |
|
|
60
|
+
| `@pyreon/query` | `QueryClient`, `QueryClientProvider`, `useQuery`, `useMutation`, `useInfiniteQuery`, `useIsFetching`, `useIsMutating`, `useQueryClient` |
|
|
61
|
+
| `@pyreon/table` | `useTable`, `flexRender` |
|
|
62
|
+
| `@pyreon/virtual` | `useVirtualizer`, `useWindowVirtualizer` |
|
|
63
|
+
| `@pyreon/i18n` | `createI18n`, `I18nProvider`, `useI18n`, `Trans` |
|
|
64
|
+
| `@pyreon/feature` | `defineFeature`, `reference` |
|
|
65
|
+
| `@pyreon/state-tree` | `model`, `getSnapshot`, `applySnapshot`, `applyPatch`, `onPatch`, `addMiddleware`, `resetHook`, `resetAllHooks` |
|
|
66
|
+
| `@pyreon/machine` | `createMachine` |
|
|
67
|
+
| `@pyreon/permissions` | `createPermissions`, `PermissionsProvider`, `usePermissions` |
|
|
68
|
+
| `@pyreon/hotkeys` | `useHotkey`, `useHotkeyScope` |
|
|
69
|
+
| `@pyreon/storage` | `useStorage`, `useCookie`, `useIndexedDB`, `useMemoryStorage`, `createStorage` |
|
|
70
|
+
| `@pyreon/charts` | `Chart` |
|
|
71
|
+
| `@pyreon/flow` | `createFlow`, `Flow`, `Background`, `MiniMap`, `Controls`, `Handle`, `Panel`, `Position`, `computeLayout`, `flowStyles`, `NodeResizer`, `NodeToolbar` |
|
|
72
|
+
| `@pyreon/code` | `createEditor`, `CodeEditor`, `DiffEditor`, `TabbedEditor` |
|
|
73
|
+
| `@pyreon/rx` | `rx` (namespace — filter/map/pipe/debounce/throttle/… 37 fns) |
|
|
74
|
+
| `@pyreon/toast` | `toast`, `Toaster` |
|
|
75
|
+
| `@pyreon/url-state` | `useUrlState`, `setUrlRouter` |
|
|
76
|
+
| `@pyreon/dnd` | `useDraggable`, `useDroppable`, `useSortable`, `useFileDrop`, `useDragMonitor` |
|
|
77
|
+
| `@pyreon/document` | `createDocument`, `render`, `download`, `isDocNode`, `registerRenderer`, `unregisterRenderer` (builder + render API; format chunks stay lazy) |
|
|
78
|
+
|
|
79
|
+
### UI system
|
|
80
|
+
|
|
81
|
+
| Source | Highlights |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `@pyreon/styler` | `styled`, `css`, `keyframes`, `createGlobalStyle` |
|
|
84
|
+
| `@pyreon/hooks` | 20+ hooks — `useBreakpoint`, `useHover`, `useFocus`, `useFocusTrap`, `useClickOutside`, `useElementSize`, `useIntersection`, `useInterval`, `useTimeout`, `useDebouncedValue`, `useDebouncedCallback`, `useThrottledCallback`, `useMediaQuery`, `useColorScheme`, `useReducedMotion`, `useScrollLock`, `useMergedRef`, `useToggle`, `useKeyboard`, `useWindowResize` |
|
|
85
|
+
| `@pyreon/elements` | `Element`, `Text`, `List`, `Overlay`, `Portal`, `Iterator` |
|
|
86
|
+
| `@pyreon/unistyle` | `makeItResponsive`, `normalizeTheme`, `sortBreakpoints` |
|
|
87
|
+
| `@pyreon/coolgrid` | `Container`, `Row`, `Col` |
|
|
88
|
+
| `@pyreon/kinetic` | `kinetic`, `useAnimationEnd`, `useTransitionState` |
|
|
89
|
+
| `@pyreon/kinetic-presets` | `createFade`, `createSlide`, `createScale`, `createRotate`, `createBlur` |
|
|
90
|
+
| `@pyreon/attrs` | `attrs` |
|
|
91
|
+
| `@pyreon/rocketstyle` | `rocketstyle` |
|
|
92
|
+
| `@pyreon/ui-core` | `PyreonUI`, `useMode` (consumer-app surface; framework-internal utilities omitted) |
|
|
93
|
+
| `@pyreon/document-primitives` | `DocDocument`, `DocPage`, `DocSection`, `DocRow`, `DocColumn`, `DocHeading`, `DocText`, `DocLink`, `DocImage`, `DocTable`, `DocList`, `DocListItem`, `DocCode`, `DocDivider`, `DocSpacer`, `DocButton`, `DocQuote`, `DocPageBreak`, `extractDocNode`, `createDocumentExport`, `DocumentPreview`, `documentTheme` |
|
|
94
|
+
| `@pyreon/connector-document` | `extractDocumentTree`, `resolveStyles`, `DocumentMarker`, `ExtractOptions`, `ResolvedStyles` |
|
|
95
|
+
|
|
96
|
+
## Bundle hygiene
|
|
97
|
+
|
|
98
|
+
Tree-shaking removes everything you don't import — the published `lib/index.js` is a flat list of named re-exports, and every source package declares `"sideEffects": false`. Importing `{ useStorage }` does NOT pull `@pyreon/document`, `@pyreon/charts`, or any other unrelated package into the bundle graph.
|
|
99
|
+
|
|
100
|
+
Heavy upstream deps stay lazy at the source-package level:
|
|
101
|
+
|
|
102
|
+
- **`@pyreon/document`** — PDF (~3MB pdfmake), DOCX (~700KB), XLSX (~1.1MB), PPTX (~400KB) renderers `import()` inside `render(doc, '<format>')`. `createDocument()` alone bundles nothing format-specific.
|
|
103
|
+
- **`@pyreon/charts`** — ECharts is lazy-loaded inside `<Chart>` mount.
|
|
104
|
+
- **`@pyreon/code`** — CodeMirror language grammars lazy-load via `loadLanguage()`.
|
|
105
|
+
- **`@pyreon/flow`** — elkjs (auto-layout) lazy-loads inside `flow.layout()`.
|
|
106
|
+
|
|
107
|
+
## Gotchas
|
|
108
|
+
|
|
109
|
+
- **No router / runtime in meta.** `@pyreon/router`, `@pyreon/core`, `@pyreon/runtime-dom`, `@pyreon/runtime-server`, `@pyreon/server`, `@pyreon/head` are NOT re-exported here. For routing + full-stack, install `@pyreon/zero` (which composes them with file-system routing + adapters).
|
|
110
|
+
- **Reactivity primitives come via `@pyreon/store`.** `signal` / `computed` / `effect` / `batch` are re-exported from `@pyreon/store`, not `@pyreon/reactivity` directly. The runtime identity is the same — `@pyreon/store` itself re-exports them from `@pyreon/reactivity`.
|
|
111
|
+
- **`rx` is a namespace, not individual operators.** Use `rx.filter(src, p)` / `rx.pipe(src, rx.filter(p), rx.map(f))`. The namespace avoids collisions with `@pyreon/hooks` / `@pyreon/dnd` operator-name twins (`throttle`, `debounce`, `merge`).
|
|
112
|
+
- **Document JSX primitives come via `@pyreon/document-primitives`.** `@pyreon/document` ships generic-named JSX primitives (`Text`, `List`, `Row`, `Table`, `Image`) that would collide with `@pyreon/elements` / `@pyreon/coolgrid`; meta deliberately re-exports the `Doc*`-prefixed `@pyreon/document-primitives` instead. Import the builder primitives directly from `@pyreon/document` if you need them.
|
|
113
|
+
- **Pure builder/renderer API from `@pyreon/document`.** Only `createDocument`, `render`, `download`, `isDocNode`, `registerRenderer`, `unregisterRenderer` and types are re-exported — the format-renderer chunks stay lazy.
|
|
114
|
+
- **`@pyreon/ui-core` surface is narrow.** Only `PyreonUI` and `useMode` are re-exported; framework-internal utilities (`init`, `compose`, `context`, `omit`, `pick`, `throttle`, `merge`) are NOT — they target ui-system authors, not app code.
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
Full docs: [docs.pyreon.dev/docs/meta](https://docs.pyreon.dev/docs/meta) (or `docs/docs/meta.md` in this repo).
|
|
119
|
+
|
|
86
120
|
## License
|
|
87
121
|
|
|
88
|
-
|
|
122
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/meta",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Pyreon Meta — barrel package re-exporting the full Pyreon fundamentals ecosystem",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vit Bokisch",
|
|
@@ -37,39 +37,39 @@
|
|
|
37
37
|
"lint": "oxlint ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@pyreon/attrs": "^0.
|
|
41
|
-
"@pyreon/charts": "^0.
|
|
42
|
-
"@pyreon/code": "^0.
|
|
43
|
-
"@pyreon/connector-document": "^0.
|
|
44
|
-
"@pyreon/coolgrid": "^0.
|
|
45
|
-
"@pyreon/dnd": "^0.
|
|
46
|
-
"@pyreon/document": "^0.
|
|
47
|
-
"@pyreon/document-primitives": "^0.
|
|
48
|
-
"@pyreon/elements": "^0.
|
|
49
|
-
"@pyreon/feature": "^0.
|
|
50
|
-
"@pyreon/flow": "^0.
|
|
51
|
-
"@pyreon/form": "^0.
|
|
52
|
-
"@pyreon/hooks": "^0.
|
|
53
|
-
"@pyreon/hotkeys": "^0.
|
|
54
|
-
"@pyreon/i18n": "^0.
|
|
55
|
-
"@pyreon/kinetic": "^0.
|
|
56
|
-
"@pyreon/kinetic-presets": "^0.
|
|
57
|
-
"@pyreon/machine": "^0.
|
|
58
|
-
"@pyreon/permissions": "^0.
|
|
59
|
-
"@pyreon/query": "^0.
|
|
60
|
-
"@pyreon/reactivity": "^0.
|
|
61
|
-
"@pyreon/rocketstyle": "^0.
|
|
62
|
-
"@pyreon/rx": "^0.
|
|
63
|
-
"@pyreon/state-tree": "^0.
|
|
64
|
-
"@pyreon/storage": "^0.
|
|
65
|
-
"@pyreon/store": "^0.
|
|
66
|
-
"@pyreon/styler": "^0.
|
|
67
|
-
"@pyreon/table": "^0.
|
|
68
|
-
"@pyreon/toast": "^0.
|
|
69
|
-
"@pyreon/ui-core": "^0.
|
|
70
|
-
"@pyreon/unistyle": "^0.
|
|
71
|
-
"@pyreon/url-state": "^0.
|
|
72
|
-
"@pyreon/validation": "^0.
|
|
73
|
-
"@pyreon/virtual": "^0.
|
|
40
|
+
"@pyreon/attrs": "^0.23.0",
|
|
41
|
+
"@pyreon/charts": "^0.23.0",
|
|
42
|
+
"@pyreon/code": "^0.23.0",
|
|
43
|
+
"@pyreon/connector-document": "^0.23.0",
|
|
44
|
+
"@pyreon/coolgrid": "^0.23.0",
|
|
45
|
+
"@pyreon/dnd": "^0.23.0",
|
|
46
|
+
"@pyreon/document": "^0.23.0",
|
|
47
|
+
"@pyreon/document-primitives": "^0.23.0",
|
|
48
|
+
"@pyreon/elements": "^0.23.0",
|
|
49
|
+
"@pyreon/feature": "^0.23.0",
|
|
50
|
+
"@pyreon/flow": "^0.23.0",
|
|
51
|
+
"@pyreon/form": "^0.23.0",
|
|
52
|
+
"@pyreon/hooks": "^0.23.0",
|
|
53
|
+
"@pyreon/hotkeys": "^0.23.0",
|
|
54
|
+
"@pyreon/i18n": "^0.23.0",
|
|
55
|
+
"@pyreon/kinetic": "^0.23.0",
|
|
56
|
+
"@pyreon/kinetic-presets": "^0.23.0",
|
|
57
|
+
"@pyreon/machine": "^0.23.0",
|
|
58
|
+
"@pyreon/permissions": "^0.23.0",
|
|
59
|
+
"@pyreon/query": "^0.23.0",
|
|
60
|
+
"@pyreon/reactivity": "^0.23.0",
|
|
61
|
+
"@pyreon/rocketstyle": "^0.23.0",
|
|
62
|
+
"@pyreon/rx": "^0.23.0",
|
|
63
|
+
"@pyreon/state-tree": "^0.23.0",
|
|
64
|
+
"@pyreon/storage": "^0.23.0",
|
|
65
|
+
"@pyreon/store": "^0.23.0",
|
|
66
|
+
"@pyreon/styler": "^0.23.0",
|
|
67
|
+
"@pyreon/table": "^0.23.0",
|
|
68
|
+
"@pyreon/toast": "^0.23.0",
|
|
69
|
+
"@pyreon/ui-core": "^0.23.0",
|
|
70
|
+
"@pyreon/unistyle": "^0.23.0",
|
|
71
|
+
"@pyreon/url-state": "^0.23.0",
|
|
72
|
+
"@pyreon/validation": "^0.23.0",
|
|
73
|
+
"@pyreon/virtual": "^0.23.0"
|
|
74
74
|
}
|
|
75
75
|
}
|