@monbolc/lowcode-ignitor 2.0.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/lib/index.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @monbolc/lowcode-ignitor
3
+ *
4
+ * Bootstrap entry for SapuLowcodeEngine development.
5
+ * This package is the L0 "ignitor" — its only job is to start a dev server
6
+ * and hand off to the engine proper (L7) once that is implemented.
7
+ *
8
+ * Currently a no-op placeholder. Subsequent layers will be wired in here.
9
+ */
10
+ import type { IPublicApiEngine, IPublicEngineOptions } from '@monbolc/lowcode-types';
11
+ export type { IPublicApiEngine, IPublicEngineOptions };
12
+ export interface IIgnitorContext {
13
+ /** The host DOM element the engine will mount into. */
14
+ container: HTMLElement;
15
+ /** Engine instance after init. Undefined before init. */
16
+ engine?: IPublicApiEngine;
17
+ /** Free-form callbacks for hot-reload / watch mode. */
18
+ hooks?: {
19
+ onChange?: (file: string) => void | Promise<void>;
20
+ onReload?: () => void | Promise<void>;
21
+ };
22
+ }
23
+ /**
24
+ * Bootstrap the engine.
25
+ *
26
+ * In the current L0 state, this just creates a placeholder div.
27
+ * Once L7 (`engine`) ships, this will hand off to the real engine.
28
+ */
29
+ export declare function bootstrap(options: IPublicEngineOptions): Promise<IIgnitorContext>;
30
+ /**
31
+ * Default export for `import sapu from '@monbolc/lowcode-ignitor'` users.
32
+ */
33
+ declare const _default: {
34
+ bootstrap: typeof bootstrap;
35
+ };
36
+ export default _default;
package/lib/index.js ADDED
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * @monbolc/lowcode-ignitor
4
+ *
5
+ * Bootstrap entry for SapuLowcodeEngine development.
6
+ * This package is the L0 "ignitor" — its only job is to start a dev server
7
+ * and hand off to the engine proper (L7) once that is implemented.
8
+ *
9
+ * Currently a no-op placeholder. Subsequent layers will be wired in here.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.bootstrap = bootstrap;
13
+ /**
14
+ * Bootstrap the engine.
15
+ *
16
+ * In the current L0 state, this just creates a placeholder div.
17
+ * Once L7 (`engine`) ships, this will hand off to the real engine.
18
+ */
19
+ async function bootstrap(options) {
20
+ const container = typeof options.container === 'string'
21
+ ? document.querySelector(options.container)
22
+ : options.container;
23
+ if (!container) {
24
+ throw new Error(`[ignitor] Container not found: ${typeof options.container === 'string' ? options.container : '<HTMLElement>'}`);
25
+ }
26
+ // L0 placeholder: print a friendly banner.
27
+ // Will be replaced by `engine.init(options)` in a later layer.
28
+ container.innerHTML = `
29
+ <div style="
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ height: 100%;
34
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
35
+ color: #888;
36
+ ">
37
+ <div style="text-align: center;">
38
+ <h1 style="font-size: 28px; margin: 0;">SapuLowcodeEngine</h1>
39
+ <p style="margin: 8px 0 0;">L0 bootstrap ready. Engine core not yet implemented.</p>
40
+ <p style="margin: 4px 0 0; font-size: 12px; color: #aaa;">
41
+ Theme: <code>${options.theme ?? 'light'}</code>
42
+ </p>
43
+ </div>
44
+ </div>
45
+ `;
46
+ return { container };
47
+ }
48
+ /**
49
+ * Default export for `import sapu from '@monbolc/lowcode-ignitor'` users.
50
+ */
51
+ exports.default = { bootstrap };
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AA0BH,8BAoCC;AA1CD;;;;;GAKG;AACI,KAAK,UAAU,SAAS,CAAC,OAA6B;IAC3D,MAAM,SAAS,GACb,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ;QACnC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAc,OAAO,CAAC,SAAS,CAAC;QACxD,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAExB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,kCACE,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,eAC9D,EAAE,CACH,CAAC;IACJ,CAAC;IAED,2CAA2C;IAC3C,+DAA+D;IAC/D,SAAS,CAAC,SAAS,GAAG;;;;;;;;;;;;;yBAaC,OAAO,CAAC,KAAK,IAAI,OAAO;;;;GAI9C,CAAC;IAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,kBAAe,EAAE,SAAS,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@monbolc/lowcode-ignitor",
3
+ "version": "2.0.0",
4
+ "description": "SapuLowcodeEngine bootstrap dev entry (L0)",
5
+ "license": "MIT",
6
+ "main": "lib/index.js",
7
+ "module": "lib/index.js",
8
+ "types": "lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "import": "./lib/index.js",
13
+ "require": "./lib/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "lib"
18
+ ],
19
+ "scripts": {
20
+ "start": "node scripts/dev.js",
21
+ "build": "tsc -p tsconfig.json",
22
+ "clean": "rimraf lib es"
23
+ },
24
+ "dependencies": {
25
+ "@monbolc/lowcode-types": "2.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^20.11.0",
29
+ "rimraf": "^5.0.5",
30
+ "typescript": "^5.4.5"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public",
34
+ "registry": "https://registry.npmjs.org/"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git@github.com:monbolc/sapu-lowcode-engine.git",
39
+ "directory": "packages/ignitor"
40
+ },
41
+ "keywords": [
42
+ "lowcode",
43
+ "engine",
44
+ "ignitor",
45
+ "bootstrap"
46
+ ]
47
+ }