@websolutespa/bom-mixer-llm 1.8.26 → 1.8.28

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.css +28 -12
  3. package/dist/cjs/index.js +39 -14
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/esm/index.css +28 -12
  6. package/dist/esm/llm/components/Hints/hints.js +4 -2
  7. package/dist/esm/llm/components/Hints/hints.js.map +1 -1
  8. package/dist/esm/llm/components/Intro/intro.js +6 -2
  9. package/dist/esm/llm/components/Intro/intro.js.map +1 -1
  10. package/dist/esm/llm/components/Main/main.js +14 -8
  11. package/dist/esm/llm/components/Main/main.js.map +1 -1
  12. package/dist/esm/llm/theme.json.js +17 -3
  13. package/dist/esm/llm/theme.json.js.map +1 -1
  14. package/dist/esm/useLlm/useLlmView.js +1 -1
  15. package/dist/types/llm/components/Hints/hints.d.ts.map +1 -1
  16. package/dist/types/llm/components/Intro/intro.d.ts.map +1 -1
  17. package/dist/types/llm/components/Main/main.d.ts.map +1 -1
  18. package/dist/types/llm/theme.d.ts +12 -0
  19. package/dist/types/llm/theme.d.ts.map +1 -1
  20. package/dist/types/types.d.ts +1 -0
  21. package/dist/types/types.d.ts.map +1 -1
  22. package/dist/types/useLlm/mock-app.silicon.d.ts.map +1 -1
  23. package/package.json +1 -1
  24. package/src/llm/components/Hints/_style.scss +10 -1
  25. package/src/llm/components/Hints/hints.tsx +4 -2
  26. package/src/llm/components/Intro/intro.tsx +4 -6
  27. package/src/llm/components/Main/_style.scss +14 -6
  28. package/src/llm/components/Main/main.tsx +15 -9
  29. package/src/llm/components/Prompt/_style.scss +7 -7
  30. package/src/llm/theme.json +14 -2
  31. package/src/types.ts +1 -0
  32. package/src/useLlm/mock-app.silicon.ts +165 -53
  33. package/src/useLlm/useLlmView.tsx +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @websolutespa/bom-mixer-llm
2
2
 
3
+ ## 1.8.28
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified idle timeout
8
+
9
+ ## 1.8.27
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified: theme & styles
14
+
3
15
  ## 1.8.26
4
16
 
5
17
  ### Patch Changes
@@ -676,8 +676,8 @@ llm-embed {
676
676
  position: relative;
677
677
  pointer-events: auto;
678
678
  inset: 0;
679
- background: var(--llm-color-background);
680
- color: var(--llm-color-foreground);
679
+ background: var(--llm-main-background);
680
+ color: var(--llm-main-foreground);
681
681
  }
