@asgard-js/react 0.3.16 → 0.3.17

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 +1 @@
1
- {"version":3,"file":"asgard-theme-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-theme-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAKrH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CACX,aAAa,EACX,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,aAAa,GACb,cAAc,CACjB,GAAG;QACF,eAAe,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;QAC5C,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;QACnD,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;QAC3C,aAAa,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,SAAS,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QACnC,cAAc,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QACxC,gBAAgB,CAAC,EAAE;YACjB,SAAS,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;YACnC,cAAc,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;SACzC,CAAC;QACF,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,MAAM,CAAC,EAAE,OAAO,CAAC;YACf,KAAK,EAAE,aAAa,CAAC;YACrB,KAAK,EAAE;gBACL,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,YAAY,CAAC,EAAE;gBACb,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;YACb,KAAK,EAAE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aAAa,CAAC;gBACrB,KAAK,CAAC,EAAE;oBACN,KAAK,EAAE,aAAa,CAAC;iBACtB,CAAC;gBACF,WAAW,CAAC,EAAE;oBACZ,KAAK,EAAE,aAAa,CAAC;iBACtB,CAAC;gBACF,MAAM,CAAC,EAAE;oBACP,KAAK,EAAE,aAAa,CAAC;iBACtB,CAAC;aACH,CAAC;SACH,CAAC,CAAC;QACH;;WAEG;QACH,oBAAoB,EAAE,OAAO,CAAC;YAAE,KAAK,EAAE,aAAa,CAAA;SAAE,CAAC,CAAC;QACxD;;WAEG;QACH,yBAAyB,EAAE,OAAO,CAAC;YACjC,KAAK,EAAE,aAAa,CAAC;YACrB,KAAK,CAAC,EAAE;gBACN,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,WAAW,CAAC,EAAE;gBACZ,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,OAAO,CAAC,EAAE;gBACR,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,cAAc,CAAC,EAAE;gBACf,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;SACH,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,eAAO,MAAM,8BAA8B,EAAE,uBAgJ5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,kDAAyE,CAAC;AAEzG,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC1C,CAAC,GACD,SAAS,CAigBX;AAED,wBAAgB,qBAAqB,IAAI,uBAAuB,CAE/D"}
1
+ {"version":3,"file":"asgard-theme-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-theme-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAKrH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CACX,aAAa,EACX,OAAO,GAC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AAE,OAAO,CAAC;YACjC,KAAK,EAAE,aAAa,CAAC;YACrB,KAAK,CAAC,EAAE;gBACN,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,WAAW,CAAC,EAAE;gBACZ,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,OAAO,CAAC,EAAE;gBACR,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;YACF,cAAc,CAAC,EAAE;gBACf,KAAK,EAAE,aAAa,CAAC;aACtB,CAAC;SACH,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,eAAO,MAAM,8BAA8B,EAAE,uBAgJ5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,kDAAyE,CAAC;AAEzG,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC1C,CAAC,GACD,SAAS,CAuhBX;AAED,wBAAgB,qBAAqB,IAAI,uBAAuB,CAE/D"}
package/dist/index.js CHANGED
@@ -931,54 +931,54 @@ function HC(e) {
931
931
  }
932
932
  }), l = Vp(a, n);
933
933
  if (n?.chatbot?.borderColor) {
934
- const _ = n.chatbot.borderColor;
935
- l.chatbot.header?.style && (l.chatbot.header.style.borderBottomColor = _), l.chatbot.footer?.style && (l.chatbot.footer.style.borderTopColor = _), l.chatbot.footer?.textArea?.style && (l.chatbot.footer.textArea.style.borderColor = _), l.template?.quickReplies?.button?.style && (l.template.quickReplies.button.style.borderColor = _);
934
+ const v = n.chatbot.borderColor;
935
+ l.chatbot.header?.style && (l.chatbot.header.style.borderBottomColor = v), l.chatbot.footer?.style && (l.chatbot.footer.style.borderTopColor = v), l.chatbot.footer?.textArea?.style && (l.chatbot.footer.textArea.style.borderColor = v), l.template?.quickReplies?.button?.style && (l.template.quickReplies.button.style.borderColor = v);
936
936
  }
