@arcanewizards/sigil 0.1.0 → 0.1.2
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 -0
- package/package.json +20 -15
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# `@arcanewizards/sigil`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@arcanewizards/sigil)
|
|
4
|
+
|
|
5
|
+
Application framework for Arcane-based A/V applications.
|
|
6
|
+
|
|
7
|
+
`@arcanewizards/sigil` provides the runtime glue for standing up an Arcane application, wiring backend and frontend component namespaces, and reusing shared frontend controls, dialogs, toolbars, styling helpers, and CSS assets.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @arcanewizards/sigil
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Main Entry Points
|
|
16
|
+
|
|
17
|
+
- `@arcanewizards/sigil`
|
|
18
|
+
Backend/runtime exports such as `runSigilApp`, `AppShell`, `AppRoot`, `AppListenerManager`, logging contexts, and shared runtime types.
|
|
19
|
+
- `@arcanewizards/sigil/frontend`
|
|
20
|
+
Frontend bootstrap exports such as `startSigilFrontend`, `createSigilFrontendRenderer`, `Debugger`, browser-context helpers, and shared frontend types.
|
|
21
|
+
- `@arcanewizards/sigil/frontend/controls`
|
|
22
|
+
Shared control primitives.
|
|
23
|
+
- `@arcanewizards/sigil/frontend/dialogs`
|
|
24
|
+
Shared dialog primitives.
|
|
25
|
+
- `@arcanewizards/sigil/frontend/toolbars`
|
|
26
|
+
Shared toolbar primitives.
|
|
27
|
+
- `@arcanewizards/sigil/frontend/tooltip`
|
|
28
|
+
Shared tooltip helpers and boundaries.
|
|
29
|
+
- `@arcanewizards/sigil/frontend/styling`
|
|
30
|
+
Shared styling helpers such as `cssVariables`, `cnd`, `sigilColorUsage`, and root hint-color helpers.
|
|
31
|
+
- `@arcanewizards/sigil/frontend/preferences`
|
|
32
|
+
Frontend preference helpers.
|
|
33
|
+
- `@arcanewizards/sigil/frontend/appearance`
|
|
34
|
+
Appearance-switching UI.
|
|
35
|
+
- `@arcanewizards/sigil/frontend/styles/base.css`
|
|
36
|
+
- `@arcanewizards/sigil/frontend/styles/theme.css`
|
|
37
|
+
- `@arcanewizards/sigil/frontend/styles/sigil.css`
|
|
38
|
+
|
|
39
|
+
## Backend Usage
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { CoreComponents } from '@arcanejs/react-toolkit';
|
|
43
|
+
import { runSigilApp, SIGIL_COMPONENTS } from '@arcanewizards/sigil';
|
|
44
|
+
import pino from 'pino';
|
|
45
|
+
|
|
46
|
+
type AppApi = {
|
|
47
|
+
ping: () => string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const logger = pino();
|
|
51
|
+
|
|
52
|
+
const app = runSigilApp<AppApi, { greeting: string }>({
|
|
53
|
+
logger,
|
|
54
|
+
title: 'Example App',
|
|
55
|
+
version: '0.1.0',
|
|
56
|
+
appProps: { greeting: 'hello' },
|
|
57
|
+
createApp: ({ setAppApi }) => {
|
|
58
|
+
setAppApi({
|
|
59
|
+
ping: () => 'pong',
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return null;
|
|
63
|
+
},
|
|
64
|
+
componentNamespaces: [CoreComponents, SIGIL_COMPONENTS],
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
app.addEventListener('apiChange', (api) => {
|
|
68
|
+
console.log(api?.ping());
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Frontend Usage
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { startSigilFrontend } from '@arcanewizards/sigil/frontend';
|
|
76
|
+
|
|
77
|
+
startSigilFrontend({
|
|
78
|
+
appRenderers: [],
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
In a real app you normally pass your own frontend component renderers through `appRenderers`.
|
|
83
|
+
|
|
84
|
+
## CSS Assets
|
|
85
|
+
|
|
86
|
+
For frontend applications, import the exported styles from your app stylesheet:
|
|
87
|
+
|
|
88
|
+
```css
|
|
89
|
+
@import '@arcanewizards/sigil/frontend/styles/sigil.css';
|
|
90
|
+
@import '@arcanewizards/sigil/frontend/styles/theme.css';
|
|
91
|
+
@import '@arcanewizards/sigil/frontend/styles/base.css';
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Notes
|
|
95
|
+
|
|
96
|
+
- The package is designed for React-based Arcane applications.
|
|
97
|
+
- The frontend and backend APIs are intentionally split into subpath exports so consumers only import the surface they need.
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcanewizards/sigil",
|
|
3
3
|
"description": "Application framework for A/V applications, built on-top of arcanejs",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/ArcaneWizards/open-source.git",
|
|
10
|
+
"directory": "packages/sigil"
|
|
11
|
+
},
|
|
7
12
|
"exports": {
|
|
8
13
|
".": {
|
|
9
14
|
"@arcanewizards/source": "./src/index.ts",
|
|
@@ -85,30 +90,20 @@
|
|
|
85
90
|
"files": [
|
|
86
91
|
"dist"
|
|
87
92
|
],
|
|
88
|
-
"scripts": {
|
|
89
|
-
"build": "rm -rf dist && tsup && pnpm build:styles && check-export-map",
|
|
90
|
-
"build:styles": "tailwindcss -i ./src/frontend/styles/sigil.css -o ./dist/frontend/styles/sigil.css && cp ./src/frontend/styles/theme.css ./dist/frontend/styles/theme.css && cp ./src/frontend/styles/base.css ./dist/frontend/styles/base.css",
|
|
91
|
-
"check:types": "tsc --noEmit",
|
|
92
|
-
"format:fix": "cd .. && pnpm format:fix",
|
|
93
|
-
"lint": "eslint . --max-warnings 0",
|
|
94
|
-
"lint:fix": "eslint --fix ."
|
|
95
|
-
},
|
|
96
93
|
"dependencies": {
|
|
97
94
|
"@arcanejs/diff": "^0.5.2",
|
|
98
95
|
"@arcanejs/protocol": "^0.8.0",
|
|
99
96
|
"@arcanejs/react-toolkit": "^0.15.1",
|
|
100
97
|
"@arcanejs/toolkit": "^8.0.0",
|
|
101
98
|
"@arcanejs/toolkit-frontend": "^0.11.0",
|
|
102
|
-
"@arcanewizards/net-utils": "workspace:^",
|
|
103
99
|
"lodash": "^4.17.21",
|
|
104
100
|
"pino": "^9.5.0",
|
|
105
101
|
"radix-ui": "^1.4.3",
|
|
106
102
|
"react": "^19.2.0",
|
|
107
|
-
"zod": "^3.22.4"
|
|
103
|
+
"zod": "^3.22.4",
|
|
104
|
+
"@arcanewizards/net-utils": "^0.1.2"
|
|
108
105
|
},
|
|
109
106
|
"devDependencies": {
|
|
110
|
-
"@arcanewizards/eslint-config": "workspace:^",
|
|
111
|
-
"@arcanewizards/typescript-config": "workspace:^",
|
|
112
107
|
"@tailwindcss/cli": "^4.1.13",
|
|
113
108
|
"@types/lodash": "^4.17.13",
|
|
114
109
|
"@types/node": "^25.0.3",
|
|
@@ -118,6 +113,16 @@
|
|
|
118
113
|
"eslint-plugin-better-tailwindcss": "^4.2.0",
|
|
119
114
|
"tailwindcss": "^4.1.13",
|
|
120
115
|
"tsup": "^8.1.0",
|
|
121
|
-
"typescript": "^5.7.3"
|
|
116
|
+
"typescript": "^5.7.3",
|
|
117
|
+
"@arcanewizards/eslint-config": "^0.0.0",
|
|
118
|
+
"@arcanewizards/typescript-config": "^0.0.0"
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"build": "rm -rf dist && tsup && pnpm build:styles && check-export-map",
|
|
122
|
+
"build:styles": "tailwindcss -i ./src/frontend/styles/sigil.css -o ./dist/frontend/styles/sigil.css && cp ./src/frontend/styles/theme.css ./dist/frontend/styles/theme.css && cp ./src/frontend/styles/base.css ./dist/frontend/styles/base.css",
|
|
123
|
+
"check:types": "tsc --noEmit",
|
|
124
|
+
"format:fix": "cd .. && pnpm format:fix",
|
|
125
|
+
"lint": "eslint . --max-warnings 0",
|
|
126
|
+
"lint:fix": "eslint --fix ."
|
|
122
127
|
}
|
|
123
|
-
}
|
|
128
|
+
}
|