@flow.os/client 0.0.1-dev.1771779802 → 0.0.1-dev.1771781977
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 +20 -0
- package/{config.ts → build/config.ts} +6 -6
- package/index.ts +6 -4
- package/package.json +16 -16
- package/runtime/dom.ts +2 -0
- package/{jsx.ts → runtime/jsx.ts} +2 -2
- package/{build.ts → scripts/build.ts} +0 -0
- package/{preview.ts → scripts/preview.ts} +0 -0
- package/{start-dev.ts → scripts/start-dev.ts} +1 -4
- package/dom.ts +0 -5
- /package/{vite.ts → build/vite.ts} +0 -0
- /package/{jsx-dev-runtime.ts → runtime/jsx-dev-runtime.ts} +0 -0
- /package/{jsx-runtime.ts → runtime/jsx-runtime.ts} +0 -0
- /package/{jsx-types.d.ts → runtime/jsx-types.d.ts} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @flow.os/client
|
|
2
|
+
|
|
3
|
+
Client Flow.os: JSX runtime, router, stili, dev/build/preview.
|
|
4
|
+
|
|
5
|
+
## Struttura (per feature)
|
|
6
|
+
|
|
7
|
+
- **Root:** solo `index.ts`, `package.json`, `LICENSE`, `README.md`.
|
|
8
|
+
- **`runtime/`** — JSX (jsx.ts, jsx-runtime, jsx-dev-runtime, jsx-types.d.ts), dom.ts.
|
|
9
|
+
- **`build/`** — config.ts (dev server), vite.ts (plugin Vite).
|
|
10
|
+
- **`features/`** — class-flow, style, style-flow, attrs, viewport, pseudo-injector, utils.
|
|
11
|
+
- **`scripts/`** — bin: start-dev, build, preview.
|
|
12
|
+
|
|
13
|
+
## API (tutto da `index.ts`)
|
|
14
|
+
|
|
15
|
+
- **Runtime:** `Fragment`, `jsx`, `jsxs`, `jsxDEV`, `normalizeChild`, `setContent`, `config`, `applyClassFlow`, `applyClassAndClassList`, `applyStyle`, `applyStyleFlow`, `applyAttrs`.
|
|
16
|
+
- **Subpath:** `@flow.os/client/config`, `@flow.os/client/vite`, `@flow.os/client/jsx-runtime`, `@flow.os/client/jsx-dev-runtime`.
|
|
17
|
+
|
|
18
|
+
## Bin
|
|
19
|
+
|
|
20
|
+
`flow-os-dev`, `flow-os-build`, `flow-os-preview` (legono `flow.config.ts`).
|
|
@@ -41,16 +41,17 @@ function getNetworkUrl(port: number): string | null {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/**
|
|
44
|
+
/** Monorepo: alias a path assoluti (Rollup in Docker non segue symlink). Fuori monorepo ritorna {}. */
|
|
45
45
|
function resolveAlias(): Record<string, string> {
|
|
46
46
|
const root = path.resolve(process.cwd());
|
|
47
47
|
const packagesDir = path.join(root, 'packages');
|
|
48
48
|
if (!fs.existsSync(packagesDir)) return {};
|
|
49
49
|
const alias: Record<string, string> = {};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
alias['@flow.os/client/jsx-
|
|
50
|
+
const clientRuntime = path.join(root, 'packages', 'client', 'runtime');
|
|
51
|
+
const jrx = path.join(clientRuntime, 'jsx-runtime.ts');
|
|
52
|
+
if (fs.existsSync(jrx)) {
|
|
53
|
+
alias['@flow.os/client/jsx-runtime'] = jrx;
|
|
54
|
+
alias['@flow.os/client/jsx-dev-runtime'] = path.join(clientRuntime, 'jsx-dev-runtime.ts');
|
|
54
55
|
}
|
|
55
56
|
for (const name of fs.readdirSync(packagesDir)) {
|
|
56
57
|
const dir = path.join(packagesDir, name);
|
|
@@ -89,7 +90,6 @@ const DEFAULTS = {
|
|
|
89
90
|
plugins: [] as Plugin[],
|
|
90
91
|
};
|
|
91
92
|
|
|
92
|
-
/** Banner Flow OS: sostituisce l'output di Vite con uno custom (Local + Network, box, colori). */
|
|
93
93
|
function flowServerUrlPlugin(hostEnabled: boolean): Plugin {
|
|
94
94
|
return {
|
|
95
95
|
name: 'flow:server-url',
|
package/index.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/// <reference path="./jsx-types.d.ts" />
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
/// <reference path="./runtime/jsx-types.d.ts" />
|
|
2
|
+
// API pubblica: tutto da qui o da subpath (./config, ./vite, ./jsx-runtime, ./jsx-dev-runtime)
|
|
3
|
+
export { Fragment, jsx, jsxs, jsxDEV } from './runtime/jsx.js';
|
|
4
|
+
export { normalizeChild, setContent } from './runtime/dom.js';
|
|
5
|
+
export { default as config } from './build/config.js';
|
|
6
|
+
export { applyClassFlow, applyClassAndClassList, applyStyle, applyStyleFlow, applyAttrs } from './features/index.js';
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/client",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1771781977",
|
|
4
4
|
"license": "PolyForm-Shield-1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
7
7
|
"types": "./index.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"flow-os-dev": "./start-dev.ts",
|
|
10
|
-
"flow-os-build": "./build.ts",
|
|
11
|
-
"flow-os-preview": "./preview.ts"
|
|
9
|
+
"flow-os-dev": "./scripts/start-dev.ts",
|
|
10
|
+
"flow-os-build": "./scripts/build.ts",
|
|
11
|
+
"flow-os-preview": "./scripts/preview.ts"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@flow.os/core": "^0.0.1",
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"default": "./index.ts"
|
|
26
26
|
},
|
|
27
27
|
"./config": {
|
|
28
|
-
"types": "./config.ts",
|
|
29
|
-
"import": "./config.ts",
|
|
30
|
-
"default": "./config.ts"
|
|
28
|
+
"types": "./build/config.ts",
|
|
29
|
+
"import": "./build/config.ts",
|
|
30
|
+
"default": "./build/config.ts"
|
|
31
31
|
},
|
|
32
32
|
"./vite": {
|
|
33
|
-
"types": "./vite.ts",
|
|
34
|
-
"import": "./vite.ts",
|
|
35
|
-
"default": "./vite.ts"
|
|
33
|
+
"types": "./build/vite.ts",
|
|
34
|
+
"import": "./build/vite.ts",
|
|
35
|
+
"default": "./build/vite.ts"
|
|
36
36
|
},
|
|
37
37
|
"./jsx-runtime": {
|
|
38
|
-
"types": "./jsx.ts",
|
|
39
|
-
"import": "./jsx.ts",
|
|
40
|
-
"default": "./jsx.ts"
|
|
38
|
+
"types": "./runtime/jsx.ts",
|
|
39
|
+
"import": "./runtime/jsx.ts",
|
|
40
|
+
"default": "./runtime/jsx.ts"
|
|
41
41
|
},
|
|
42
42
|
"./jsx-dev-runtime": {
|
|
43
|
-
"types": "./jsx.ts",
|
|
44
|
-
"import": "./jsx.ts",
|
|
45
|
-
"default": "./jsx.ts"
|
|
43
|
+
"types": "./runtime/jsx.ts",
|
|
44
|
+
"import": "./runtime/jsx.ts",
|
|
45
|
+
"default": "./runtime/jsx.ts"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
package/runtime/dom.ts
ADDED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference path="./jsx-types.d.ts" />
|
|
2
2
|
import { effect } from '@flow.os/core';
|
|
3
|
-
import { isGetter } from '
|
|
3
|
+
import { isGetter } from '../features/utils.js';
|
|
4
4
|
import {
|
|
5
5
|
applyClassFlow,
|
|
6
6
|
applyClassAndClassList,
|
|
7
7
|
applyStyle,
|
|
8
8
|
applyStyleFlow,
|
|
9
9
|
applyAttrs,
|
|
10
|
-
} from '
|
|
10
|
+
} from '../features/index.js';
|
|
11
11
|
|
|
12
12
|
export const Fragment = Symbol.for('flow.fragment');
|
|
13
13
|
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
|
|
4
|
-
* Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
|
|
5
|
-
*/
|
|
2
|
+
/** Dev server: carica flow.config.ts e avvia Vite. Porta libera 3000–3020. */
|
|
6
3
|
|
|
7
4
|
import { pathToFileURL } from 'node:url';
|
|
8
5
|
import { join } from 'node:path';
|
package/dom.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|