anentrypoint-design 0.0.348 → 0.0.350

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.348",
3
+ "version": "0.0.350",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
@@ -11,41 +11,9 @@
11
11
  "default": "./dist/247420.js"
12
12
  },
13
13
  "./css": "./dist/247420.css",
14
- "./kits/spoint": {
15
- "import": "./src/kits/spoint/index.js",
16
- "default": "./src/kits/spoint/index.js"
17
- },
18
- "./kits/spoint/*": "./src/kits/spoint/*",
19
- "./kits/slides": {
20
- "import": "./src/kits/slides/index.js",
21
- "default": "./src/kits/slides/index.js"
22
- },
23
- "./kits/slides/deck-stage.js": "./src/kits/slides/deck-stage.js",
24
- "./kits/os": {
25
- "import": "./src/kits/os/index.js",
26
- "default": "./src/kits/os/index.js"
27
- },
28
- "./kits/os/theme.css": "./src/kits/os/theme.css",
29
- "./kits/os/wm.css": "./src/kits/os/wm.css",
30
- "./kits/os/wm.js": "./src/kits/os/wm.js",
31
- "./kits/os/launcher.js": "./src/kits/os/launcher.js",
32
- "./kits/os/launcher.css": "./src/kits/os/launcher.css",
33
- "./kits/os/validate.css": "./src/kits/os/validate.css",
34
- "./kits/os/icons.js": "./src/kits/os/icons.js",
35
- "./kits/os/shell.js": "./src/kits/os/shell.js",
36
- "./kits/os/freddie-dashboard.js": "./src/kits/os/freddie-dashboard.js",
37
- "./kits/os/freddie-dashboard.css": "./src/kits/os/freddie-dashboard.css",
38
- "./kits/os/files-app.js": "./src/kits/os/files-app.js",
39
- "./kits/os/monitor-app.js": "./src/kits/os/monitor-app.js",
40
- "./kits/os/about-app.js": "./src/kits/os/about-app.js",
41
- "./kits/os/terminal-app.js": "./src/kits/os/terminal-app.js",
42
- "./kits/os/browser-app.js": "./src/kits/os/browser-app.js",
43
- "./kits/os/validator-app.js": "./src/kits/os/validator-app.js",
44
- "./kits/os/app-panes.css": "./src/kits/os/app-panes.css",
45
14
  "./colors_and_type.css": "./colors_and_type.css",
46
15
  "./app-shell.css": "./app-shell.css",
47
16
  "./community.css": "./community.css",
48
- "./system.css": "./system.css",
49
17
  "./page-html": {
50
18
  "import": "./src/page-html.js",
51
19
  "default": "./src/page-html.js"
@@ -61,13 +29,45 @@
61
29
  "import": "./src/lint.js",
62
30
  "default": "./src/lint.js"
63
31
  },
64
- "./package.json": "./package.json"
32
+ "./package.json": "./package.json",
33
+ "./kits/os": {
34
+ "import": "./src/kits/os/index.js",
35
+ "default": "./src/kits/os/index.js"
36
+ },
37
+ "./kits/os/about-app.js": "./src/kits/os/about-app.js",
38
+ "./kits/os/app-panes.css": "./src/kits/os/app-panes.css",
39
+ "./kits/os/browser-app.js": "./src/kits/os/browser-app.js",
40
+ "./kits/os/files-app.js": "./src/kits/os/files-app.js",
41
+ "./kits/os/freddie-dashboard.css": "./src/kits/os/freddie-dashboard.css",
42
+ "./kits/os/freddie-dashboard.js": "./src/kits/os/freddie-dashboard.js",
43
+ "./kits/os/icons.js": "./src/kits/os/icons.js",
44
+ "./kits/os/launcher.css": "./src/kits/os/launcher.css",
45
+ "./kits/os/launcher.js": "./src/kits/os/launcher.js",
46
+ "./kits/os/monitor-app.js": "./src/kits/os/monitor-app.js",
47
+ "./kits/os/shell.js": "./src/kits/os/shell.js",
48
+ "./kits/os/terminal-app.js": "./src/kits/os/terminal-app.js",
49
+ "./kits/os/theme.css": "./src/kits/os/theme.css",
50
+ "./kits/os/validate.css": "./src/kits/os/validate.css",
51
+ "./kits/os/wm.css": "./src/kits/os/wm.css",
52
+ "./kits/os/wm.js": "./src/kits/os/wm.js",
53
+ "./kits/slides": {
54
+ "import": "./src/kits/slides/index.js",
55
+ "default": "./src/kits/slides/index.js"
56
+ },
57
+ "./kits/slides/deck-stage.js": "./src/kits/slides/deck-stage.js",
58
+ "./kits/spoint": {
59
+ "import": "./src/kits/spoint/index.js",
60
+ "default": "./src/kits/spoint/index.js"
61
+ },
62
+ "./kits/spoint/*": "./src/kits/spoint/*"
65
63
  },
