@codeenvision/ui-platform 1.0.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/LICENSE +6 -0
- package/README.md +84 -0
- package/package.json +30 -0
- package/src/bootstrap.ts +67 -0
- package/src/css-path.js +5 -0
- package/src/css-path.js.d.ts +9 -0
- package/src/css-path.ts +5 -0
- package/src/index.ts +48 -0
- package/src/smoke.typecheck.ts +22 -0
- package/src/templates/app-shell.ts +220 -0
- package/src/templates/index.ts +18 -0
- package/src/templates/layout-primitives.ts +344 -0
- package/src/templates/product-templates.ts +263 -0
- package/src/templates/reference-templates.ts +99 -0
- package/src/templates/types.ts +14 -0
- package/src/types/node-shims.d.ts +27 -0
- package/tsconfig.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Copyright (c) 2026 Cluster Envision. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and associated documentation files are proprietary and confidential.
|
|
4
|
+
Unauthorized copying, modification, distribution, sublicensing, or use of this
|
|
5
|
+
software, in whole or in part, is strictly prohibited without prior written
|
|
6
|
+
permission from Cluster Envision.
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# CE UI Platform
|
|
2
|
+
|
|
3
|
+
Aggregator package to consume CE UI stack (framework + web components + SCSS) as a reusable library for future apps (ecommerce, LMS, ERP, etc.).
|
|
4
|
+
|
|
5
|
+
## What’s included
|
|
6
|
+
|
|
7
|
+
- `@clusterenvision/ui-framework` (local file dep)
|
|
8
|
+
- `@clusterenvision/ui-webcomponents` (local file dep)
|
|
9
|
+
- `ce-scss-vitepress` (local file dep, CSS tokens)
|
|
10
|
+
- `@ce/templates` (templating utilities)
|
|
11
|
+
- `@ce/email-engine` (email rendering/dispatch)
|
|
12
|
+
- Barrel exports plus helpers to register default web components and point to the SCSS build.
|
|
13
|
+
|
|
14
|
+
## Usage (conceptual)
|
|
15
|
+
|
|
16
|
+
- Install in a workspace-aware package manager (pnpm/yarn/npm) so file: deps resolve.
|
|
17
|
+
- Import framework/runtime APIs from this package instead of touching the underlying packages directly.
|
|
18
|
+
- Call `registerCeUiDefaults()` once at app bootstrap to define the custom elements and load global styles.
|
|
19
|
+
- Import `ceScssPath` into your bundler (e.g., Vite) to include the CSS: `import ceScssPath from '@ce/ui-platform/css';` (see below).
|
|
20
|
+
- For a smaller baseline bundle, import `ceScssMinimalPath` from `@ce/ui-platform/css`.
|
|
21
|
+
|
|
22
|
+
## Exports
|
|
23
|
+
|
|
24
|
+
- Framework re-exports: everything from `@clusterenvision/ui-framework`.
|
|
25
|
+
- Web components: `registerDefaultComponents`, `ensureGlobalStyles`, `defineComponentElement` re-exported.
|
|
26
|
+
- Bootstrap: `registerCeUiDefaults` (and `CeUiPlatformBootstrapOptions`) for one-call setup.
|
|
27
|
+
- CSS path helper: `ceScssPath` and a named export `css` subpath for easy import of the compiled SCSS.
|
|
28
|
+
- Ecosystem: `ceTemplates` and `ceEmailEngine` namespaces.
|
|
29
|
+
- App shell templates: token-only layout primitives, app shell kit, reference templates, and product starters.
|
|
30
|
+
|
|
31
|
+
## Bootstrap (recommended)
|
|
32
|
+
|
|
33
|
+
Call once during app startup (client-side):
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { registerCeUiDefaults } from '@ce/ui-platform';
|
|
37
|
+
|
|
38
|
+
registerCeUiDefaults();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Or configure behavior explicitly:
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { registerCeUiDefaults } from '@ce/ui-platform/bootstrap';
|
|
45
|
+
|
|
46
|
+
registerCeUiDefaults({
|
|
47
|
+
ensureStyles: true,
|
|
48
|
+
registerComponents: true,
|
|
49
|
+
iconBase: '/assets/icons/latest/nucleo/outline',
|
|
50
|
+
iconSpriteUrl: '/assets/icons/latest/nucleo.svg',
|
|
51
|
+
diagnostics: true,
|
|
52
|
+
scssHref: '/assets/ce-ui/ce-ui-scss.css',
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
If you need direct access to the webcomponents initializer (for fine-grained control):
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { initCeUiWebcomponents } from '@ce/ui-platform';
|
|
59
|
+
|
|
60
|
+
initCeUiWebcomponents({
|
|
61
|
+
iconBase: '/assets/icons/latest/nucleo/outline',
|
|
62
|
+
diagnostics: true,
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## App shell templates (token-only)
|
|
68
|
+
|
|
69
|
+
The platform package ships token-only HTML/CSS templates so you can scaffold shells without custom CSS. Each template includes an `html` string and a `css` string (all values are token-backed).
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { cePlatformTemplates } from '@ce/ui-platform';
|
|
73
|
+
|
|
74
|
+
const { primitives, appShell, references, starters } = cePlatformTemplates;
|
|
75
|
+
// primitives.css provides layout primitives
|
|
76
|
+
// appShell.html is a full shell with forms/tables/empty states
|
|
77
|
+
// starters include LMS/CRM/ecom examples
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Notes
|
|
81
|
+
|
|
82
|
+
- This is a thin wrapper; underlying packages live in `projects/libraries/ui/` and are private file deps.
|
|
83
|
+
- No build pipeline is added here; consume via ES modules and let your bundler handle it.
|
|
84
|
+
- Stack roadmap: `docs/ce-ui-framework/STACK_ROADMAP.md`.
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeenvision/ui-platform",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Aggregator for CE UI framework, web components, and SCSS (reusable across apps)",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts",
|
|
9
|
+
"./bootstrap": "./src/bootstrap.ts",
|
|
10
|
+
"./css": "./src/css-path.js",
|
|
11
|
+
"./templates": "./src/templates/index.ts"
|
|
12
|
+
},
|
|
13
|
+
"license": "UNLICENSED",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
16
|
+
"test": "npm run typecheck"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@ce/email-engine": "file:../communication/ce-email-engine",
|
|
20
|
+
"@ce/templates": "file:../templating/ce-templates",
|
|
21
|
+
"@codeenvision/ui-framework": "^1.0.5",
|
|
22
|
+
"@codeenvision/ui-kit": "^1.0.0",
|
|
23
|
+
"@codeenvision/ui-scss": "^1.0.2",
|
|
24
|
+
"@codeenvision/ui-webcomponents": "^1.0.10",
|
|
25
|
+
"ce-scss-vitepress": "file:../ce-ui-scss"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "^6.0.3"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/src/bootstrap.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ensureGlobalStyles,
|
|
3
|
+
initCeUiWebcomponents,
|
|
4
|
+
setCeUiScssHref,
|
|
5
|
+
} from '@codeenvision/ui-webcomponents';
|
|
6
|
+
|
|
7
|
+
export type CeUiPlatformBootstrapOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Ensures shared global styles are present (typically token CSS + global resets).
|
|
10
|
+
* Defaults to true.
|
|
11
|
+
*/
|
|
12
|
+
ensureStyles?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Registers the default CE UI custom elements.
|
|
16
|
+
* Defaults to true.
|
|
17
|
+
*/
|
|
18
|
+
registerComponents?: boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Base path for icon assets (used by <ce-icon> when no sprite URL is configured).
|
|
22
|
+
*/
|
|
23
|
+
iconBase?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional sprite URL for icons (e.g. "/assets/icons/latest/nucleo.svg").
|
|
27
|
+
*/
|
|
28
|
+
iconSpriteUrl?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Enable runtime diagnostics for missing custom element registrations.
|
|
32
|
+
*/
|
|
33
|
+
diagnostics?: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional href to the compiled ce-ui-scss bundle.
|
|
37
|
+
* Overrides the default and any data-ce-scss-href attribute.
|
|
38
|
+
*/
|
|
39
|
+
scssHref?: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Primary bootstrap helper for apps consuming `@ce/ui-platform`.
|
|
44
|
+
*
|
|
45
|
+
* Call once at startup (client-side) to register custom elements and ensure
|
|
46
|
+
* shared global styles are present.
|
|
47
|
+
*/
|
|
48
|
+
export function registerCeUiDefaults(options: CeUiPlatformBootstrapOptions = {}): void {
|
|
49
|
+
const {
|
|
50
|
+
ensureStyles = true,
|
|
51
|
+
registerComponents = true,
|
|
52
|
+
iconBase,
|
|
53
|
+
iconSpriteUrl,
|
|
54
|
+
diagnostics,
|
|
55
|
+
scssHref,
|
|
56
|
+
} = options;
|
|
57
|
+
|
|
58
|
+
if (scssHref) {
|
|
59
|
+
setCeUiScssHref(scssHref);
|
|
60
|
+
}
|
|
61
|
+
if (ensureStyles) {
|
|
62
|
+
ensureGlobalStyles({ diagnostics });
|
|
63
|
+
}
|
|
64
|
+
if (registerComponents) {
|
|
65
|
+
initCeUiWebcomponents({ iconBase, iconSpriteUrl, diagnostics });
|
|
66
|
+
}
|
|
67
|
+
}
|
package/src/css-path.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare module "./css-path.js" {
|
|
2
|
+
/** Public URL to the built ce-ui-scss bundle (used by apps/Storybook to inject global tokens). */
|
|
3
|
+
export const ceScssPath: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare module "@ce/ui-platform/css" {
|
|
7
|
+
/** Public URL to the built ce-ui-scss bundle (used by apps/Storybook to inject global tokens). */
|
|
8
|
+
export const ceScssPath: string;
|
|
9
|
+
}
|
package/src/css-path.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Path helper for bundlers to include the CE SCSS build.
|
|
2
|
+
// Import as: import { ceScssPath, ceScssMinimalPath } from '@ce/ui-platform/css';
|
|
3
|
+
export const ceScssPath = 'ce-scss-vitepress/dist/ce-ui.css';
|
|
4
|
+
export const ceScssMinimalPath = 'ce-scss-vitepress/dist/ce-ui-min.css';
|
|
5
|
+
export default ceScssPath;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Re-export browser-safe CE UI framework APIs so consumers can import from '@ce/ui-platform'
|
|
2
|
+
// (Avoids pulling Node-only types like `node:fs` into browser applications.)
|
|
3
|
+
export * from '@codeenvision/ui-framework/browser';
|
|
4
|
+
export * from '@codeenvision/ui-framework/router';
|
|
5
|
+
|
|
6
|
+
// Primary bootstrap helper
|
|
7
|
+
export { registerCeUiDefaults, type CeUiPlatformBootstrapOptions } from './bootstrap.js';
|
|
8
|
+
|
|
9
|
+
// Web component helpers
|
|
10
|
+
export {
|
|
11
|
+
registerDefaultComponents,
|
|
12
|
+
initCeUiWebcomponents,
|
|
13
|
+
ensureGlobalStyles,
|
|
14
|
+
ensureThemeTokens,
|
|
15
|
+
defineComponentElement,
|
|
16
|
+
type CeUiInitOptions,
|
|
17
|
+
setCeUiScssHref,
|
|
18
|
+
} from '@codeenvision/ui-webcomponents';
|
|
19
|
+
|
|
20
|
+
// App shell templates (token-only)
|
|
21
|
+
export {
|
|
22
|
+
cePlatformTemplates,
|
|
23
|
+
layoutPrimitives,
|
|
24
|
+
appShellTemplate,
|
|
25
|
+
referenceTemplates,
|
|
26
|
+
productTemplates,
|
|
27
|
+
type TemplateBundle,
|
|
28
|
+
type TemplateCollection,
|
|
29
|
+
} from './templates/index.js';
|
|
30
|
+
|
|
31
|
+
// CSS helper: consumers can import the compiled SCSS output path
|
|
32
|
+
export { ceScssPath, ceScssMinimalPath } from './css-path';
|
|
33
|
+
|
|
34
|
+
// Icon helpers from the shared UI kit
|
|
35
|
+
export type { IconName } from '@codeenvision/ui-kit';
|
|
36
|
+
export {
|
|
37
|
+
ICON_NAMES,
|
|
38
|
+
setIconAssetBase,
|
|
39
|
+
getIconAssetBase,
|
|
40
|
+
iconPath,
|
|
41
|
+
listIcons,
|
|
42
|
+
getIcon,
|
|
43
|
+
hasIcon,
|
|
44
|
+
registerIcon,
|
|
45
|
+
ICON_CONTENT_MAP,
|
|
46
|
+
getIconContent,
|
|
47
|
+
renderIconElement,
|
|
48
|
+
} from '@codeenvision/ui-kit';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Compile-time smoke test for the public entrypoints.
|
|
2
|
+
// This file is intentionally not executed at runtime; it is validated via `tsc --noEmit`.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
registerCeUiDefaults,
|
|
6
|
+
type CeUiPlatformBootstrapOptions,
|
|
7
|
+
} from '@ce/ui-platform';
|
|
8
|
+
|
|
9
|
+
import { registerCeUiDefaults as registerFromSubpath } from '@ce/ui-platform/bootstrap';
|
|
10
|
+
import { ceScssPath } from '@ce/ui-platform/css';
|
|
11
|
+
import { cePlatformTemplates } from '@ce/ui-platform/templates';
|
|
12
|
+
|
|
13
|
+
const options: CeUiPlatformBootstrapOptions = {
|
|
14
|
+
ensureStyles: false,
|
|
15
|
+
registerComponents: false,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
registerCeUiDefaults(options);
|
|
19
|
+
registerFromSubpath(options);
|
|
20
|
+
|
|
21
|
+
void ceScssPath;
|
|
22
|
+
void cePlatformTemplates;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import type { TemplateBundle } from "./types.js";
|
|
2
|
+
import { layoutPrimitives } from "./layout-primitives.js";
|
|
3
|
+
|
|
4
|
+
export const appShellTemplate: TemplateBundle = {
|
|
5
|
+
id: "ce.app.shell",
|
|
6
|
+
name: "CE App Shell",
|
|
7
|
+
description: "App shell kit with layout, nav, header, sidebars, empty states, forms, and tables.",
|
|
8
|
+
html: `
|
|
9
|
+
<div class="ce-shell">
|
|
10
|
+
<header class="ce-shell__header">
|
|
11
|
+
<div class="ce-shell__brand">CE Platform</div>
|
|
12
|
+
<nav class="ce-shell__nav">
|
|
13
|
+
<a class="ce-shell__link is-active" href="#">Home</a>
|
|
14
|
+
<a class="ce-shell__link" href="#">Projects</a>
|
|
15
|
+
<a class="ce-shell__link" href="#">Security</a>
|
|
16
|
+
<a class="ce-shell__link" href="#">Settings</a>
|
|
17
|
+
</nav>
|
|
18
|
+
<div class="ce-shell__actions">
|
|
19
|
+
<button class="ce-shell__button is-ghost">Support</button>
|
|
20
|
+
<button class="ce-shell__button is-primary">New project</button>
|
|
21
|
+
</div>
|
|
22
|
+
</header>
|
|
23
|
+
<div class="ce-shell__body">
|
|
24
|
+
<aside class="ce-shell__sidebar">
|
|
25
|
+
<div class="ce-shell__section">
|
|
26
|
+
<div class="ce-shell__section-title">Overview</div>
|
|
27
|
+
<a class="ce-shell__item is-active" href="#">Dashboard</a>
|
|
28
|
+
<a class="ce-shell__item" href="#">Workspaces</a>
|
|
29
|
+
<a class="ce-shell__item" href="#">Reports</a>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="ce-shell__section">
|
|
32
|
+
<div class="ce-shell__section-title">Admin</div>
|
|
33
|
+
<a class="ce-shell__item" href="#">Members</a>
|
|
34
|
+
<a class="ce-shell__item" href="#">Billing</a>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="ce-shell__section">
|
|
37
|
+
<div class="ce-shell__section-title">Status</div>
|
|
38
|
+
<div class="ce-empty">
|
|
39
|
+
<div class="ce-empty__title">No alerts</div>
|
|
40
|
+
<div class="ce-empty__subtitle">All systems operating normally.</div>
|
|
41
|
+
<button class="ce-shell__button is-ghost">View logs</button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</aside>
|
|
45
|
+
<main class="ce-shell__main">
|
|
46
|
+
<div class="ce-page">
|
|
47
|
+
<div class="ce-page__header">
|
|
48
|
+
<div>
|
|
49
|
+
<div class="ce-page__eyebrow">Workspace</div>
|
|
50
|
+
<h1 class="ce-page__title">Operations hub</h1>
|
|
51
|
+
<p class="ce-page__subtitle">Standardized CE UI app shell with token-only styles.</p>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="ce-page__actions">
|
|
54
|
+
<button class="ce-shell__button is-ghost">Filters</button>
|
|
55
|
+
<button class="ce-shell__button is-primary">Create</button>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="ce-grid ce-grid--3">
|
|
59
|
+
<div class="ce-card">
|
|
60
|
+
<div class="ce-card__label">Active environments</div>
|
|
61
|
+
<div class="ce-card__value">12</div>
|
|
62
|
+
<div class="ce-card__meta">2 new this month</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="ce-card">
|
|
65
|
+
<div class="ce-card__label">Open incidents</div>
|
|
66
|
+
<div class="ce-card__value">3</div>
|
|
67
|
+
<div class="ce-card__meta">All assigned</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="ce-card">
|
|
70
|
+
<div class="ce-card__label">Uptime</div>
|
|
71
|
+
<div class="ce-card__value">99.98%</div>
|
|
72
|
+
<div class="ce-card__meta">Last 30 days</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="ce-surface">
|
|
76
|
+
<div class="ce-surface__header">
|
|
77
|
+
<div>
|
|
78
|
+
<div class="ce-surface__title">Requests</div>
|
|
79
|
+
<div class="ce-surface__subtitle">Token-only table and form blocks.</div>
|
|
80
|
+
</div>
|
|
81
|
+
<button class="ce-shell__button is-ghost">Export</button>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="ce-stack">
|
|
84
|
+
<form class="ce-form">
|
|
85
|
+
<label class="ce-form__label">Search</label>
|
|
86
|
+
<input class="ce-form__input" type="search" placeholder="Find request" />
|
|
87
|
+
<div class="ce-form__row">
|
|
88
|
+
<select class="ce-form__input">
|
|
89
|
+
<option>Status: All</option>
|
|
90
|
+
</select>
|
|
91
|
+
<button class="ce-shell__button is-primary">Apply</button>
|
|
92
|
+
</div>
|
|
93
|
+
</form>
|
|
94
|
+
<div class="ce-table">
|
|
95
|
+
<div class="ce-table__head">
|
|
96
|
+
<div class="ce-table__cell">Request</div>
|
|
97
|
+
<div class="ce-table__cell">Owner</div>
|
|
98
|
+
<div class="ce-table__cell">Status</div>
|
|
99
|
+
<div class="ce-table__cell">Updated</div>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="ce-table__row">
|
|
102
|
+
<div class="ce-table__cell">Audit export</div>
|
|
103
|
+
<div class="ce-table__cell">Riley</div>
|
|
104
|
+
<div class="ce-table__cell"><span class="ce-pill is-success">Approved</span></div>
|
|
105
|
+
<div class="ce-table__cell">5m ago</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="ce-table__row">
|
|
108
|
+
<div class="ce-table__cell">Billing update</div>
|
|
109
|
+
<div class="ce-table__cell">Jordan</div>
|
|
110
|
+
<div class="ce-table__cell"><span class="ce-pill is-warning">Review</span></div>
|
|
111
|
+
<div class="ce-table__cell">2h ago</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="ce-table__row">
|
|
114
|
+
<div class="ce-table__cell">New workspace</div>
|
|
115
|
+
<div class="ce-table__cell">Casey</div>
|
|
116
|
+
<div class="ce-table__cell"><span class="ce-pill is-neutral">Open</span></div>
|
|
117
|
+
<div class="ce-table__cell">Yesterday</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</main>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
`.trim(),
|
|
127
|
+
css: `
|
|
128
|
+
${layoutPrimitives.css}
|
|
129
|
+
|
|
130
|
+
.ce-empty {
|
|
131
|
+
padding: var(--ce-spacing-md, 1rem);
|
|
132
|
+
border: 1px dashed var(--ce-shell-border);
|
|
133
|
+
border-radius: var(--ce-shell-radius);
|
|
134
|
+
background: var(--ce-shell-surface);
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
gap: var(--ce-spacing-xs, 0.25rem);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ce-empty__title {
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ce-empty__subtitle {
|
|
145
|
+
color: var(--ce-shell-muted);
|
|
146
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ce-form {
|
|
150
|
+
display: grid;
|
|
151
|
+
gap: var(--ce-spacing-sm, 0.5rem);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ce-form__label {
|
|
155
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
156
|
+
color: var(--ce-shell-muted);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ce-form__input {
|
|
160
|
+
padding: var(--ce-spacing-sm, 0.5rem) var(--ce-spacing-md, 1rem);
|
|
161
|
+
border-radius: var(--ce-shell-radius);
|
|
162
|
+
border: 1px solid var(--ce-shell-border);
|
|
163
|
+
background: var(--ce-shell-surface);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ce-form__row {
|
|
167
|
+
display: flex;
|
|
168
|
+
gap: var(--ce-spacing-sm, 0.5rem);
|
|
169
|
+
flex-wrap: wrap;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ce-table {
|
|
173
|
+
display: grid;
|
|
174
|
+
gap: var(--ce-spacing-xs, 0.25rem);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ce-table__head,
|
|
178
|
+
.ce-table__row {
|
|
179
|
+
display: grid;
|
|
180
|
+
grid-template-columns: 1.5fr 1fr 1fr 1fr;
|
|
181
|
+
gap: var(--ce-spacing-sm, 0.5rem);
|
|
182
|
+
padding: var(--ce-spacing-sm, 0.5rem) 0;
|
|
183
|
+
border-bottom: 1px solid var(--ce-shell-border);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ce-table__head {
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
189
|
+
color: var(--ce-shell-muted);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.ce-table__cell {
|
|
193
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.ce-pill {
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
padding: var(--ce-spacing-xxs, 0.125rem) var(--ce-spacing-sm, 0.5rem);
|
|
200
|
+
border-radius: var(--ce-radius-pill, 9999px);
|
|
201
|
+
font-size: var(--ce-font-size-xs, 0.75rem);
|
|
202
|
+
background: var(--ce-shell-border);
|
|
203
|
+
color: var(--ce-shell-text);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.ce-pill.is-success {
|
|
207
|
+
background: var(--ce-color-success, #16a34a);
|
|
208
|
+
color: #fff;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ce-pill.is-warning {
|
|
212
|
+
background: var(--ce-color-warning, #f59e0b);
|
|
213
|
+
color: #fff;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ce-pill.is-neutral {
|
|
217
|
+
background: var(--ce-shell-border);
|
|
218
|
+
}
|
|
219
|
+
`.trim(),
|
|
220
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type { TemplateBundle, TemplateCollection } from "./types.js";
|
|
2
|
+
export { layoutPrimitives } from "./layout-primitives.js";
|
|
3
|
+
export { appShellTemplate } from "./app-shell.js";
|
|
4
|
+
export { referenceTemplates } from "./reference-templates.js";
|
|
5
|
+
export { productTemplates } from "./product-templates.js";
|
|
6
|
+
|
|
7
|
+
import type { TemplateCollection } from "./types.js";
|
|
8
|
+
import { layoutPrimitives } from "./layout-primitives.js";
|
|
9
|
+
import { appShellTemplate } from "./app-shell.js";
|
|
10
|
+
import { referenceTemplates } from "./reference-templates.js";
|
|
11
|
+
import { productTemplates } from "./product-templates.js";
|
|
12
|
+
|
|
13
|
+
export const cePlatformTemplates: TemplateCollection = {
|
|
14
|
+
primitives: layoutPrimitives,
|
|
15
|
+
appShell: appShellTemplate,
|
|
16
|
+
references: referenceTemplates,
|
|
17
|
+
starters: productTemplates,
|
|
18
|
+
};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import type { TemplateBundle } from "./types.js";
|
|
2
|
+
|
|
3
|
+
export const layoutPrimitives: TemplateBundle = {
|
|
4
|
+
id: "ce.layout.primitives",
|
|
5
|
+
name: "CE Layout Primitives",
|
|
6
|
+
description: "Token-only layout primitives (no web components required).",
|
|
7
|
+
html: `
|
|
8
|
+
<div class="ce-shell">
|
|
9
|
+
<header class="ce-shell__header">
|
|
10
|
+
<div class="ce-shell__brand">Cluster Envision</div>
|
|
11
|
+
<nav class="ce-shell__nav">
|
|
12
|
+
<a class="ce-shell__link is-active" href="#">Overview</a>
|
|
13
|
+
<a class="ce-shell__link" href="#">Projects</a>
|
|
14
|
+
<a class="ce-shell__link" href="#">Security</a>
|
|
15
|
+
<a class="ce-shell__link" href="#">Billing</a>
|
|
16
|
+
</nav>
|
|
17
|
+
<div class="ce-shell__actions">
|
|
18
|
+
<button class="ce-shell__button">New</button>
|
|
19
|
+
<button class="ce-shell__button">Invite</button>
|
|
20
|
+
</div>
|
|
21
|
+
</header>
|
|
22
|
+
<div class="ce-shell__body">
|
|
23
|
+
<aside class="ce-shell__sidebar">
|
|
24
|
+
<div class="ce-shell__section">
|
|
25
|
+
<div class="ce-shell__section-title">Workspace</div>
|
|
26
|
+
<a class="ce-shell__item is-active" href="#">Dashboard</a>
|
|
27
|
+
<a class="ce-shell__item" href="#">Operations</a>
|
|
28
|
+
<a class="ce-shell__item" href="#">Compliance</a>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="ce-shell__section">
|
|
31
|
+
<div class="ce-shell__section-title">Reports</div>
|
|
32
|
+
<a class="ce-shell__item" href="#">Usage</a>
|
|
33
|
+
<a class="ce-shell__item" href="#">Incidents</a>
|
|
34
|
+
</div>
|
|
35
|
+
</aside>
|
|
36
|
+
<main class="ce-shell__main">
|
|
37
|
+
<div class="ce-page">
|
|
38
|
+
<div class="ce-page__header">
|
|
39
|
+
<div>
|
|
40
|
+
<div class="ce-page__eyebrow">Overview</div>
|
|
41
|
+
<h1 class="ce-page__title">Security posture</h1>
|
|
42
|
+
<p class="ce-page__subtitle">Track environment health with token-only primitives.</p>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="ce-page__actions">
|
|
45
|
+
<button class="ce-shell__button is-ghost">Export</button>
|
|
46
|
+
<button class="ce-shell__button is-primary">Create report</button>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="ce-grid ce-grid--3">
|
|
50
|
+
<div class="ce-card">
|
|
51
|
+
<div class="ce-card__label">Active policies</div>
|
|
52
|
+
<div class="ce-card__value">128</div>
|
|
53
|
+
<div class="ce-card__meta">+12 this week</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="ce-card">
|
|
56
|
+
<div class="ce-card__label">Open findings</div>
|
|
57
|
+
<div class="ce-card__value">14</div>
|
|
58
|
+
<div class="ce-card__meta">2 urgent</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="ce-card">
|
|
61
|
+
<div class="ce-card__label">Services</div>
|
|
62
|
+
<div class="ce-card__value">23</div>
|
|
63
|
+
<div class="ce-card__meta">Across 5 regions</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="ce-surface">
|
|
67
|
+
<div class="ce-surface__header">
|
|
68
|
+
<div>
|
|
69
|
+
<div class="ce-surface__title">Recent activity</div>
|
|
70
|
+
<div class="ce-surface__subtitle">Latest changes across the org.</div>
|
|
71
|
+
</div>
|
|
72
|
+
<button class="ce-shell__button is-ghost">View all</button>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="ce-stack">
|
|
75
|
+
<div class="ce-row">
|
|
76
|
+
<div>
|
|
77
|
+
<div class="ce-row__title">Policy updated</div>
|
|
78
|
+
<div class="ce-row__subtitle">SOC2 data retention rule</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ce-row__meta">2m ago</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="ce-row">
|
|
83
|
+
<div>
|
|
84
|
+
<div class="ce-row__title">New alert rule</div>
|
|
85
|
+
<div class="ce-row__subtitle">Cloud storage access audit</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="ce-row__meta">30m ago</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="ce-row">
|
|
90
|
+
<div>
|
|
91
|
+
<div class="ce-row__title">Team member added</div>
|
|
92
|
+
<div class="ce-row__subtitle">Morgan Lee joined Compliance</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="ce-row__meta">Today</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</main>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
`.trim(),
|
|
103
|
+
css: `
|
|
104
|
+
:root {
|
|
105
|
+
--ce-shell-bg: var(--ce-color-background, #f7f7fb);
|
|
106
|
+
--ce-shell-surface: var(--ce-color-surface, #ffffff);
|
|
107
|
+
--ce-shell-border: var(--ce-color-border, #e5e7eb);
|
|
108
|
+
--ce-shell-text: var(--ce-color-text, #1f2933);
|
|
109
|
+
--ce-shell-muted: var(--ce-color-text-muted, #6b7280);
|
|
110
|
+
--ce-shell-accent: var(--ce-color-accent, #1a73e8);
|
|
111
|
+
--ce-shell-radius: var(--ce-radius-md, 8px);
|
|
112
|
+
--ce-shell-gap: var(--ce-spacing-lg, 1.5rem);
|
|
113
|
+
--ce-shell-padding: var(--ce-spacing-lg, 1.5rem);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ce-shell {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
min-height: 100vh;
|
|
120
|
+
background: var(--ce-shell-bg);
|
|
121
|
+
color: var(--ce-shell-text);
|
|
122
|
+
font-family: var(--ce-font-family, system-ui);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ce-shell__header {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: space-between;
|
|
129
|
+
gap: var(--ce-shell-gap);
|
|
130
|
+
padding: var(--ce-shell-padding);
|
|
131
|
+
border-bottom: 1px solid var(--ce-shell-border);
|
|
132
|
+
background: var(--ce-shell-surface);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ce-shell__brand {
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
letter-spacing: 0.02em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ce-shell__nav {
|
|
141
|
+
display: flex;
|
|
142
|
+
gap: var(--ce-spacing-md, 1rem);
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ce-shell__link {
|
|
147
|
+
color: var(--ce-shell-muted);
|
|
148
|
+
text-decoration: none;
|
|
149
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.ce-shell__link.is-active {
|
|
153
|
+
color: var(--ce-shell-text);
|
|
154
|
+
font-weight: 600;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ce-shell__actions {
|
|
158
|
+
display: flex;
|
|
159
|
+
gap: var(--ce-spacing-sm, 0.5rem);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.ce-shell__button {
|
|
163
|
+
border-radius: var(--ce-shell-radius);
|
|
164
|
+
padding: var(--ce-spacing-sm, 0.5rem) var(--ce-spacing-md, 1rem);
|
|
165
|
+
border: 1px solid var(--ce-shell-border);
|
|
166
|
+
background: var(--ce-shell-surface);
|
|
167
|
+
color: var(--ce-shell-text);
|
|
168
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ce-shell__button.is-primary {
|
|
173
|
+
background: var(--ce-shell-accent);
|
|
174
|
+
border-color: var(--ce-shell-accent);
|
|
175
|
+
color: #fff;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.ce-shell__button.is-ghost {
|
|
179
|
+
background: transparent;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.ce-shell__body {
|
|
183
|
+
display: grid;
|
|
184
|
+
grid-template-columns: minmax(200px, 260px) 1fr;
|
|
185
|
+
min-height: 0;
|
|
186
|
+
flex: 1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ce-shell__sidebar {
|
|
190
|
+
padding: var(--ce-shell-padding);
|
|
191
|
+
background: var(--ce-shell-surface);
|
|
192
|
+
border-right: 1px solid var(--ce-shell-border);
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
gap: var(--ce-spacing-lg, 1.5rem);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ce-shell__section-title {
|
|
199
|
+
font-size: var(--ce-font-size-xs, 0.75rem);
|
|
200
|
+
letter-spacing: 0.08em;
|
|
201
|
+
text-transform: uppercase;
|
|
202
|
+
color: var(--ce-shell-muted);
|
|
203
|
+
margin-bottom: var(--ce-spacing-sm, 0.5rem);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.ce-shell__item {
|
|
207
|
+
color: var(--ce-shell-text);
|
|
208
|
+
text-decoration: none;
|
|
209
|
+
padding: var(--ce-spacing-xs, 0.25rem) 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.ce-shell__item.is-active {
|
|
213
|
+
font-weight: 600;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ce-shell__main {
|
|
217
|
+
padding: var(--ce-shell-padding);
|
|
218
|
+
overflow: auto;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.ce-page__header {
|
|
222
|
+
display: flex;
|
|
223
|
+
justify-content: space-between;
|
|
224
|
+
align-items: flex-end;
|
|
225
|
+
gap: var(--ce-spacing-lg, 1.5rem);
|
|
226
|
+
margin-bottom: var(--ce-spacing-lg, 1.5rem);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.ce-page__eyebrow {
|
|
230
|
+
font-size: var(--ce-font-size-xs, 0.75rem);
|
|
231
|
+
text-transform: uppercase;
|
|
232
|
+
letter-spacing: 0.08em;
|
|
233
|
+
color: var(--ce-shell-muted);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.ce-page__title {
|
|
237
|
+
margin: 0;
|
|
238
|
+
font-size: var(--ce-font-size-xl, 1.5rem);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.ce-page__subtitle {
|
|
242
|
+
margin: var(--ce-spacing-xs, 0.25rem) 0 0;
|
|
243
|
+
color: var(--ce-shell-muted);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ce-page__actions {
|
|
247
|
+
display: flex;
|
|
248
|
+
gap: var(--ce-spacing-sm, 0.5rem);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ce-grid {
|
|
252
|
+
display: grid;
|
|
253
|
+
gap: var(--ce-spacing-md, 1rem);
|
|
254
|
+
margin-bottom: var(--ce-spacing-lg, 1.5rem);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ce-grid--3 {
|
|
258
|
+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ce-card {
|
|
262
|
+
padding: var(--ce-spacing-md, 1rem);
|
|
263
|
+
border-radius: var(--ce-shell-radius);
|
|
264
|
+
background: var(--ce-shell-surface);
|
|
265
|
+
border: 1px solid var(--ce-shell-border);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.ce-card__label {
|
|
269
|
+
color: var(--ce-shell-muted);
|
|
270
|
+
font-size: var(--ce-font-size-xs, 0.75rem);
|
|
271
|
+
text-transform: uppercase;
|
|
272
|
+
letter-spacing: 0.06em;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.ce-card__value {
|
|
276
|
+
font-size: var(--ce-font-size-xl, 1.5rem);
|
|
277
|
+
font-weight: 600;
|
|
278
|
+
margin-top: var(--ce-spacing-xs, 0.25rem);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.ce-card__meta {
|
|
282
|
+
color: var(--ce-shell-muted);
|
|
283
|
+
margin-top: var(--ce-spacing-xs, 0.25rem);
|
|
284
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ce-surface {
|
|
288
|
+
background: var(--ce-shell-surface);
|
|
289
|
+
border: 1px solid var(--ce-shell-border);
|
|
290
|
+
border-radius: var(--ce-shell-radius);
|
|
291
|
+
padding: var(--ce-spacing-lg, 1.5rem);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.ce-surface__header {
|
|
295
|
+
display: flex;
|
|
296
|
+
align-items: center;
|
|
297
|
+
justify-content: space-between;
|
|
298
|
+
gap: var(--ce-spacing-md, 1rem);
|
|
299
|
+
margin-bottom: var(--ce-spacing-md, 1rem);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.ce-surface__title {
|
|
303
|
+
font-weight: 600;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ce-surface__subtitle {
|
|
307
|
+
color: var(--ce-shell-muted);
|
|
308
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.ce-stack {
|
|
312
|
+
display: flex;
|
|
313
|
+
flex-direction: column;
|
|
314
|
+
gap: var(--ce-spacing-sm, 0.5rem);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.ce-row {
|
|
318
|
+
display: flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: space-between;
|
|
321
|
+
gap: var(--ce-spacing-md, 1rem);
|
|
322
|
+
padding: var(--ce-spacing-sm, 0.5rem) 0;
|
|
323
|
+
border-bottom: 1px solid var(--ce-shell-border);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ce-row:last-child {
|
|
327
|
+
border-bottom: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.ce-row__title {
|
|
331
|
+
font-weight: 500;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ce-row__subtitle {
|
|
335
|
+
color: var(--ce-shell-muted);
|
|
336
|
+
font-size: var(--ce-font-size-sm, 0.875rem);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.ce-row__meta {
|
|
340
|
+
color: var(--ce-shell-muted);
|
|
341
|
+
font-size: var(--ce-font-size-xs, 0.75rem);
|
|
342
|
+
}
|
|
343
|
+
`.trim(),
|
|
344
|
+
};
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import type { TemplateBundle } from "./types.js";
|
|
2
|
+
import { layoutPrimitives } from "./layout-primitives.js";
|
|
3
|
+
|
|
4
|
+
export const productTemplates: TemplateBundle[] = [
|
|
5
|
+
{
|
|
6
|
+
id: "ce.starter.lms",
|
|
7
|
+
name: "LMS Starter",
|
|
8
|
+
description: "Token-only LMS starter shell with course grid and activity feed.",
|
|
9
|
+
html: `
|
|
10
|
+
<div class="ce-shell">
|
|
11
|
+
<header class="ce-shell__header">
|
|
12
|
+
<div class="ce-shell__brand">CE Learn</div>
|
|
13
|
+
<nav class="ce-shell__nav">
|
|
14
|
+
<a class="ce-shell__link is-active" href="#">Courses</a>
|
|
15
|
+
<a class="ce-shell__link" href="#">Assignments</a>
|
|
16
|
+
<a class="ce-shell__link" href="#">People</a>
|
|
17
|
+
</nav>
|
|
18
|
+
<button class="ce-shell__button is-primary">Create course</button>
|
|
19
|
+
</header>
|
|
20
|
+
<div class="ce-shell__body">
|
|
21
|
+
<aside class="ce-shell__sidebar">
|
|
22
|
+
<div class="ce-shell__section">
|
|
23
|
+
<div class="ce-shell__section-title">Current term</div>
|
|
24
|
+
<a class="ce-shell__item is-active" href="#">Spring 2026</a>
|
|
25
|
+
<a class="ce-shell__item" href="#">Fall 2025</a>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="ce-shell__section">
|
|
28
|
+
<div class="ce-shell__section-title">Quick links</div>
|
|
29
|
+
<a class="ce-shell__item" href="#">Grades</a>
|
|
30
|
+
<a class="ce-shell__item" href="#">Announcements</a>
|
|
31
|
+
</div>
|
|
32
|
+
</aside>
|
|
33
|
+
<main class="ce-shell__main">
|
|
34
|
+
<div class="ce-page__header">
|
|
35
|
+
<div>
|
|
36
|
+
<div class="ce-page__eyebrow">Dashboard</div>
|
|
37
|
+
<h1 class="ce-page__title">Your courses</h1>
|
|
38
|
+
<p class="ce-page__subtitle">Stay on top of progress and upcoming work.</p>
|
|
39
|
+
</div>
|
|
40
|
+
<button class="ce-shell__button is-ghost">Export</button>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="ce-grid ce-grid--3">
|
|
43
|
+
<div class="ce-card">
|
|
44
|
+
<div class="ce-card__label">Data Ethics</div>
|
|
45
|
+
<div class="ce-card__value">12 modules</div>
|
|
46
|
+
<div class="ce-card__meta">4 assignments due</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="ce-card">
|
|
49
|
+
<div class="ce-card__label">Cloud Security</div>
|
|
50
|
+
<div class="ce-card__value">9 modules</div>
|
|
51
|
+
<div class="ce-card__meta">1 assignment due</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="ce-card">
|
|
54
|
+
<div class="ce-card__label">Incident Response</div>
|
|
55
|
+
<div class="ce-card__value">15 modules</div>
|
|
56
|
+
<div class="ce-card__meta">New discussion</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="ce-surface">
|
|
60
|
+
<div class="ce-surface__header">
|
|
61
|
+
<div>
|
|
62
|
+
<div class="ce-surface__title">Upcoming activity</div>
|
|
63
|
+
<div class="ce-surface__subtitle">Assignments and announcements.</div>
|
|
64
|
+
</div>
|
|
65
|
+
<button class="ce-shell__button is-ghost">View all</button>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="ce-stack">
|
|
68
|
+
<div class="ce-row">
|
|
69
|
+
<div>
|
|
70
|
+
<div class="ce-row__title">Quiz: Data handling</div>
|
|
71
|
+
<div class="ce-row__subtitle">Due in 2 days</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="ce-row__meta">Course 1</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="ce-row">
|
|
76
|
+
<div>
|
|
77
|
+
<div class="ce-row__title">Assignment: Policy audit</div>
|
|
78
|
+
<div class="ce-row__subtitle">Due next week</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ce-row__meta">Course 2</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</main>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
`.trim(),
|
|
88
|
+
css: layoutPrimitives.css,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "ce.starter.crm",
|
|
92
|
+
name: "CRM Starter",
|
|
93
|
+
description: "Token-only CRM starter with pipeline highlights and task queue.",
|
|
94
|
+
html: `
|
|
95
|
+
<div class="ce-shell">
|
|
96
|
+
<header class="ce-shell__header">
|
|
97
|
+
<div class="ce-shell__brand">CE CRM</div>
|
|
98
|
+
<nav class="ce-shell__nav">
|
|
99
|
+
<a class="ce-shell__link is-active" href="#">Pipeline</a>
|
|
100
|
+
<a class="ce-shell__link" href="#">Accounts</a>
|
|
101
|
+
<a class="ce-shell__link" href="#">Tasks</a>
|
|
102
|
+
</nav>
|
|
103
|
+
<button class="ce-shell__button is-primary">New deal</button>
|
|
104
|
+
</header>
|
|
105
|
+
<div class="ce-shell__body">
|
|
106
|
+
<aside class="ce-shell__sidebar">
|
|
107
|
+
<div class="ce-shell__section">
|
|
108
|
+
<div class="ce-shell__section-title">Teams</div>
|
|
109
|
+
<a class="ce-shell__item is-active" href="#">Enterprise</a>
|
|
110
|
+
<a class="ce-shell__item" href="#">Mid-market</a>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="ce-shell__section">
|
|
113
|
+
<div class="ce-shell__section-title">Views</div>
|
|
114
|
+
<a class="ce-shell__item" href="#">At risk</a>
|
|
115
|
+
<a class="ce-shell__item" href="#">New leads</a>
|
|
116
|
+
</div>
|
|
117
|
+
</aside>
|
|
118
|
+
<main class="ce-shell__main">
|
|
119
|
+
<div class="ce-page__header">
|
|
120
|
+
<div>
|
|
121
|
+
<div class="ce-page__eyebrow">Pipeline</div>
|
|
122
|
+
<h1 class="ce-page__title">Quarterly deals</h1>
|
|
123
|
+
<p class="ce-page__subtitle">Track momentum and next best actions.</p>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="ce-page__actions">
|
|
126
|
+
<button class="ce-shell__button is-ghost">Segments</button>
|
|
127
|
+
<button class="ce-shell__button is-primary">Assign</button>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="ce-grid ce-grid--3">
|
|
131
|
+
<div class="ce-card">
|
|
132
|
+
<div class="ce-card__label">Qualified</div>
|
|
133
|
+
<div class="ce-card__value">$4.2M</div>
|
|
134
|
+
<div class="ce-card__meta">18 deals</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="ce-card">
|
|
137
|
+
<div class="ce-card__label">Negotiation</div>
|
|
138
|
+
<div class="ce-card__value">$2.8M</div>
|
|
139
|
+
<div class="ce-card__meta">9 deals</div>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="ce-card">
|
|
142
|
+
<div class="ce-card__label">Renewals</div>
|
|
143
|
+
<div class="ce-card__value">$1.6M</div>
|
|
144
|
+
<div class="ce-card__meta">4 at risk</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="ce-surface">
|
|
148
|
+
<div class="ce-surface__header">
|
|
149
|
+
<div>
|
|
150
|
+
<div class="ce-surface__title">Task queue</div>
|
|
151
|
+
<div class="ce-surface__subtitle">Follow-ups requiring action.</div>
|
|
152
|
+
</div>
|
|
153
|
+
<button class="ce-shell__button is-ghost">Open tasks</button>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="ce-stack">
|
|
156
|
+
<div class="ce-row">
|
|
157
|
+
<div>
|
|
158
|
+
<div class="ce-row__title">Call Zephyr Labs</div>
|
|
159
|
+
<div class="ce-row__subtitle">Negotiation stage</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="ce-row__meta">Due today</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="ce-row">
|
|
164
|
+
<div>
|
|
165
|
+
<div class="ce-row__title">Send proposal update</div>
|
|
166
|
+
<div class="ce-row__subtitle">Pipeline: Renewal</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="ce-row__meta">Tomorrow</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</main>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
`.trim(),
|
|
176
|
+
css: layoutPrimitives.css,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "ce.starter.ecom",
|
|
180
|
+
name: "Ecommerce Starter",
|
|
181
|
+
description: "Token-only ecommerce starter with orders and inventory summaries.",
|
|
182
|
+
html: `
|
|
183
|
+
<div class="ce-shell">
|
|
184
|
+
<header class="ce-shell__header">
|
|
185
|
+
<div class="ce-shell__brand">CE Commerce</div>
|
|
186
|
+
<nav class="ce-shell__nav">
|
|
187
|
+
<a class="ce-shell__link is-active" href="#">Orders</a>
|
|
188
|
+
<a class="ce-shell__link" href="#">Catalog</a>
|
|
189
|
+
<a class="ce-shell__link" href="#">Customers</a>
|
|
190
|
+
</nav>
|
|
191
|
+
<button class="ce-shell__button is-primary">Add product</button>
|
|
192
|
+
</header>
|
|
193
|
+
<div class="ce-shell__body">
|
|
194
|
+
<aside class="ce-shell__sidebar">
|
|
195
|
+
<div class="ce-shell__section">
|
|
196
|
+
<div class="ce-shell__section-title">Storefronts</div>
|
|
197
|
+
<a class="ce-shell__item is-active" href="#">Global</a>
|
|
198
|
+
<a class="ce-shell__item" href="#">EU</a>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="ce-shell__section">
|
|
201
|
+
<div class="ce-shell__section-title">Operations</div>
|
|
202
|
+
<a class="ce-shell__item" href="#">Inventory</a>
|
|
203
|
+
<a class="ce-shell__item" href="#">Fulfillment</a>
|
|
204
|
+
</div>
|
|
205
|
+
</aside>
|
|
206
|
+
<main class="ce-shell__main">
|
|
207
|
+
<div class="ce-page__header">
|
|
208
|
+
<div>
|
|
209
|
+
<div class="ce-page__eyebrow">Overview</div>
|
|
210
|
+
<h1 class="ce-page__title">Order pulse</h1>
|
|
211
|
+
<p class="ce-page__subtitle">Track demand and fulfillment daily.</p>
|
|
212
|
+
</div>
|
|
213
|
+
<button class="ce-shell__button is-ghost">Download report</button>
|
|
214
|
+
</div>
|
|
215
|
+
<div class="ce-grid ce-grid--3">
|
|
216
|
+
<div class="ce-card">
|
|
217
|
+
<div class="ce-card__label">Orders today</div>
|
|
218
|
+
<div class="ce-card__value">312</div>
|
|
219
|
+
<div class="ce-card__meta">+8% vs yesterday</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="ce-card">
|
|
222
|
+
<div class="ce-card__label">Fulfillment</div>
|
|
223
|
+
<div class="ce-card__value">96%</div>
|
|
224
|
+
<div class="ce-card__meta">On-time</div>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="ce-card">
|
|
227
|
+
<div class="ce-card__label">Low inventory</div>
|
|
228
|
+
<div class="ce-card__value">7 SKUs</div>
|
|
229
|
+
<div class="ce-card__meta">Needs reorder</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="ce-surface">
|
|
233
|
+
<div class="ce-surface__header">
|
|
234
|
+
<div>
|
|
235
|
+
<div class="ce-surface__title">Recent orders</div>
|
|
236
|
+
<div class="ce-surface__subtitle">Token-only list patterns.</div>
|
|
237
|
+
</div>
|
|
238
|
+
<button class="ce-shell__button is-ghost">View all</button>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="ce-stack">
|
|
241
|
+
<div class="ce-row">
|
|
242
|
+
<div>
|
|
243
|
+
<div class="ce-row__title">Order #1842</div>
|
|
244
|
+
<div class="ce-row__subtitle">Priority shipping</div>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="ce-row__meta">$1,240</div>
|
|
247
|
+
</div>
|
|
248
|
+
<div class="ce-row">
|
|
249
|
+
<div>
|
|
250
|
+
<div class="ce-row__title">Order #1841</div>
|
|
251
|
+
<div class="ce-row__subtitle">Standard</div>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="ce-row__meta">$830</div>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</main>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
`.trim(),
|
|
261
|
+
css: layoutPrimitives.css,
|
|
262
|
+
},
|
|
263
|
+
];
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { TemplateBundle } from "./types.js";
|
|
2
|
+
import { layoutPrimitives } from "./layout-primitives.js";
|
|
3
|
+
|
|
4
|
+
export const referenceTemplates: TemplateBundle[] = [
|
|
5
|
+
{
|
|
6
|
+
id: "ce.reference.empty-states",
|
|
7
|
+
name: "Empty States Reference",
|
|
8
|
+
description: "Token-only empty state patterns with no custom CSS beyond tokens.",
|
|
9
|
+
html: `
|
|
10
|
+
<div class="ce-grid ce-grid--3">
|
|
11
|
+
<div class="ce-surface ce-empty">
|
|
12
|
+
<div class="ce-empty__title">No data yet</div>
|
|
13
|
+
<div class="ce-empty__subtitle">Connect a source to begin collecting telemetry.</div>
|
|
14
|
+
<button class="ce-shell__button is-primary">Connect source</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="ce-surface ce-empty">
|
|
17
|
+
<div class="ce-empty__title">No incidents</div>
|
|
18
|
+
<div class="ce-empty__subtitle">Everything looks healthy across the workspace.</div>
|
|
19
|
+
<button class="ce-shell__button is-ghost">View history</button>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="ce-surface ce-empty">
|
|
22
|
+
<div class="ce-empty__title">No team members</div>
|
|
23
|
+
<div class="ce-empty__subtitle">Invite teammates to collaborate in real time.</div>
|
|
24
|
+
<button class="ce-shell__button is-primary">Invite</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
`.trim(),
|
|
28
|
+
css: `
|
|
29
|
+
${layoutPrimitives.css}
|
|
30
|
+
|
|
31
|
+
.ce-empty {
|
|
32
|
+
display: grid;
|
|
33
|
+
gap: var(--ce-spacing-xs, 0.25rem);
|
|
34
|
+
padding: var(--ce-spacing-lg, 1.5rem);
|
|
35
|
+
text-align: left;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ce-empty__title {
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ce-empty__subtitle {
|
|
43
|
+
color: var(--ce-shell-muted);
|
|
44
|
+
}
|
|
45
|
+
`.trim(),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "ce.reference.form-table",
|
|
49
|
+
name: "Form + Table Reference",
|
|
50
|
+
description: "Token-only table and form shell with no custom CSS beyond tokens.",
|
|
51
|
+
html: `
|
|
52
|
+
<div class="ce-surface">
|
|
53
|
+
<div class="ce-surface__header">
|
|
54
|
+
<div>
|
|
55
|
+
<div class="ce-surface__title">Approvals</div>
|
|
56
|
+
<div class="ce-surface__subtitle">Standard table layout without extra CSS.</div>
|
|
57
|
+
</div>
|
|
58
|
+
<button class="ce-shell__button is-ghost">Download</button>
|
|
59
|
+
</div>
|
|
60
|
+
<form class="ce-form">
|
|
61
|
+
<label class="ce-form__label">Filter</label>
|
|
62
|
+
<input class="ce-form__input" placeholder="Search by name" />
|
|
63
|
+
<div class="ce-form__row">
|
|
64
|
+
<select class="ce-form__input">
|
|
65
|
+
<option>Status</option>
|
|
66
|
+
</select>
|
|
67
|
+
<select class="ce-form__input">
|
|
68
|
+
<option>Owner</option>
|
|
69
|
+
</select>
|
|
70
|
+
<button class="ce-shell__button is-primary">Apply</button>
|
|
71
|
+
</div>
|
|
72
|
+
</form>
|
|
73
|
+
<div class="ce-table">
|
|
74
|
+
<div class="ce-table__head">
|
|
75
|
+
<div class="ce-table__cell">Request</div>
|
|
76
|
+
<div class="ce-table__cell">Owner</div>
|
|
77
|
+
<div class="ce-table__cell">Status</div>
|
|
78
|
+
<div class="ce-table__cell">Due</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ce-table__row">
|
|
81
|
+
<div class="ce-table__cell">Storage review</div>
|
|
82
|
+
<div class="ce-table__cell">Jules</div>
|
|
83
|
+
<div class="ce-table__cell"><span class="ce-pill is-warning">Review</span></div>
|
|
84
|
+
<div class="ce-table__cell">Today</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="ce-table__row">
|
|
87
|
+
<div class="ce-table__cell">SOC2 export</div>
|
|
88
|
+
<div class="ce-table__cell">Harper</div>
|
|
89
|
+
<div class="ce-table__cell"><span class="ce-pill is-success">Approved</span></div>
|
|
90
|
+
<div class="ce-table__cell">Tomorrow</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
`.trim(),
|
|
95
|
+
css: `
|
|
96
|
+
${layoutPrimitives.css}
|
|
97
|
+
`.trim(),
|
|
98
|
+
},
|
|
99
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TemplateBundle = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
html: string;
|
|
6
|
+
css: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type TemplateCollection = {
|
|
10
|
+
primitives: TemplateBundle;
|
|
11
|
+
appShell: TemplateBundle;
|
|
12
|
+
references: TemplateBundle[];
|
|
13
|
+
starters: TemplateBundle[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Minimal shims for Node.js built-in module specifiers used by type declarations
|
|
2
|
+
// coming from framework/webcomponents packages in this monorepo.
|
|
3
|
+
//
|
|
4
|
+
// NOTE: This does not aim to be a full Node typings replacement.
|
|
5
|
+
// Consumers who use Node-specific APIs should install `@types/node` in their app.
|
|
6
|
+
|
|
7
|
+
declare module 'node:fs' {
|
|
8
|
+
const fs: any;
|
|
9
|
+
namespace fs {
|
|
10
|
+
export const promises: any;
|
|
11
|
+
}
|
|
12
|
+
export = fs;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare module 'node:http' {
|
|
16
|
+
const http: any;
|
|
17
|
+
namespace http {
|
|
18
|
+
export type IncomingMessage = any;
|
|
19
|
+
export type ServerResponse = any;
|
|
20
|
+
export type Server = any;
|
|
21
|
+
}
|
|
22
|
+
export = http;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare module 'node:url' {
|
|
26
|
+
export type URL = any;
|
|
27
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"ignoreDeprecations": "6.0",
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"paths": {
|
|
12
|
+
"@ce/ui-platform": [
|
|
13
|
+
"./src/index.ts"
|
|
14
|
+
],
|
|
15
|
+
"@ce/ui-platform/bootstrap": [
|
|
16
|
+
"./src/bootstrap.ts"
|
|
17
|
+
],
|
|
18
|
+
"@ce/ui-platform/css": [
|
|
19
|
+
"./src/css-path.ts"
|
|
20
|
+
],
|
|
21
|
+
"@ce/templates": [
|
|
22
|
+
"../../templating/ce-templates/src/index.ts"
|
|
23
|
+
],
|
|
24
|
+
"@ce/email-engine": [
|
|
25
|
+
"../../communication/ce-email-engine/src/index.ts"
|
|
26
|
+
],
|
|
27
|
+
"@ce/ui-platform/templates": [
|
|
28
|
+
"./src/templates/index.ts"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"include": [
|
|
33
|
+
"src/**/*.ts",
|
|
34
|
+
"src/**/*.d.ts"
|
|
35
|
+
]
|
|
36
|
+
}
|