@aparte/core 0.16.6 → 0.16.7

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/dist/index.css CHANGED
@@ -453,11 +453,91 @@
453
453
  --aparte-model-select-chevron-room: 28px;
454
454
  }
455
455
 
456
+ /* =========================================
457
+ The system decides, by default.
458
+
459
+ Dark used to exist only behind the attribute: on a dark OS an un-attributed chat
460
+ rendered LIGHT on the host's dark page, unreadable, with no error. This block is
461
+ the DARK block above, verbatim, applied when the OS asks and the host has not
462
+ said otherwise — `data-aparte-theme="light"` on the root is the veto.
463
+
464
+ A duplicate on purpose (CSS cannot share one block between a media query and an
465
+ attribute selector): `check:derived-vars` holds the two byte-identical, so
466
+ editing one without the other fails the build rather than forking the theme.
467
+ No `color-scheme` here — it is not namespaced, and a library setting it on the
468
+ host's :root would flip the whole page's native controls.
469
+ ========================================= */
470
+ @media (prefers-color-scheme: dark) {
471
+ :root:not([data-aparte-theme="light"]) {
472
+ --aparte-bg: #17141c;
473
+ --aparte-surface-1: #211b28;
474
+ --aparte-surface-2: #2a2333;
475
+ --aparte-message-content-bg-assistant: transparent;
476
+ --aparte-text: #f2eee7;
477
+ --aparte-text-muted: #a89bb6;
478
+ --aparte-neutral: #a89bb6;
479
+ --aparte-border: #342a40;
480
+ --aparte-primary: #d9a24b;
481
+ --aparte-primary-hover: #e7c588;
482
+ --aparte-scroll-btn-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
483
+ --aparte-select-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.55);
484
+ --aparte-menu-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
485
+ --aparte-popover-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.55);
486
+ --aparte-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
487
+ --aparte-switch-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
488
+ --aparte-range-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
489
+ --aparte-ink-l: 0.85;
490
+ --aparte-error-bg: #2d1b1b;
491
+ --aparte-error-border: #7f1d1d;
492
+ --aparte-error-solid: #f87171;
493
+ --aparte-error-text: #fca5a5;
494
+ --aparte-error-title: #fecaca;
495
+ }
496
+ }
497
+
498
+ /* =========================================
499
+ Forced light — the veto, and the subtree escape.
500
+
501
+ New with the system default: without it, a host that wants light-always on a
502
+ dark OS has no lever, and a light island inside a dark page cannot exist. The
503
+ values are the light literals from the `:root` block above, one per property
504
+ the dark block overrides — `check:derived-vars` holds that pairing, so a light
505
+ literal edited above cannot drift from its copy here.
506
+ ========================================= */
507
+ [data-aparte-theme="light"] {
508
+ color-scheme: light;
509
+ --aparte-bg: #f6f2ea;
510
+ --aparte-surface-1: #fffdf8;
511
+ --aparte-surface-2: #f1ebdf;
512
+ --aparte-message-content-bg-assistant: transparent;
513
+ --aparte-text: #241f2b;
514
+ --aparte-text-muted: #6d6479;
515
+ --aparte-neutral: #6d6479;
516
+ --aparte-border: #e5ddce;
517
+ --aparte-primary: #b07d33;
518
+ --aparte-primary-hover: #a06f28;
519
+ --aparte-scroll-btn-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
520
+ --aparte-select-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 10px 28px rgba(0, 0, 0, 0.16);
521
+ --aparte-menu-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
522
+ --aparte-popover-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 10px 28px rgba(0, 0, 0, 0.16);
523
+ --aparte-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
524
+ --aparte-switch-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
525
+ --aparte-range-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
526
+ --aparte-ink-l: 0.40;
527
+ --aparte-error-bg: #fef2f2;
528
+ --aparte-error-border: #fecaca;
529
+ --aparte-error-solid: #dc2626;
530
+ --aparte-error-text: #991b1b;
531
+ --aparte-error-title: #7f1d1d;
532
+ }
533
+
534
+
456
535
  /* =========================================
457
536
  Dark Theme (App-controlled via attribute)
458
537
  Usage: <div data-aparte-theme="dark">...</div>
459
538
  ========================================= */