937
937
  if (n?.chatbot?.primaryComponent?.secondaryColor) {
938
- const _ = n.chatbot.primaryComponent.secondaryColor;
939
- l.chatbot.footer?.textArea?.style && (l.chatbot.footer.textArea.style.color = _), l.chatbot.footer?.attachmentButton?.style && (l.chatbot.footer.attachmentButton.style.color = _), l.chatbot.footer?.submitButton?.style && (l.chatbot.footer.submitButton.style.color = _), l.chatbot.footer?.speechInputButton?.style && (l.chatbot.footer.speechInputButton.style.color = _);
938
+ const v = n.chatbot.primaryComponent.secondaryColor;
939
+ l.chatbot.footer?.textArea?.style && (l.chatbot.footer.textArea.style.color = v), l.chatbot.footer?.attachmentButton?.style && (l.chatbot.footer.attachmentButton.style.color = v), l.chatbot.footer?.submitButton?.style && (l.chatbot.footer.submitButton.style.color = v), l.chatbot.footer?.speechInputButton?.style && (l.chatbot.footer.speechInputButton.style.color = v);
940
940
  }
941
941
  if (n?.chatbot?.inactiveColor) {
942
- const _ = n.chatbot.inactiveColor;
943
- l.chatbot.footer?.textArea?.["::placeholder"] && (l.chatbot.footer.textArea["::placeholder"].color = _);
942
+ const v = n.chatbot.inactiveColor;
943
+ l.chatbot.footer?.textArea?.["::placeholder"] && (l.chatbot.footer.textArea["::placeholder"].color = v);
944
944
  }