682
682
  .llm .llm__content {
683
683
  position: relative;
@@ -688,6 +688,15 @@ llm-embed {
688
688
  width: 100%;
689
689
  overflow: hidden;
690
690
  }
691
+ .llm .llm__underlay {
692
+ position: absolute;
693
+ left: 0;
694
+ width: 100%;
695
+ bottom: 0;
696
+ height: 240px;
697
+ background: linear-gradient(transparent, var(--llm-main-background), var(--llm-main-background));
698
+ pointer-events: none;
699
+ }
691
700
  .llm.-embedded .llm__main {
692
701
  width: 100%;
693
702
  height: 100%;
@@ -715,12 +724,12 @@ llm-embed {
715
724
  }
716
725
  .llm:not(.-embedded) .llm__content {
717
726
  padding-top: 100px;
718
- padding-bottom: calc(100vh - 240px);
727
+ padding-bottom: min(256px, 40dvh);
719
728
  }
720
729
  @media (min-width: 1024px) {
721
730
  .llm:not(.-embedded) .llm__content {
722
731
  padding-top: 200px;
723
- padding-bottom: calc(100vh - 240px);
732
+ padding-bottom: min(256px, 40dvh);
724
733
  }
725
734
  }
726
735
  .llm:not(.-embedded).-custom-intro .llm__content {
@@ -1091,6 +1100,7 @@ llm-embed {
1091
1100
  color: var(--llm-hint-foreground);
1092
1101
  border: var(--llm-hint-border);
1093
1102
  font-family: var(--llm-hint-font-family);
1103
+ box-shadow: var(--llm-hint-box-shadow);
1094
1104
  backdrop-filter: blur(20px);
1095
1105
  }
1096
1106
  .llm .llm__hint:focus, .llm .llm__hint:focus-visible {
@@ -1109,11 +1119,17 @@ llm-embed {
1109
1119
  }
1110
1120
  .llm .llm__hint-title {
1111
1121
  display: flex;
1112
- align-items: center;
1113
1122
  gap: var(--llm-size-2, 1rem);
1114
1123
  text-transform: uppercase;
1115
1124
  color: var(--llm-hint-title-color, inherit);
1116
1125
  }
1126
+ .llm .llm__hint-title.row {
1127
+ flex-direction: row;
1128
+ align-items: center;
1129
+ }
1130
+ .llm .llm__hint-title.column {
1131
+ flex-direction: column;
1132
+ }
1117
1133
  .llm .llm__hint-title i {
1118
1134
  flex-shrink: 0;
1119
1135
  display: block;
@@ -1137,7 +1153,7 @@ llm-embed {
1137
1153
  .llm .llm__prompt-input {
1138
1154
  position: relative;
1139
1155
  box-shadow: var(--llm-shadow-xs);
1140
- border-radius: 8px;
1156
+ border-radius: var(--llm-input-border-radius, 8px);
1141
1157
  overflow: visible;
1142
1158
  background: var(--llm-input-background);
1143
1159
  width: 100%;
@@ -1200,7 +1216,7 @@ llm-embed {
1200
1216
  font-family: var(--llm-input-font-family);
1201
1217
  font-size: calc(var(--rem, 1rem) * 1);
1202
1218
  line-height: 1.3;
1203
- border-radius: 8px;
1219
+ border-radius: var(--llm-input-border-radius, 8px);
1204
1220
  background: transparent;
1205
1221
  color: var(--llm-input-foreground);
1206
1222
  pointer-events: auto;
@@ -1412,11 +1428,11 @@ llm-embed {
1412
1428
  align-items: center;
1413
1429
  column-gap: 0.35em;
1414
1430
  padding: 0.2em 1em;
1415
- border-radius: 8px;
1416
1431
  margin-bottom: 0.3rem;
1417
1432
  font-size: 12px;
1418
1433
  background: var(--llm-pill-background);
1419
1434
  color: var(--llm-pill-foreground);
1435
+ border-radius: 8px;
1420
1436
  backdrop-filter: blur(20px);
1421
1437
  }
1422
1438
  .llm .llm__prompt-upload-file:focus, .llm .llm__prompt-upload-file:focus-visible {
@@ -1492,8 +1508,8 @@ llm-embed {
1492
1508
  display: flex;
1493
1509
  align-items: center;
1494
1510
  justify-content: center;
1495
- background: var(--llm-trigger-background);
1496
- color: var(--llm-trigger-foreground);
1511
+ background: var(--llm-prompt-submit-background);
1512
+ color: var(--llm-prompt-submit-foreground);
1497
1513
  border-radius: 50%;
1498
1514
  }
1499
1515
  .llm .llm__prompt-submit:focus, .llm .llm__prompt-submit:focus-visible, .llm .llm__prompt-stop:focus, .llm .llm__prompt-stop:focus-visible {
@@ -1622,9 +1638,9 @@ llm-embed {
1622
1638
  line-height: var(--llm-typography-cta2-line-height);
1623
1639
  letter-spacing: var(--llm-typography-cta2-letter-spacing);
1624
1640
  font-size: clamp(var(--llm-typography-cta2-font-size-min) * 1px * var(--s, 1), var(--llm-typography-cta2-font-size-min) * 1px * var(--s, 1) + (var(--u, 1vw) * 100 - 375px) / 1545 * (var(--llm-typography-cta2-font-size-max) - var(--llm-typography-cta2-font-size-min)) * var(--s, 1), var(--llm-typography-cta2-font-size-max) * 1px * var(--s, 1));
1625
- padding: var(--llm-size-1, 0.5rem);
1626
- border-radius: var(--llm-pill-border-radius);
1641
+ padding: var(--llm-pill-padding, 8px);
1627
1642
  border: var(--llm-pill-border);
1643
+ border-radius: var(--llm-pill-border-radius);
1628
1644
  background: var(--llm-pill-background);
1629
1645
  color: var(--llm-pill-foreground);
1630
1646
  font-family: var(--llm-pill-font-family);
package/dist/cjs/index.js CHANGED
@@ -355,6 +355,10 @@ var color = {
355
355
  error: "#ff4848"
356
356
  };
357
357
  var border = "1px solid var(--llm-color-neutral-200)";
358
+ var main = {
359
+ background: "var(--llm-color-background)",
360
+ foreground: "var(--llm-color-foreground)"
361
+ };
358
362
  var canvas = {
359
363
  opacity: 0.8,
360
364
  enabled: true
@@ -391,9 +395,11 @@ var hint = {
391
395
  background: "linear-gradient(rgba(154, 154, 154, 0.2) 10%, rgba(221, 221, 221, 0.1) 80%)",
392
396
  foreground: "var(--llm-color-foreground)",
393
397
  border: "1px solid rgba(237, 237, 237, 0.3)",
394
- borderRadius: "12px"
398
+ borderRadius: "12px",
399
+ boxShadow: "none"
395
400
  };
396
401
  var hintTitle = {
402
+ flexDirection: "row",
397
403
  color: "var(--llm-color-foreground)"
398
404
  };
399
405
  var hintIcon = {
@@ -402,6 +408,7 @@ var hintIcon = {
402
408
  color: "var(--llm-color-foreground)"
403
409
  };
404
410
  var pill = {
411
+ padding: "8px",
405
412
  fontFamily: "var(--llm-font-primary)",
406
413
  background: "rgba(255, 255, 255, 0.2)",
407
414
  foreground: "var(--llm-color-title-foreground)",
@@ -412,7 +419,12 @@ var input = {
412
419
  fontFamily: "var(--llm-font-secondary)",
413
420
  background: "var(--llm-color-neutral-100)",
414
421
  foreground: "var(--llm-color-neutral-900)",
415
- accent: "var(--llm-color-base-100)"
422
+ accent: "var(--llm-color-base-100)",
423
+ borderRadius: "8px"
424
+ };
425
+ var promptSubmit = {
426
+ background: "var(--llm-trigger-background)",
427
+ foreground: "var(--llm-trigger-foreground)"
416
428
  };
417
429
  var checkbox = {
418
430
  border: "2px solid var(--llm-color-neutral-100)"
@@ -472,6 +484,7 @@ var theme = {
472
484
  typography: typography,
473
485
  color: color,
474
486
  border: border,
487
+ main: main,
475
488
  canvas: canvas,
476
489
  chat: chat,
477
490
  trigger: trigger,
@@ -482,6 +495,7 @@ var theme = {
482
495
  hintIcon: hintIcon,
483
496
  pill: pill,
484
497
  input: input,
498
+ promptSubmit: promptSubmit,
485
499
  checkbox: checkbox,
486
500
  user: user,
487
501
  assistant: assistant,
@@ -2727,7 +2741,7 @@ const createLlmViewStore = _ref => {
2727
2741
  set(() => ({
2728
2742
  idle: true
2729
2743
  }));
2730
- }, 6000);
2744
+ }, 8000);
2731
2745
  };
2732
2746
  const handleIdleTimes = () => {
2733
2747
  let to = setIdleTimeout();
@@ -3841,7 +3855,7 @@ const Hints = _ref => {
3841
3855
  const {
3842
3856
  width
3843
3857
  } = bomMixerHooks.useWindowSize();
3844
- useLlm(state => state.app);
3858
+ const theme = useLlm(state => state.theme);
3845
3859
  const {
3846
3860
  send
3847
3861
  } = useLlmView(state => state.actions);
@@ -3859,12 +3873,13 @@ const Hints = _ref => {
3859
3873
  });
3860
3874
  });
3861
3875
  const getCard = (item, index) => {
3876
+ const direction = theme.hintTitle.flexDirection || 'row';
3862
3877
  return jsxRuntime.jsxs("button", {
3863
3878
  type: "button",
3864
3879
  className: "llm__hint",
3865
3880
  onClick: () => onClick(item),
3866
3881
  children: [jsxRuntime.jsxs("div", {
3867
- className: "llm__hint-title -llm-t-label1",
3882
+ className: bomCore.getClassNames('llm__hint-title -llm-t-label1', direction),
3868
3883
  children: [item.icon && jsxRuntime.jsx("i", {
3869
3884
  children: jsxRuntime.jsx("img", {
3870
3885
  src: item.icon.src || item.icon.url,
@@ -4146,11 +4161,15 @@ const Intro = () => {
4146
4161
  }), extendedWelcomeText && (embedded ? jsxRuntime.jsx(framerMotion.motion.h2, {
4147
4162
  variants: motionItem,
4148
4163
  className: "llm__intro-title -llm-t-display2",
4149
- children: extendedWelcomeText
4164
+ dangerouslySetInnerHTML: {
4165
+ __html: extendedWelcomeText
4166
+ }
4150
4167
  }) : jsxRuntime.jsx(framerMotion.motion.h1, {
4151
4168
  variants: motionItem,
4152
4169
  className: "llm__intro-title -llm-t-display2",
4153
- children: extendedWelcomeText
4170
+ dangerouslySetInnerHTML: {
4171
+ __html: extendedWelcomeText
4172
+ }
4154
4173
  }))]
4155
4174
  }), hints.length > 0 && jsxRuntime.jsx(framerMotion.motion.div, {
4156
4175
  variants: motionItem,
@@ -6008,6 +6027,7 @@ const Thread = () => {
6008
6027
 
6009
6028
  const Main = () => {
6010
6029
  const app = useLlm(state => state.app);
6030
+ const theme = useLlm(state => state.theme);
6011
6031
  const messages = useLlm(state => state.messages);
6012
6032
  const introed = useLlmView(state => state.introed);
6013
6033
  const visible = useLlmView(state => state.visible);
@@ -6093,13 +6113,18 @@ const Main = () => {
6093
6113
  className: "llm__content",
6094
6114
  children: [jsxRuntime.jsx(Intro, {}), messages && messages.length > 0 && jsxRuntime.jsx(Thread, {})]
6095
6115
  })
6096
- }), shouldShowPrompt && jsxRuntime.jsx(framerMotion.motion.main, {
6097
- className: "llm__bottom",
6098
- variants: slideIn(1),
6099
- initial: "hidden",
6100
- animate: "show",
6101
- exit: "exit",
6102
- children: jsxRuntime.jsx(Prompt, {})
6116
+ }), shouldShowPrompt && jsxRuntime.jsxs(jsxRuntime.Fragment, {
6117
+ children: [app && !theme.canvas.enabled && jsxRuntime.jsx("div", {
6118
+ className: "llm__underlay",
6119
+ "aria-hidden": true
6120
+ }), jsxRuntime.jsx(framerMotion.motion.main, {
6121
+ className: "llm__bottom",
6122
+ variants: slideIn(1),
6123
+ initial: "hidden",
6124
+ animate: "show",
6125
+ exit: "exit",
6126
+ children: jsxRuntime.jsx(Prompt, {})
6127
+ })]
6103
6128
  })]
6104
6129
  }, "main-container");
6105
6130
  };