@aparte/core 1.2.0 → 1.3.0

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.
@@ -1,5 +1,5 @@
1
1
  import { toolRefusal as toolRefusal$1, unansweredTail, runStreamAgent } from "@aparte/engine";
2
- import { A as APARTE_ICON_GLYPHS } from "./glyphs-DFp-825O.js";
2
+ import { A as APARTE_ICON_GLYPHS } from "./glyphs-LolG04CC.js";
3
3
  function contentToText(content) {
4
4
  if (typeof content === "string") return content;
5
5
  return content.filter((p) => p.type === "text").map((p) => p.text).join("");
@@ -258,6 +258,9 @@ const APARTE_DEFAULT_LOCALE = {
258
258
  splitHandleLabel: "Resize the panes",
259
259
  launcherOpen: "Open the chat",
260
260
  launcherClose: "Close the chat",
261
+ launcherHeading: "Chat",
262
+ launcherMaximize: "Expand the chat",
263
+ launcherRestore: "Shrink the chat",
261
264
  transcript: "Transcript"
262
265
  };
263
266
  function isFormatAdapter(p) {
@@ -1811,6 +1814,7 @@ const RESERVED_ATTRIBUTES = /* @__PURE__ */ new Set([
1811
1814
  "data-aparte-theme",
1812
1815
  "data-aparte-split-pane",
1813
1816
  "data-aparte-launcher-close",
1817
+ "data-aparte-launcher-maximize",
1814
1818
  "data-aparte-suggestions",
1815
1819
  "data-aparte-bubble",
1816
1820
  "data-aparte-empty",
@@ -11181,6 +11185,14 @@ class AparteMessageRepository {
11181
11185
  node.next = null;
11182
11186
  }
11183
11187
  }
11188
+ const APARTE_DEFAULT_ON_ATTRIBUTES = {
11189
+ "aparte-composer-add-attachment": ["multiple"],
11190
+ "aparte-composer": ["submit-on-enter"],
11191
+ "aparte-launcher": ["header"]
11192
+ };
11193
+ function isDefaultOn(el2, name) {
11194
+ return APARTE_DEFAULT_ON_ATTRIBUTES[el2.localName]?.includes(name) === true;
11195
+ }
11184
11196
  const APARTE_DEFAULT_UI_EVENTS = [
11185
11197
  // <aparte-composer> and its parts
11186
11198
  "aparte-send",
@@ -11241,6 +11253,8 @@ function applyElementProps(el2, props, transformValue = (value) => value) {
11241
11253
  else el2.style.setProperty(key, String(value));
11242
11254
  } else if (key.toLowerCase().startsWith("on")) {
11243
11255
  el2.removeAttribute(key);
11256
+ } else if (value === false && isDefaultOn(el2, key)) {
11257
+ el2.setAttribute(key, "false");
11244
11258
  } else if (value === null || value === void 0 || value === false) {
11245
11259
  el2.removeAttribute(key);
11246
11260
  } else if (typeof value === "number" && Number.isNaN(value)) {
@@ -11535,4 +11549,4 @@ export {
11535
11549
  collectRendererStyles as y,
11536
11550
  contentToText as z
11537
11551
  };
11538
- //# sourceMappingURL=defer-hydration-Oh04ScDm.js.map
11552
+ //# sourceMappingURL=defer-hydration-lK-7XQXf.js.map