anentrypoint-design 0.0.323 → 0.0.324
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 +22 -2
- package/app-shell.css +24 -4793
- package/colors_and_type.css +43 -0
- package/dist/247420.css +63 -3
- package/dist/247420.js +16 -16
- package/package.json +14 -8
- package/src/bootstrap.js +10 -1
- package/src/components/chat-message-parts.js +355 -0
- package/src/components/chat.js +23 -320
- package/src/components/data-density.js +15 -10
- package/src/components/files.js +5 -1
- package/src/components/freddie/helpers.js +46 -8
- package/src/css/app-shell/base.css +157 -0
- package/src/css/app-shell/catalog-theme.css +144 -0
- package/src/css/app-shell/chat-basic.css +12 -0
- package/src/css/app-shell/chat-polish.css +459 -0
- package/src/css/app-shell/data-density.css +150 -0
- package/src/css/app-shell/files.css +709 -0
- package/src/css/app-shell/hero-content.css +407 -0
- package/src/css/app-shell/kits-appended.css +361 -0
- package/src/css/app-shell/loading-alerts.css +120 -0
- package/src/css/app-shell/panel-row.css +177 -0
- package/src/css/app-shell/primitives.css +197 -0
- package/src/css/app-shell/responsive.css +266 -0
- package/src/css/app-shell/responsive2-workspace.css +465 -0
- package/src/css/app-shell/row-print.css +75 -0
- package/src/css/app-shell/sidebar-misc.css +79 -0
- package/src/css/app-shell/states-interactions.css +696 -0
- package/src/css/app-shell/topbar.css +319 -0
- package/src/deck-stage.js +6 -4
- package/src/highlight.js +20 -4
- package/src/index.js +15 -5
- package/src/kits/os/freddie/pages-chat.js +1 -1
- package/src/kits/os/freddie/pages-core.js +1 -1
- package/src/kits/os/freddie/pages-os.js +1 -1
- package/src/kits/os/freddie/pages-tools.js +1 -1
- package/src/kits/os/wm.js +38 -0
- package/src/kits/slides/deck-stage-overlay.js +68 -0
- package/src/kits/slides/deck-stage-state.js +81 -0
- package/src/kits/slides/deck-stage-style.js +117 -0
- package/src/kits/slides/deck-stage.js +167 -0
- package/src/kits/slides/index.js +5 -0
- package/src/markdown.js +89 -11
- package/src/kits/os/freddie/helpers.js +0 -33
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# 247420
|
|
2
2
|
|
|
3
3
|
The 247420 / AnEntrypoint design system, packaged as a single-file ESM SDK.
|
|
4
|
+
(`247420` is this project's internal bundle/codename -- it appears as the dist
|
|
5
|
+
filename `dist/247420.js`/`dist/247420.css` and in a few package.json fields;
|
|
6
|
+
the published npm package name is `anentrypoint-design`. Both names refer to
|
|
7
|
+
the same single system.)
|
|
4
8
|
|
|
5
9
|
friendly rounded sans body, monospace only on real code, tonal surfaces over borders, indicator rails for color-coded separation, generous negative space, terminal-flavoured rhythm.
|
|
6
10
|
|
|
@@ -162,7 +166,23 @@ All factories are pure: props in, WebJSX tree out. Component source is split per
|
|
|
162
166
|
|
|
163
167
|
## chat / markdown / code-highlight
|
|
164
168
|
|
|
165
|
-
`Chat({ messages, onSend })` renders the bubble timeline; `ChatComposer({ onSend })` is the input row. Block markdown inside messages is sanitized through `renderMarkdown` (`marked@15` + `DOMPurify@3`, lazy-loaded from jsDelivr ESM on first call) and code blocks are highlighted by Prism (lazy-loaded core + per-language scripts via `ensurePrism` / `highlightAllUnder`). Direct `innerHTML` from chat content is forbidden — DOMPurify is the only XSS gate.
|
|
169
|
+
`Chat({ messages, onSend })` renders the bubble timeline; `ChatComposer({ onSend })` is the input row. Block markdown inside messages is sanitized through `renderMarkdown` (`marked@15.0.12` + `DOMPurify@3.2.6`, lazy-loaded from jsDelivr ESM on first call) and code blocks are highlighted by Prism (`prismjs@1.30.0`, lazy-loaded core + per-language scripts via `ensurePrism` / `highlightAllUnder`). Direct `innerHTML` from chat content is forbidden — DOMPurify is the only XSS gate.
|
|
170
|
+
|
|
171
|
+
**Network dependency — read this before deploying behind a strict CSP or air-gapped environment.** The chat/markdown pipeline fetches three packages from `cdn.jsdelivr.net` **at runtime, on first render**, not at build/install time: `marked`, `DOMPurify`, and (for fenced code blocks) Prism core + per-language grammars. This means a consumer's Content-Security-Policy must allowlist `cdn.jsdelivr.net` for `script-src`/`connect-src` or the fallback below fires on every render. Both dependencies are **fail-closed**: any failure to load the CDN modules — network error, timeout, CSP block, a malformed/empty response, or even a crash inside the loaded library's own `parse()`/`sanitize()` call — makes `renderMarkdown` return the input as **HTML-entity-escaped plain text** (never raw/unsanitized HTML, never a throw). `isDegraded()` reports this state so a consumer can show a subtle "plain text" affordance if desired; `isMarkdownDegraded` is also exported from the SDK root. The default URLs pin an exact semver (`marked@15.0.12`, `dompurify@3.2.6`, `prismjs@1.30.0`) rather than a floating tag, so the CDN cannot silently swap code under a running app; genuine Subresource Integrity (`integrity="sha384-..."` + `crossorigin`) is **not applied** here because these load via dynamic `import()` (marked/DOMPurify) and injected `<script src>` (Prism components), and neither browser dynamic-`import()` nor an auto-injected script tag currently has a standardized SRI attachment point the way a static `<script integrity>` tag does — version-pinning is the mitigation in place today. A consumer that wants to self-host, mirror-pin with real SRI on their own `<script integrity>` wrapper, or route through an internal proxy can override every URL before first render:
|
|
172
|
+
|
|
173
|
+
```js
|
|
174
|
+
import { configureMarkdownCdn, configurePrismCdn } from 'anentrypoint-design';
|
|
175
|
+
|
|
176
|
+
// Optional. Zero-config consumers keep hitting the pinned jsDelivr defaults
|
|
177
|
+
// above, byte-for-byte -- this is purely additive.
|
|
178
|
+
configureMarkdownCdn({
|
|
179
|
+
markedUrl: 'https://your-mirror.example/marked@15.0.12/+esm',
|
|
180
|
+
purifyUrl: 'https://your-mirror.example/dompurify@3.2.6/+esm',
|
|
181
|
+
});
|
|
182
|
+
configurePrismCdn({ baseUrl: 'https://your-mirror.example/prismjs@1.30.0/components/' });
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`getMarkdownCdnConfig()` / `getPrismCdnConfig()` return the URLs currently in effect (defaults or override) for a consumer's own audit tooling. Calling either configure function forces the next render to (re)load from the new URL, so an override can also be applied at runtime (e.g. after detecting the default CDN is unreachable) — a render already in flight still completes against whatever it already loaded.
|
|
166
186
|
|
|
167
187
|
```js
|
|
168
188
|
import { components as C } from 'anentrypoint-design';
|
|
@@ -225,7 +245,7 @@ The full token list lives in `colors_and_type.css`. The voice rules and the stor
|
|
|
225
245
|
|
|
226
246
|
## why scope-prefixed
|
|
227
247
|
|
|
228
|
-
Every selector in the bundle is namespaced under `.ds-247420` via PostCSS. The bundle ships
|
|
248
|
+
Every selector in the bundle is namespaced under `.ds-247420` via PostCSS. The bundle ships a system-font stack (`--ff-body`/`--ff-display`/`--ff-mono`, no web-font `@import`/`@font-face` -- see `colors_and_type.css`) + the design tokens **without** colliding with whatever the host app already runs. Add the class to a root element to opt in. The font tokens are fully overridable: set `--ff-body`/`--ff-display`/`--ff-mono` on any scope to swap typography without touching component code.
|
|
229
249
|
|
|
230
250
|
## CSS only (no JS)
|
|
231
251
|
|