460
539
  [data-aparte-theme="dark"] {
540
+ color-scheme: dark;
461
541
  /* Backgrounds */
462
542
  --aparte-bg: #17141c;
463
543
  --aparte-surface-1: #211b28;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as resolveConfig, a4 as subscribeConfigChange, a1 as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, J as escapeAttr, F as cssEscape, a7 as mergeSegmentUpdate, K as escapeHtml, a8 as writeStreamedMarkdown, C as copyText, N as getSegmentRenderer, O as installDefaultRenderersOnce, r as AparteMessageRepository, a9 as stampSegmentActivity, aa as stampSegmentOnInsert, ab as stampSegmentOnUpdate, ac as renumberSegments, ad as openSegmentIds, ae as isTerminalStatus, af as adoptMessageSegments, Q as isAwaitingReply, W as populateBubbleFromMessage, a6 as uuid, a0 as revokeAttachmentUrls, e as APARTE_DEFAULT_LOCALE, P as installDialogTriggersOnce } from "./dialog-triggers-CVCxqKg3.js";
2
- import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, s, t, u, v, y, z, B, D, E, G, H, I, L, M, R, S, T, U, V, X, Y, Z, _, a2, a3, a5 } from "./dialog-triggers-CVCxqKg3.js";
1
+ import { $ as resolveConfig, a4 as subscribeConfigChange, a1 as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, J as escapeAttr, F as cssEscape, a7 as mergeSegmentUpdate, K as escapeHtml, a8 as writeStreamedMarkdown, C as copyText, N as getSegmentRenderer, O as installDefaultRenderersOnce, r as AparteMessageRepository, a9 as stampSegmentActivity, aa as stampSegmentOnInsert, ab as stampSegmentOnUpdate, ac as renumberSegments, ad as openSegmentIds, ae as isTerminalStatus, af as adoptMessageSegments, Q as isAwaitingReply, W as populateBubbleFromMessage, a6 as uuid, a0 as revokeAttachmentUrls, e as APARTE_DEFAULT_LOCALE, P as installDialogTriggersOnce } from "./dialog-triggers-Dw_DIlQ7.js";
2
+ import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, s, t, u, v, y, z, B, D, E, G, H, I, L, M, R, S, T, U, V, X, Y, Z, _, a2, a3, a5 } from "./dialog-triggers-Dw_DIlQ7.js";
3
3
  class AparteOption extends HTMLElement {
4
4
  static get observedAttributes() {
5
5
  return ["value", "disabled", "selected", "data-status"];
@@ -1,4 +1,4 @@
1
- import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6 } from "./dialog-triggers-CVCxqKg3.js";
1
+ import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6 } from "./dialog-triggers-Dw_DIlQ7.js";
2
2
  function registerAllComponents() {
3
3
  if (typeof customElements !== "undefined") {
4
4
  console.warn(
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@aparte/core",
3
- "version": "0.16.6",
3
+ "version": "0.16.7",
4
+ "homepage": "https://apartejs.dev/",
4
5
  "description": "AI chat in Web Components, with the agent loop inside — zero third-party dependencies",
5
6
  "type": "module",
6
7
  "//sideEffects": "The BROWSER entry defines the custom elements and imports CSS at module scope, so it must never be tree-shaken; the Node entry (`index.node`) and every other module are pure. Listing them explicitly is what lets a bundler drop the rest — the whole package was implicitly side-effectful before, the only one of the 14 without this field.",
@@ -52,7 +53,7 @@
52
53
  "node": ">=18"
53
54
  },
54
55
  "dependencies": {
55
- "@aparte/engine": "0.16.6"
56
+ "@aparte/engine": "0.16.7"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@custom-elements-manifest/analyzer": "^0.11.0",