anentrypoint-design 0.0.475 → 0.0.477
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/colors_and_type.css +2 -2
- package/dist/247420.css +9 -7
- package/dist/247420.js +33 -26
- package/package.json +1 -1
- package/scripts/lint-glyphs.mjs +1 -1
- package/src/components/chat-message-parts/prose-nodes.js +3 -0
- package/src/components/community/views.js +1 -1
- package/src/components/freddie/pages-missing.js +1 -1
- package/src/css/app-shell/responsive.css +2 -4
- package/src/css/app-shell/states-interactions.css +5 -1
- package/src/kits/os/freddie/pages-tools.js +20 -12
- package/src/page-html/client-script.js +8 -1
- package/src/page-html.js +2 -11
- package/src/theme.js +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.477",
|
|
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",
|
package/scripts/lint-glyphs.mjs
CHANGED
|
@@ -32,7 +32,7 @@ const SCAN_EXT = new Set(['.js', '.mjs', '.css', '.html']);
|
|
|
32
32
|
const SCAN_ROOT_FILES = [
|
|
33
33
|
'app-shell.css', 'chat.css', 'colors_and_type.css', 'community.css',
|
|
34
34
|
'community-app.css', 'editor-primitives.css', 'app-surfaces.css',
|
|
35
|
-
'marketing.css',
|
|
35
|
+
'marketing.css', 'gm-prose.css',
|
|
36
36
|
];
|
|
37
37
|
|
|
38
38
|
// Files that are DELIBERATE glyph showcases or documentation of the unicode
|
|
@@ -86,6 +86,9 @@ export function MdNode(p) {
|
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
swap();
|
|
89
|
+
}).catch((e) => {
|
|
90
|
+
console.error('renderMarkdownCached failed:', e);
|
|
91
|
+
if (el.dataset.mdSrc === srcKey) el.textContent = p.text || '';
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
// Streaming turns parse immediately (latency-critical: the user is
|
|
@@ -124,7 +124,7 @@ export function PageView({ title = '', html = '', isAdmin = false, onEdit } = {}
|
|
|
124
124
|
ref: (el) => {
|
|
125
125
|
if (!el) return;
|
|
126
126
|
if (!html) { el.innerHTML = '<p class="cm-page-empty">This page is empty.</p>'; return; }
|
|
127
|
-
sanitizeHtml(html).then((clean) => { el.innerHTML = clean; });
|
|
127
|
+
sanitizeHtml(html).then((clean) => { el.innerHTML = clean; }).catch((e) => { console.error('sanitizeHtml failed:', e); el.innerHTML = '<p class="cm-page-empty">This page could not be rendered.</p>'; });
|
|
128
128
|
}
|
|
129
129
|
})
|
|
130
130
|
);
|
|
@@ -90,7 +90,7 @@ export const themePage = makePage((ctx) => {
|
|
|
90
90
|
return [
|
|
91
91
|
PageHeader({ title: 'theme', lede: 'theme preference' }),
|
|
92
92
|
section('current', Table({ headers: ['setting', 'value'], rows: [
|
|
93
|
-
['theme', (typeof window !== 'undefined' && document.
|
|
93
|
+
['theme', (typeof window !== 'undefined' && document.body.getAttribute('data-theme')) || 'github-dark'],
|
|
94
94
|
['density', (typeof window !== 'undefined' && document.documentElement.getAttribute('data-density')) || 'compact'],
|
|
95
95
|
['accent', (typeof window !== 'undefined' && document.documentElement.getAttribute('data-accent')) || 'default'],
|
|
96
96
|
] })),
|
|
@@ -77,8 +77,7 @@
|
|
|
77
77
|
.app .row.ds-changelog-row { grid-template-columns: minmax(70px, 10ch) minmax(0, 1fr) !important; }
|
|
78
78
|
.ds-changelog-row .title { grid-column: 1 / -1; }
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
.btn, .btn-primary, .btn-ghost {
|
|
80
|
+
.btn:not(.btn-sm):not(.btn-lg), .btn-primary:not(.btn-sm):not(.btn-lg), .btn-ghost:not(.btn-sm):not(.btn-lg) {
|
|
82
81
|
/* 11px vertical is optical, not scale drift: --space-2-75 (12) would tip
|
|
83
82
|
the intrinsic box past the 44px min-height floor below and make the
|
|
84
83
|
floor dead, changing the mobile button rhythm. */
|
|
@@ -245,8 +244,7 @@
|
|
|
245
244
|
gap: var(--space-3);
|
|
246
245
|
}
|
|
247
246
|
|
|
248
|
-
|
|
249
|
-
.btn, .btn-primary, .btn-ghost {
|
|
247
|
+
.btn:not(.btn-sm):not(.btn-lg), .btn-primary:not(.btn-sm):not(.btn-lg), .btn-ghost:not(.btn-sm):not(.btn-lg) {
|
|
250
248
|
/* 18px inline has no tier (--space-3 is 16, --space-3-5 is 20); it is the
|
|
251
249
|
tablet CTA width tuned against the 12px vertical, so snapping changes
|
|
252
250
|
the button aspect on the most visible control in the kit. */
|
|
@@ -398,7 +398,11 @@ hr.rule, hr.rule-double, hr.rule-dotted {
|
|
|
398
398
|
width: 100%; height: 0; border: 0;
|
|
399
399
|
}
|
|
400
400
|
hr.rule { border-top: 1px solid var(--rule); }
|
|
401
|
-
hr.rule-double {
|
|
401
|
+
hr.rule-double {
|
|
402
|
+
height: 3px;
|
|
403
|
+
border-top: 1px solid var(--rule-strong);
|
|
404
|
+
border-bottom: 1px solid var(--rule-strong);
|
|
405
|
+
}
|
|
402
406
|
/* 1px was indistinguishable from .rule -- border-style:dotted needs enough
|
|
403
407
|
width to actually draw a gap between dots; below ~2px (esp. at DPRs where
|
|
404
408
|
1px resolves to a sub-pixel value like 0.8px) Chrome collapses it to a
|
|
@@ -104,19 +104,27 @@ export function makeToolsPages(ctx) {
|
|
|
104
104
|
async env(h0) {
|
|
105
105
|
const list = (typeof h0.pi.env?.list === 'function') ? h0.pi.env.list() : [];
|
|
106
106
|
const setCount = list.filter(k => k.set).length;
|
|
107
|
-
const
|
|
108
|
-
'
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
const makeEditEnvVar = (k) => () => {
|
|
108
|
+
const v = prompt('set ' + k.key + ' (empty to unset):');
|
|
109
|
+
if (v == null) return;
|
|
110
|
+
if (typeof h0.pi.env.set === 'function') { h0.pi.env.set(k.key, v); rerender(); }
|
|
111
|
+
};
|
|
112
|
+
const chipNodes = list.map(k => {
|
|
113
|
+
const editEnvVar = makeEditEnvVar(k);
|
|
114
|
+
return h(
|
|
115
|
+
'span',
|
|
116
|
+
{
|
|
117
|
+
key: k.key,
|
|
118
|
+
class: 'fd-env-chip',
|
|
119
|
+
role: 'button',
|
|
120
|
+
tabindex: '0',
|
|
121
|
+
'aria-label': 'edit environment variable ' + k.key,
|
|
122
|
+
onclick: editEnvVar,
|
|
123
|
+
onkeydown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); editEnvVar(); } },
|
|
116
124
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
)
|
|
125
|
+
Chip({ tone: k.set ? 'ok' : 'miss', children: k.key + (k.set ? ' [x]' : ' [ ]') })
|
|
126
|
+
);
|
|
127
|
+
});
|
|
120
128
|
return [
|
|
121
129
|
Kpi({ items: [[setCount, 'set'], [list.length - setCount, 'missing'], [list.length, 'total known']] }),
|
|
122
130
|
Panel({
|
|
@@ -9,7 +9,14 @@
|
|
|
9
9
|
// this file. `clientScriptExtra` is appended raw after the mount() call.
|
|
10
10
|
|
|
11
11
|
export const CLIENT_SCRIPT = `import { mount, components as C, h } from 'anentrypoint-design';
|
|
12
|
-
|
|
12
|
+
let data;
|
|
13
|
+
try {
|
|
14
|
+
data = JSON.parse(document.getElementById('__site__').textContent);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.error('[page-html] failed to parse #__site__ bootstrap data:', e);
|
|
17
|
+
document.getElementById('app').textContent = 'This page failed to load correctly. Please refresh, or contact support if the problem persists.';
|
|
18
|
+
throw e;
|
|
19
|
+
}
|
|
13
20
|
|
|
14
21
|
function heroNode(hero) {
|
|
15
22
|
if (!hero) return null;
|
package/src/page-html.js
CHANGED
|
@@ -87,17 +87,8 @@ export function renderPageHtml({
|
|
|
87
87
|
const seoTags = seo ? renderSeoTags({ title, siteName, seo }) : '';
|
|
88
88
|
const faviconTags = renderFaviconTags({ faviconHref, faviconGlyph });
|
|
89
89
|
|
|
90
|
-
// Theme attribute co-location is CORRECT here: dist/247420.css keys every
|
|
91
|
-
// theme block off the COMPOUND selector `.ds-247420[data-theme="X"]`
|
|
92
|
-
// (verified in dist/247420.css ~L229). That selector requires BOTH the class
|
|
93
|
-
// and the data-theme on the SAME node, so `<html class="ds-247420"
|
|
94
|
-
// data-theme=...>` is what the CSS expects for SSR. The AGENTS.md
|
|
95
|
-
// "descendant-selector" warning is about the dashboard's RUNTIME controller,
|
|
96
|
-
// which splits them (.ds-247420 on <html>, data-theme on <body>) and relies
|
|
97
|
-
// on inheritance — a different mechanism. Do NOT move data-theme to <body>
|
|
98
|
-
// here or the theme blocks stop matching.
|
|
99
90
|
return `<!doctype html>
|
|
100
|
-
<html lang="en" class="ds-247420"
|
|
91
|
+
<html lang="en" class="ds-247420">
|
|
101
92
|
<head>
|
|
102
93
|
<meta charset="utf-8">
|
|
103
94
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -114,7 +105,7 @@ ${PAGE_INLINE_STYLES}
|
|
|
114
105
|
<script id="__site__" type="application/json">${JSON.stringify(pageData).replace(/</g, '\\u003c')}</script>
|
|
115
106
|
${headExtra}
|
|
116
107
|
</head>
|
|
117
|
-
<body>
|
|
108
|
+
<body data-theme="${theme}">
|
|
118
109
|
<div id="app"></div>
|
|
119
110
|
<script type="module">
|
|
120
111
|
${CLIENT_SCRIPT}${clientScriptExtra}
|
package/src/theme.js
CHANGED
|
@@ -43,7 +43,7 @@ function writeStored(mode) {
|
|
|
43
43
|
|
|
44
44
|
function writeAttr(mode) {
|
|
45
45
|
if (!isBrowser()) return;
|
|
46
|
-
document.
|
|
46
|
+
document.body.setAttribute('data-theme', mode);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
function ensureMq() {
|
|
@@ -166,12 +166,10 @@ export function initDirection() {
|
|
|
166
166
|
return getDirection();
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
// Auto-init on browser import. Picks stored value, else falls back to
|
|
170
|
-
// whatever data-theme is already on <html> (set by page-html.js), else 'auto'.
|
|
171
169
|
export function initTheme() {
|
|
172
170
|
if (!isBrowser()) return 'auto';
|
|
173
171
|
const stored = readStored();
|
|
174
|
-
const fromAttr = document.
|
|
172
|
+
const fromAttr = document.body.getAttribute('data-theme');
|
|
175
173
|
const initial = stored || (VALID.has(fromAttr) ? fromAttr : 'auto');
|
|
176
174
|
applyTheme(initial);
|
|
177
175
|
// Restore persisted accent/density (no-op if none stored — keeps the
|