66
64
  "files": [
67
65
  "dist",
68
66
  "src",
69
67
  "scripts/lint-glyphs.mjs",
70
68
  "scripts/lint-null-children.mjs",
69
+ "scripts/lint-shared.mjs",
70
+ "scripts/lint-css.mjs",
71
71
  "vendor/webjsx",
72
72
  "colors_and_type.css",
73
73
  "app-shell.css",
@@ -77,13 +77,16 @@
77
77
  ],
78
78
  "scripts": {
79
79
  "lint": "node scripts/lint.mjs",
80
+ "lint:css": "node scripts/lint-css.mjs",
80
81
  "lint:tokens": "node scripts/lint-tokens.mjs",
81
82
  "build": "node scripts/build.mjs",
82
83
  "lint:null-children": "node scripts/lint-null-children.mjs",
83
84
  "lint:classes": "node scripts/lint-classes.mjs",
84
85
  "lint:ui-kits": "node scripts/generate-ui-kit-scaffolds.mjs --check",
85
86
  "tokens": "node scripts/generate-tokens-json.mjs",
87
+ "tokens:css": "node scripts/generate-tokens-css.mjs",
86
88
  "tokens:doc": "node scripts/generate-tokens-json.mjs && node scripts/generate-theme-tokens-doc.mjs",
89
+ "sitemap": "node scripts/generate-sitemap.mjs",
87
90
  "docs:components": "node scripts/generate-component-docs.mjs",
88
91
  "lint:component-docs": "node scripts/generate-component-docs.mjs --check",
89
92
  "generate:ui-kits": "node scripts/generate-ui-kit-scaffolds.mjs",
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ // CSS lint orchestrator: imports every rule module's exported check function
3
+ // and runs them all in one pass, aggregating pass/fail into one consistent
4
+ // report. Each lint-*.mjs (lint-tokens, lint-glyphs, lint-inline-styles,
5
+ // lint-null-children, lint-classes, lint-duplicate-selectors,
6
+ // lint-swallow-comments) keeps its own rule-checking LOGIC as a plain
7
+ // exported function — this file owns only the shared "run every rule, print
8
+ // one report" driver, and (via lint-shared.mjs) the shared directory-walk
9
+ // helper the file-scanning rules use. scripts/lint.mjs is now a thin wrapper
10
+ // around runLintCss() below.
11
+ //
12
+ // Run: `node scripts/lint-css.mjs` (also wired as `npm run lint`, via lint.mjs).
13
+ import { lintTokensOrThrow, lintRadiusOrThrow, lintSpacingOrThrow } from './lint-tokens.mjs';
14
+ import { lintGlyphsOrThrow } from './lint-glyphs.mjs';
15
+ import { lintNullChildrenOrThrow } from './lint-null-children.mjs';
16
+ import { lintClassesOrThrow } from './lint-classes.mjs';
17
+ import { lintInlineStylesOrThrow } from './lint-inline-styles.mjs';
18
+ import { lintDuplicateSelectorsOrThrow } from './lint-duplicate-selectors.mjs';
19
+ import { lintSwallowCommentsOrThrow } from './lint-swallow-comments.mjs';
20
+
21
+ // Each entry: a human label for the report, and the check function to run.
22
+ // lintSpacingOrThrow is report-only (never throws — see lint-tokens.mjs), so
23
+ // it is run but never counted as a failure; its own console.warn/log already
24
+ // carries the detail. Every other check throws on violation.
25
+ const CHECKS = [
26
+ ['tokens', lintTokensOrThrow],
27
+ ['radius', lintRadiusOrThrow],
28
+ ['glyphs', lintGlyphsOrThrow],
29
+ ['null-children', lintNullChildrenOrThrow],
30
+ ['classes', lintClassesOrThrow],
31
+ ['inline-styles', lintInlineStylesOrThrow],
32
+ ['duplicate-selectors', lintDuplicateSelectorsOrThrow],
33
+ ['swallow-comments', lintSwallowCommentsOrThrow],
34
+ ];
35
+
36
+ // Runs every rule module's check, prints one aggregated report, and returns
37
+ // { results, failed, passed } so a caller (lint.mjs, or a future test
38
+ // runner) can inspect the outcome instead of relying on process.exitCode.
39
+ export function runLintCss() {
40
+ const results = [];
41
+ for (const [name, fn] of CHECKS) {
42
+ try {
43
+ fn();
44
+ results.push({ name, ok: true });
45
+ } catch (e) {
46
+ console.error(e.message);
47
+ results.push({ name, ok: false, error: e.message });
48
+ }
49
+ }
50
+
51
+ // Spacing is report-only (logs its own [lint-spacing] REPORT/OK line
52
+ // above, via console.warn/console.log inside lintSpacingOrThrow) — never
53
+ // throws, so it is not part of the pass/fail tally, matching build.mjs's
54
+ // existing non-fatal treatment of it.
55
+ lintSpacingOrThrow();
56
+
57
+ const failed = results.filter((r) => !r.ok);
58
+ const passed = results.filter((r) => r.ok);
59
+
60
+ console.log('');
61
+ console.log('[lint] summary: ' + passed.length + '/' + results.length + ' checks passed'
62
+ + (failed.length ? ' — FAILED: ' + failed.map((r) => r.name).join(', ') : ''));
63
+
64
+ if (failed.length) {
65
+ process.exitCode = 1;
66
+ }
67
+ return { results, failed, passed };
68
+ }
69
+
70
+ // CLI entry: `node scripts/lint-css.mjs`.
71
+ if (process.argv[1]?.endsWith('lint-css.mjs')) {
72
+ runLintCss();
73
+ }
@@ -10,6 +10,7 @@
10
10
  import fs from 'node:fs';
11
11
  import path from 'node:path';
12
12
  import { fileURLToPath } from 'node:url';
13
+ import { walkManyDirs } from './lint-shared.mjs';
13
14
 
14
15
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
15
16
  const root = path.resolve(__dirname, '..');
@@ -53,23 +54,10 @@ function isAllowed(rel, line) {
53
54
  return list.some((s) => line.includes(s));
54
55
  }
55
56
 
56
- function walk(dir, acc) {
57
- let entries;
58
- try { entries = fs.readdirSync(dir, { withFileTypes: true }); }
59
- catch { return acc; }
60
- for (const e of entries) {
61
- const full = path.join(dir, e.name);
62
- if (e.isDirectory()) walk(full, acc);
63
- else if (SCAN_EXT.has(path.extname(e.name))) acc.push(full);
64
- }
65
- return acc;
66
- }
67
-
68
57
  // Returns the array of violation strings (empty == clean). Pure; no exit/log.
69
58
  export function findGlyphViolations() {
70
59
  const violations = [];
71
- const files = [];
72
- for (const d of SCAN_DIRS) walk(path.join(root, d), files);
60
+ const files = walkManyDirs(SCAN_DIRS.map((d) => path.join(root, d)), SCAN_EXT);
73
61
  for (const f of SCAN_ROOT_FILES) { const p = path.join(root, f); if (fs.existsSync(p)) files.push(p); }
74
62
  for (const file of files) {
75
63
  const rel = path.relative(root, file).split(path.sep).join('/');
@@ -18,25 +18,17 @@
18
18
  import fs from 'node:fs';
19
19
  import path from 'node:path';
20
20
  import { fileURLToPath } from 'node:url';
21
+ import { walkFiles } from './lint-shared.mjs';
21
22
 
22
23
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
23
24
  const root = path.resolve(__dirname, '..');
24
25
  const SCAN_DIRS = ['src'];
25
26
  const SCAN_EXT = new Set(['.js', '.mjs']);
27
+ const SKIP_DIRS = new Set(['node_modules', 'vendor']);
26
28
 
27
29
  // Per-file allowlist of line numbers or substrings audited as safe.
28
30
  const ALLOW = {};
29
31
 
30
- function* walk(dir) {
31
- for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
32
- const p = path.join(dir, e.name);
33
- if (e.isDirectory()) {
34
- if (e.name === 'node_modules' || e.name === 'vendor') continue;
35
- yield* walk(p);
36
- } else if (SCAN_EXT.has(path.extname(e.name))) yield p;
37
- }
38
- }
39
-
40
32
  // Blanks out `//` line-comment content (replacing with spaces, keeping
41
33
  // newlines and length so reported line numbers stay accurate) before the
42
34
  // bracket-matching pass below. Without this, an apostrophe inside ANY
@@ -108,7 +100,7 @@ export function lintNullChildrenOrThrow() {
108
100
  for (const dir of SCAN_DIRS) {
109
101
  const abs = path.join(root, dir);
110
102
  if (!fs.existsSync(abs)) continue;
111
- for (const file of walk(abs)) {
103
+ for (const file of walkFiles(abs, SCAN_EXT, { skipDirs: SKIP_DIRS })) {
112
104
  const rel = path.relative(root, file);
113
105
  const src = fs.readFileSync(file, 'utf8');
114
106
  const allow = ALLOW[rel] || [];
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ // Shared file-walking helper for the lint-*.mjs rule modules. Three of the
3
+ // six rules (lint-glyphs, lint-inline-styles, lint-null-children) recursively
4
+ // scan a directory tree for files with a given extension set; this was
5
+ // duplicated near-verbatim in each. Extracted here so the rule modules keep
6
+ // only their actual check LOGIC (the part that varies) and share the
7
+ // directory-walk mechanics (the part that doesn't).
8
+ //
9
+ // The three original walkers differed only in which directories they skip
10
+ // (glyphs/inline-styles skip nothing extra; null-children skips
11
+ // node_modules/vendor) — both are supported via the optional `skipDirs` set.
12
+ import fs from 'node:fs';
13
+ import path from 'node:path';
14
+
15
+ // Recursively collects absolute file paths under `dir` whose extension is in
16
+ // `extSet`, skipping any directory whose basename is in `skipDirs`.
17
+ // Non-existent `dir` is silently treated as empty (matches every original
18
+ // walker's try/catch-and-return-acc behavior).
19
+ export function walkFiles(dir, extSet, { skipDirs } = {}) {
20
+ const acc = [];
21
+ walkInto(dir, extSet, skipDirs, acc);
22
+ return acc;
23
+ }
24
+
25
+ function walkInto(dir, extSet, skipDirs, acc) {
26
+ let entries;
27
+ try { entries = fs.readdirSync(dir, { withFileTypes: true }); }
28
+ catch { return; }
29
+ for (const e of entries) {
30
+ const full = path.join(dir, e.name);
31
+ if (e.isDirectory()) {
32
+ if (skipDirs && skipDirs.has(e.name)) continue;
33
+ walkInto(full, extSet, skipDirs, acc);
34
+ } else if (extSet.has(path.extname(e.name))) {
35
+ acc.push(full);
36
+ }
37
+ }
38
+ }
39
+
40
+ // Collects files across several root-relative dirs in one call (the common
41
+ // SCAN_DIRS.map(walk) pattern each rule module repeated).
42
+ export function walkManyDirs(baseDirs, extSet, opts) {
43
+ const acc = [];
44
+ for (const dir of baseDirs) acc.push(...walkFiles(dir, extSet, opts));
45
+ return acc;
46
+ }
@@ -473,7 +473,7 @@ export function AgentChat(props = {}) {
473
473
  : null;
474
474
 
475
475
  const threadBody = h('div', { class: 'agentchat-thread-wrap' },
476
- h('div', { class: 'agentchat-thread', ref: threadRef(messages.length), role: 'log', 'aria-label': 'conversation' },
476
+ h('div', { class: 'agentchat-thread', ref: threadRef(messages.length), role: 'log', 'aria-label': 'conversation', 'aria-live': 'polite', 'aria-relevant': 'additions' },
477
477
  emptyState,
478
478
  earlierRow,
479
479
  ...rows.filter(Boolean),
@@ -530,7 +530,7 @@ export function Chat({ title = 'chat', sub, messages = [], composer, header, sug
530
530
  ? h('span', { class: 'sub', 'aria-live': 'polite' }, msgCount + (msgCount === 1 ? ' message' : ' messages'))
531
531
  : null
532
532
  ),
533
- h('div', { class: 'chat-thread', ref: threadRef, role: 'log', 'aria-label': 'chat messages' },
533
+ h('div', { class: 'chat-thread', ref: threadRef, role: 'log', 'aria-label': 'chat messages', 'aria-live': 'polite', 'aria-relevant': 'additions' },
534
534
  messages.length === 0
535
535
  ? h('div', { key: '_empty', class: 'chat-empty', role: 'status' },
536
536
  h('p', { class: 'chat-empty-title' }, t('chat.startConversation', 'start a conversation')),
@@ -578,7 +578,7 @@ export function AICat({ name = 'aicat', messages = [], thinking, composer, statu
578
578
  ? h('span', { class: 'sub', 'aria-live': 'polite' }, messages.length + (messages.length === 1 ? ' turn' : ' turns'))
579
579
  : null
580
580
  ),
581
- h('div', { class: 'chat-thread', ref: threadRef, role: 'log', 'aria-label': 'conversation turns' },
581
+ h('div', { class: 'chat-thread', ref: threadRef, role: 'log', 'aria-label': 'conversation turns', 'aria-live': 'polite', 'aria-relevant': 'additions' },
582
582
  ...all.map((m, i) => ChatMessage({ ...m, key: m.key != null ? m.key : i }))
583
583
  ),
584
584
  composer || null
@@ -117,72 +117,6 @@
117
117
  .browser-app-loading .browser-app-bar { box-shadow: inset 0 -2px 0 var(--os-accent); }
118
118
  .browser-app[data-error] .browser-app-status { color: var(--os-danger, #c0392b); }
119
119
 
120
- /* --- validator-app --- */
121
- .validator-app {
122
- display: flex;
123
- flex-direction: column;
124
- height: 100%;
125
- background: var(--os-bg-1);
126
- color: var(--os-fg);
127
- font-family: var(--os-font);
128
- }
129
- .validator-app-head {
130
- display: flex;
131
- align-items: center;
132
- gap: var(--space-2);
133
- padding: var(--space-1) var(--space-2);
134
- background: var(--os-bg-2);
135
- flex: 0 0 auto;
136
- }
137
- .validator-app-banner {
138
- flex: 0 0 auto;
139
- padding: 2px var(--space-2);
140
- border-radius: 999px;
141
- font: 11px var(--os-mono);
142
- text-transform: lowercase;
143
- background: var(--os-bg-3);
144
- color: var(--os-fg-2);
145
- }
146
- .validator-app-banner[data-state="pending"] { background: var(--os-amber); color: var(--os-bg-0); }
147
- .validator-app-banner[data-state="pass"] { background: var(--os-accent); color: var(--os-bg-0); }
148
- .validator-app-banner[data-state="fail"] { background: var(--os-red); color: var(--os-bg-0); }
149
- .validator-app-counts {
150
- flex: 0 0 auto;
151
- font: 11px var(--os-mono);
152
- color: var(--os-fg-2);
153
- }
154
- .validator-app-rerun {
155
- margin-left: auto;
156
- flex: 0 0 auto;
157
- height: var(--space-4);
158
- padding: 0 var(--space-2);
159
- background: var(--os-bg-3);
160
- color: var(--os-fg);
161
- border: none;
162
- border-radius: var(--os-radius-sm);
163
- font: 11px var(--os-mono);
164
- text-transform: lowercase;
165
- cursor: pointer;
166
- outline: none;
167
- }
168
- .validator-app-rerun:hover { background: var(--os-accent-soft); }
169
- .validator-app-slot {
170
- flex: 1 1 auto;
171
- min-width: 0;
172
- min-height: 0;
173
- overflow: hidden;
174
- display: flex;
175
- position: relative;
176
- background: var(--os-bg-0);
177
- }
178
- .validator-app-slot > * { flex: 1 1 auto; min-width: 0; min-height: 0; }
179
- .validator-app-frame {
180
- width: 100%;
181
- height: 100%;
182
- border: none;
183
- background: var(--os-bg-0);
184
- }
185
-
186
120
  /* Touch tap-target floor for the browser pane toolbar. The back/forward/reload
187
121
  * buttons and the URL field are 28px by default (no @media anywhere), below the
188
122
  * 44px touch minimum on tablets and phones. Lift them on coarse pointers and
@@ -11,7 +11,6 @@ export { renderBrowserPane } from './browser-app.js';
11
11
  export { renderFilesApp } from './files-app.js';
12
12
  export { renderMonitorApp } from './monitor-app.js';
13
13
  export { renderTerminal } from './terminal-app.js';
14
- export { renderValidator } from './validator-app.js';
15
14
  export { createFreddieDashboard } from './freddie-dashboard.js';
16
15
 
17
16
  export const themeUrl = new URL('./theme.css', import.meta.url).href;
@@ -1,55 +0,0 @@
1
- // Validator-app paint surface — status banner + counts + iframe slot. Consumer mounts iframe.
2
- // renderValidator({src, results, callbacks: {onRerun}}) -> {node, slot, setResults, dispose}.
3
- // results shape: {allGreen, passed, total, ms} — banner updates colors + counts.
4
-
5
- export function renderValidator(opts = {}) {
6
- const { src = '', results = null, callbacks = {} } = opts;
7
- const node = document.createElement('div');
8
- node.className = 'app-pane validator-app';
9
- node.dataset.component = 'validator-app';
10
-
11
- const head = document.createElement('div');
12
- head.className = 'validator-app-head';
13
- const banner = document.createElement('span');
14
- banner.className = 'validator-app-banner';
15
- banner.dataset.state = 'pending';
16
- banner.textContent = 'pending';
17
- const counts = document.createElement('span');
18
- counts.className = 'validator-app-counts';
19
- counts.textContent = '0 / 0';
20
- const rerun = document.createElement('button');
21
- rerun.type = 'button';
22
- rerun.className = 'validator-app-rerun';
23
- rerun.textContent = 'rerun';
24
- rerun.addEventListener('click', () => callbacks.onRerun && callbacks.onRerun());
25
- head.append(banner, counts, rerun);
26
-
27
- const slot = document.createElement('div');
28
- slot.className = 'validator-app-slot';
29
- slot.dataset.role = 'validator-mount';
30
-
31
- if (src) {
32
- const f = document.createElement('iframe');
33
- f.className = 'validator-app-frame';
34
- f.src = src;
35
- slot.appendChild(f);
36
- }
37
-
38
- node.append(head, slot);
39
-
40
- function setResults(r) {
41
- if (!r) { banner.dataset.state = 'pending'; banner.textContent = 'pending'; counts.textContent = '0 / 0'; return; }
42
- const state = r.allGreen ? 'pass' : 'fail';
43
- banner.dataset.state = state;
44
- banner.textContent = state;
45
- counts.textContent = (r.passed ?? 0) + ' / ' + (r.total ?? 0) + (r.ms != null ? ' · ' + r.ms + 'ms' : '');
46
- }
47
- if (results) setResults(results);
48
-
49
- return {
50
- node,
51
- get slot() { return slot; },
52
- setResults,
53
- dispose() {},
54
- };
55
- }