945
945
  if (n?.chatbot?.backgroundColor) {
946
- const _ = n.chatbot.backgroundColor;
947
- l.chatbot.footer?.textArea?.style && (l.chatbot.footer.textArea.style.backgroundColor = /^#[0-9a-fA-F]{6}$/.test(_) ? qC(_, 0.08) : _);
946
+ const v = n.chatbot.backgroundColor;
947
+ l.chatbot.footer?.textArea?.style && (l.chatbot.footer.textArea.style.backgroundColor = /^#[0-9a-fA-F]{6}$/.test(v) ? qC(v, 0.08) : v);
948
948
  }
949
949
  if (n?.chatbot?.inactiveColor && (l.template?.time?.style && (l.template.time.style.color = n.chatbot.inactiveColor), l.chatbot.header?.actionButton?.style && (l.chatbot.header.actionButton.style.color = n.chatbot.inactiveColor)), n?.botMessage?.carouselButtonBackgroundColor) {
950
- const _ = n.botMessage.carouselButtonBackgroundColor;
951
- l.template?.ButtonMessageTemplate?.style && (l.template.ButtonMessageTemplate.style.backgroundColor = _), l.template?.CarouselMessageTemplate?.card?.style && (l.template.CarouselMessageTemplate.card.style.backgroundColor = _), l.template?.LocationMessageTemplate?.style && (l.template.LocationMessageTemplate.style.backgroundColor = _), l.template?.AttachmentMessageTemplate?.style && (l.template.AttachmentMessageTemplate.style.backgroundColor = _);
950
+ const v = n.botMessage.carouselButtonBackgroundColor;
951
+ l.template?.ButtonMessageTemplate?.style && (l.template.ButtonMessageTemplate.style.backgroundColor = v), l.template?.CarouselMessageTemplate?.card?.style && (l.template.CarouselMessageTemplate.card.style.backgroundColor = v), l.template?.LocationMessageTemplate?.style && (l.template.LocationMessageTemplate.style.backgroundColor = v), l.template?.AttachmentMessageTemplate?.style && (l.template.AttachmentMessageTemplate.style.backgroundColor = v);
952
952
  }
953
953
  if (n?.chatbot?.primaryComponent?.secondaryColor) {
954
- const _ = n.chatbot.primaryComponent.secondaryColor;
955
- l.chatbot.header?.title?.style && (l.chatbot.header.title.style.color = _), l.template?.HintMessageTemplate?.style && (l.template.HintMessageTemplate.style.color = _), l.template?.ButtonMessageTemplate?.title?.style && (l.template.ButtonMessageTemplate.title.style.color = _), l.template?.CarouselMessageTemplate?.card?.title?.style && (l.template.CarouselMessageTemplate.card.title.style.color = _), l.template?.LocationMessageTemplate?.title?.style && (l.template.LocationMessageTemplate.title.style.color = _), l.template?.AttachmentMessageTemplate?.title?.style && (l.template.AttachmentMessageTemplate.title.style.color = _);
954
+ const v = n.chatbot.primaryComponent.secondaryColor;
955
+ l.chatbot.header?.title?.style && (l.chatbot.header.title.style.color = v), l.template?.HintMessageTemplate?.style && (l.template.HintMessageTemplate.style.color = v), l.template?.ButtonMessageTemplate?.title?.style && (l.template.ButtonMessageTemplate.title.style.color = v), l.template?.CarouselMessageTemplate?.card?.title?.style && (l.template.CarouselMessageTemplate.card.title.style.color = v), l.template?.LocationMessageTemplate?.title?.style && (l.template.LocationMessageTemplate.title.style.color = v), l.template?.AttachmentMessageTemplate?.title?.style && (l.template.AttachmentMessageTemplate.title.style.color = v);
956
956
  }
957
957
  if (n?.chatbot?.inactiveColor && (l.template?.ButtonMessageTemplate?.description?.style && (l.template.ButtonMessageTemplate.description.style.color = n.chatbot.inactiveColor), l.template?.CarouselMessageTemplate?.card?.description?.style && (l.template.CarouselMessageTemplate.card.description.style.color = n.chatbot.inactiveColor), l.template?.LocationMessageTemplate?.description?.style && (l.template.LocationMessageTemplate.description.style.color = n.chatbot.inactiveColor), l.template?.AttachmentMessageTemplate?.description?.style && (l.template.AttachmentMessageTemplate.description.style.color = n.chatbot.inactiveColor), l.template?.AttachmentMessageTemplate?.downloadButton?.style && (l.template.AttachmentMessageTemplate.downloadButton.style.color = n.chatbot.inactiveColor)), n?.chatbot?.primaryComponent?.mainColor) {
958
- const _ = n.chatbot.primaryComponent.mainColor;
959
- l.template?.ButtonMessageTemplate?.button?.style && (l.template.ButtonMessageTemplate.button.style.backgroundColor = _, l.template.ButtonMessageTemplate.button.style.borderColor = _), l.template?.CarouselMessageTemplate?.card?.button?.style && (l.template.CarouselMessageTemplate.card.button.style.backgroundColor = _, l.template.CarouselMessageTemplate.card.button.style.borderColor = _), l.template?.AttachmentMessageTemplate?.iconBox?.style && (l.template.AttachmentMessageTemplate.iconBox.style.backgroundColor = _);
958
+ const v = n.chatbot.primaryComponent.mainColor;
959
+ l.template?.ButtonMessageTemplate?.button?.style && (l.template.ButtonMessageTemplate.button.style.backgroundColor = v, l.template.ButtonMessageTemplate.button.style.borderColor = v), l.template?.CarouselMessageTemplate?.card?.button?.style && (l.template.CarouselMessageTemplate.card.button.style.backgroundColor = v, l.template.CarouselMessageTemplate.card.button.style.borderColor = v), l.template?.AttachmentMessageTemplate?.iconBox?.style && (l.template.AttachmentMessageTemplate.iconBox.style.backgroundColor = v);
960
960
  }
961
961
  if (n?.chatbot?.primaryComponent?.secondaryColor) {
962
- const _ = n.chatbot.primaryComponent.secondaryColor;
963
- l.template?.ButtonMessageTemplate?.button?.style && (l.template.ButtonMessageTemplate.button.style.color = _), l.template?.CarouselMessageTemplate?.card?.button?.style && (l.template.CarouselMessageTemplate.card.button.style.color = _), l.template?.quickReplies?.button?.style && (l.template.quickReplies.button.style.color = _), l.template?.AttachmentMessageTemplate?.iconBox?.style && (l.template.AttachmentMessageTemplate.iconBox.style.color = _);
962
+ const v = n.chatbot.primaryComponent.secondaryColor;
963
+ l.template?.ButtonMessageTemplate?.button?.style && (l.template.ButtonMessageTemplate.button.style.color = v), l.template?.CarouselMessageTemplate?.card?.button?.style && (l.template.CarouselMessageTemplate.card.button.style.color = v), l.template?.quickReplies?.button?.style && (l.template.quickReplies.button.style.color = v), l.template?.AttachmentMessageTemplate?.iconBox?.style && (l.template.AttachmentMessageTemplate.iconBox.style.color = v);
964
964
  }
965
965
  if (n?.botMessage?.backgroundColor) {
966
- const _ = `${n.botMessage.backgroundColor}33`;
967
- l.template?.quickReplies?.button?.style && (l.template.quickReplies.button.style.backgroundColor = _);
968
- }
969
- const c = {}, u = (_) => /^#[0-9a-fA-F]{6}$/.test(_), f = (_) => u(_) ? jC(_, 0.15) : `color-mix(in srgb, ${_} 85%, #000)`, d = (_) => u(_) ? qC(_, 0.08) : `color-mix(in srgb, ${_} 92%, #fff)`, h = l.chatbot?.primaryComponent?.mainColor;
970
- h && (c["--asg-color-primary"] = h, c["--asg-color-primary-dark"] = f(h));
971
- const p = l.chatbot?.backgroundColor;
972
- if (typeof p == "string" && p) {
973
- const _ = d(p);
974
- c["--asg-color-bg"] = p, c["--asg-color-surface"] = _, c["--asgard-tool-call-item-bg"] = _, c["--asgard-thinking-bg"] = _, c["--asgard-json-viewer-bg"] = p, c["--asgard-json-viewer-header-bg"] = _;
975
- }
976
- const g = l.chatbot?.borderColor;
977
- typeof g == "string" && g && (c["--asg-color-border"] = g, c["--asg-color-divider"] = g, c["--asgard-tool-call-border"] = g, c["--asgard-thinking-border"] = g);
978
- const m = l.chatbot?.inactiveColor;
979
- typeof m == "string" && m && (c["--asg-color-text-secondary"] = m, c["--asg-color-action-inactive"] = m);
980
- const y = l.chatbot?.primaryComponent?.secondaryColor;
981
- return typeof y == "string" && y && (c["--asg-color-text-primary"] = y, c["--asg-color-action-active"] = y), Object.keys(c).length > 0 && l.chatbot && (l.chatbot.style = {
966
+ const v = `${n.botMessage.backgroundColor}33`;
967
+ l.template?.quickReplies?.button?.style && (l.template.quickReplies.button.style.backgroundColor = v);
968
+ }
969
+ const c = {}, u = (v) => /^#[0-9a-fA-F]{6}$/.test(v), f = (v) => u(v) ? jC(v, 0.15) : `color-mix(in srgb, ${v} 85%, #000)`, d = (v) => u(v) ? qC(v, 0.08) : `color-mix(in srgb, ${v} 92%, #fff)`, h = (v, x) => `color-mix(in srgb, ${v} ${x}%, transparent)`, p = l.chatbot?.primaryComponent?.mainColor;
970
+ p && (c["--asg-color-primary"] = p, c["--asg-color-primary-dark"] = f(p));
971
+ const g = l.chatbot?.backgroundColor;
972
+ if (typeof g == "string" && g) {
973
+ const v = d(g);
974
+ c["--asg-color-bg"] = g, c["--asg-color-surface"] = v, c["--asgard-tool-call-item-bg"] = v, c["--asgard-thinking-bg"] = v, c["--asgard-json-viewer-bg"] = g, c["--asgard-json-viewer-header-bg"] = v, g.startsWith("var(") || (c["--asgard-markdown-pre-bg"] = g);
975
+ }
976
+ const m = l.chatbot?.borderColor;
977
+ typeof m == "string" && m && (c["--asg-color-border"] = m, c["--asg-color-divider"] = m, c["--asgard-tool-call-border"] = m, c["--asgard-thinking-border"] = m);
978
+ const y = l.chatbot?.inactiveColor;
979
+ typeof y == "string" && y && (c["--asg-color-text-secondary"] = y, c["--asg-color-action-inactive"] = y);
980
+ const _ = l.chatbot?.primaryComponent?.secondaryColor;
981
+ return typeof _ == "string" && _ && (c["--asg-color-text-primary"] = _, c["--asg-color-action-active"] = _, c["--asgard-markdown-blockquote"] = h(_, 70), c["--asgard-markdown-blockquote-border"] = h(_, 30), c["--asgard-markdown-hr"] = h(_, 20), c["--asgard-markdown-table-border"] = h(_, 20), c["--asgard-markdown-code-bg"] = h(_, 10), c["--asgard-markdown-table-header-bg"] = h(_, 5), c["--asgard-markdown-table-row-alt"] = h(_, 2)), Object.keys(c).length > 0 && l.chatbot && (l.chatbot.style = {
982
982
  ...l.chatbot.style,
983
983
  ...c
984
984
  }), l;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgard-js/react",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -47,7 +47,7 @@
47
47
  "vite-plugin-svgr": "^4.3.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@asgard-js/core": "^0.3.16",
50
+ "@asgard-js/core": "^0.3.17",
51
51
  "react": "^18.0.0 || ^19.0.0",
52
52
  "react-dom": "^18.0.0 || ^19.0.0"
53
53
  }