@websolutespa/bom-llm 0.0.16 → 0.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @websolutespa/bom-llm
2
2
 
3
+ ## 0.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified: theme & cards
8
+
3
9
  ## 0.0.16
4
10
 
5
11
  ### Patch Changes
@@ -1022,8 +1022,7 @@ llm-embed {
1022
1022
  position: absolute;
1023
1023
  padding: clamp(16px, 16px + (100vw - 375px) / 1545 * (8), 24px);
1024
1024
  width: calc(100vw - 40px);
1025
- min-width: 240px;
1026
- max-width: 460px;
1025
+ max-width: var(--llm-popup-max-width);
1027
1026
  left: 50%;
1028
1027
  bottom: calc(100% + 12px);
1029
1028
  translate: -50% 0%;
@@ -1041,8 +1040,7 @@ llm-embed {
1041
1040
  }
1042
1041
  .llm .llm__trigger-welcome > div + div {
1043
1042
  width: calc(100vw - 40px);
1044
- min-width: 240px;
1045
- max-width: 460px;
1043
+ max-width: var(--llm-popup-max-width);
1046
1044
  translate: -50% 10%;
1047
1045
  opacity: 0;
1048
1046
  }
@@ -1905,7 +1903,7 @@ llm-embed {
1905
1903
  display: flex;
1906
1904
  justify-content: center;
1907
1905
  align-items: center;
1908
- aspect-ratio: 240/165;
1906
+ aspect-ratio: var(--llm-card-aspect-ratio);
1909
1907
  border-radius: 24px;
1910
1908
  overflow: hidden;
1911
1909
  background: var(--llm-color-neutral-200);
@@ -1930,7 +1928,7 @@ llm-embed {
1930
1928
  }
1931
1929
  .llm .llm__card--video .llm__card-asset {
1932
1930
  border-radius: 0;
1933
- aspect-ratio: 16/9;
1931
+ aspect-ratio: var(--llm-card-video-aspect-ratio);
1934
1932
  }
1935
1933
  .llm .llm__card--full .llm__card-media {
1936
1934
  position: absolute;
@@ -2148,33 +2146,33 @@ llm-embed {
2148
2146
  cursor: pointer;
2149
2147
  }
2150
2148
 
2151
- .llm .llm__thron-player .th-video .th-video-player .th-video-poster {
2149
+ .llm__thron-player .th-video .th-video-player .th-video-poster {
2152
2150
  background-size: cover;
2153
2151
  }
2154
- .llm .llm__thron-player .th-player-external-element.th-std-bars,
2155
- .llm .llm__thron-player .th-player.th-std-bars {
2152
+ .llm__thron-player .th-player-external-element.th-std-bars,
2153
+ .llm__thron-player .th-player.th-std-bars {
2156
2154
  width: 100%;
2157
2155
  height: 100%;
2158
2156
  border-radius: 0;
2159
2157
  margin: 0;
2160
2158
  }
2161
- .llm .llm__thron-player .th-video .th-video-player .th-display-icon-wrapper {
2159
+ .llm__thron-player .th-video .th-video-player .th-display-icon-wrapper {
2162
2160
  display: none;
2163
2161
  }
2164
- .llm .llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal.th-top {
2162
+ .llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal.th-top {
2165
2163
  display: none;
2166
2164
  }
2167
- .llm .llm__thron-player:not(.-enlarged) .th-time-info {
2165
+ .llm__thron-player:not(.-enlarged) .th-time-info {
2168
2166
  display: none;
2169
2167
  }
2170
- .llm .llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal .th-group .th-button,
2171
- .llm .llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal .th-group .th-toggle-button:not(.th-fullscreen-button) {
2168
+ .llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal .th-group .th-button,
2169
+ .llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal .th-group .th-toggle-button:not(.th-fullscreen-button) {
2172
2170
  display: none;
2173
2171
  }
2174
- .llm .llm__thron-player:not(.-enlarged) .th-time-rail {
2172
+ .llm__thron-player:not(.-enlarged) .th-time-rail {
2175
2173
  display: none;
2176
2174
  }
2177
- .llm .llm__thron-player.-enlarged {
2175
+ .llm__thron-player.-enlarged {
2178
2176
  position: fixed;
2179
2177
  width: calc(100vw - 40px);
2180
2178
  height: calc((100vw - 40px) / 16 * 9);
package/dist/umd/index.js CHANGED
@@ -23083,6 +23083,9 @@
23083
23083
  foreground: 'var(--llm-color-base-100)',
23084
23084
  boxShadow: '0 0 30px rgba(0, 0, 0, 0.3)'
23085
23085
  },
23086
+ popup: {
23087
+ maxWidth: '210px'
23088
+ },
23086
23089
  hint: {
23087
23090
  fontFamily: 'var(--llm-font-primary)',
23088
23091
  background: 'linear-gradient(rgba(154, 154, 154, 0.2) 10%, rgba(221, 221, 221, 0.1) 80%)',
@@ -23108,7 +23111,11 @@
23108
23111
  },
23109
23112
  card: {
23110
23113
  background: 'var(--llm-color-neutral-100)',
23111
- foreground: 'var(--llm-color-neutral-900)'
23114
+ foreground: 'var(--llm-color-neutral-900)',
23115
+ aspectRatio: '240 / 165'
23116
+ },
23117
+ cardVideo: {
23118
+ aspectRatio: '16 / 9'
23112
23119
  },
23113
23120
  markdown: {
23114
23121
  marginTop: '0.5rem',
@@ -27313,6 +27320,40 @@ void main(void) {
27313
27320
  }) : /*#__PURE__*/jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}), portal);
27314
27321
  };
27315
27322
 
27323
+ const StaticNode = _ref => {
27324
+ let {
27325
+ outerRef,
27326
+ playing,
27327
+ ...props
27328
+ } = _ref;
27329
+ const innerRef = reactExports.useRef(null);
27330
+ reactExports.useEffect(() => {
27331
+ if (innerRef.current && outerRef.current) {
27332
+ outerRef.current.removeAttribute('style');
27333
+ innerRef.current.appendChild(outerRef.current);
27334
+ }
27335
+ }, [innerRef, outerRef]);
27336
+ const onClose = () => {
27337
+ if (typeof props.onClose === 'function') {
27338
+ props.onClose();
27339
+ }
27340
+ };
27341
+ const classNames = getClassNames('llm__thron-player', 'llm__video', '-enlarged', {
27342
+ '-playing': playing
27343
+ });
27344
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
27345
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
27346
+ ref: innerRef,
27347
+ className: classNames
27348
+ }), /*#__PURE__*/jsxRuntimeExports.jsx("button", {
27349
+ type: "button",
27350
+ className: "llm__video-reduce",
27351
+ onClick: () => onClose(),
27352
+ "aria-label": "Reduce",
27353
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(IconLlmMinimize, {})
27354
+ })]
27355
+ });
27356
+ };
27316
27357
  const ThronPlayer = props => {
27317
27358
  const id = reactExports.useMemo(() => {
27318
27359
  return `video-${props.media.xcontentId}-${Math.round(Math.random() * 10000)}`;
@@ -27439,40 +27480,6 @@ void main(void) {
27439
27480
  })]
27440
27481
  });
27441
27482
  };
27442
- const StaticNode = _ref => {
27443
- let {
27444
- outerRef,
27445
- playing,
27446
- ...props
27447
- } = _ref;
27448
- const innerRef = reactExports.useRef(null);
27449
- reactExports.useEffect(() => {
27450
- if (innerRef.current && outerRef.current) {
27451
- outerRef.current.removeAttribute('style');
27452
- innerRef.current.appendChild(outerRef.current);
27453
- }
27454
- }, [innerRef, outerRef]);
27455
- const onClose = () => {
27456
- if (typeof props.onClose === 'function') {
27457
- props.onClose();
27458
- }
27459
- };
27460
- const classNames = getClassNames('llm__thron-player', 'llm__video', '-enlarged', {
27461
- '-playing': playing
27462
- });
27463
- return /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
27464
- children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
27465
- ref: innerRef,
27466
- className: classNames
27467
- }), /*#__PURE__*/jsxRuntimeExports.jsx("button", {
27468
- type: "button",
27469
- className: "llm__video-reduce",
27470
- onClick: () => onClose(),
27471
- "aria-label": "Reduce",
27472
- children: /*#__PURE__*/jsxRuntimeExports.jsx(IconLlmMinimize, {})
27473
- })]
27474
- });
27475
- };
27476
27483
 
27477
27484
  const VideoPlayer = props => {
27478
27485
  const id = reactExports.useId();
@@ -27607,7 +27614,7 @@ void main(void) {
27607
27614
  dangerouslySetInnerHTML: {
27608
27615
  __html: props.abstract
27609
27616
  }
27610
- }), props.cardType !== 'full' && props.cta.url && /*#__PURE__*/jsxRuntimeExports.jsxs("a", {
27617
+ }), props.cta && props.cta.url && /*#__PURE__*/jsxRuntimeExports.jsxs("a", {
27611
27618
  className: "llm__card-cta",
27612
27619
  href: props.cta.url,
27613
27620
  target: "_blank",
@@ -30876,6 +30883,7 @@ void main(void) {
30876
30883
  animate: "show",
30877
30884
  exit: "exit",
30878
30885
  className: classNames,
30886
+ "data-lenis-prevent": true,
30879
30887
  children: [visible && /*#__PURE__*/jsxRuntimeExports.jsx(Canvas, {}), !embedded && /*#__PURE__*/jsxRuntimeExports.jsx(motion.div, {
30880
30888
  className: "llm__top",
30881
30889
  variants: slideIn(-1),
@@ -30998,42 +31006,6 @@ void main(void) {
30998
31006
  document.documentElement.style.overflow = opened ? 'hidden' : 'auto';
30999
31007
  }
31000
31008
  }, [opened, embedded]);
31001
-
31002
- /*
31003
- useEffect(() => {
31004
- if (innerRef.current) {
31005
- const observer = new MutationObserver((mutations) => {
31006
- const target = mutations[0].target as HTMLDivElement;
31007
- const mutatedVars: Partial<LlmVars> = {};
31008
- Object.entries(vars).forEach(([k, v]) => {
31009
- const newValue = target.style.getPropertyValue(k);
31010
- if (v !== newValue) {
31011
- mutatedVars[k] = newValue;
31012
- }
31013
- if (
31014
- k === '--llm-color-base-100' ||
31015
- k === '--llm-color-base-200' ||
31016
- k === '--llm-color-base-300' ||
31017
- k === '--llm-color-base-400'
31018
- ) {
31019
- console.log(k, newValue, v);
31020
- }
31021
- });
31022
- if (Object.keys(mutatedVars).length > 0) {
31023
- setVars(mutatedVars);
31024
- }
31025
- });
31026
- observer.observe(innerRef.current, {
31027
- attributes: true,
31028
- attributeFilter: ['style'],
31029
- });
31030
- return () => observer.disconnect();
31031
- } else {
31032
- return () => { };
31033
- }
31034
- }, []);
31035
- */
31036
-
31037
31009
  const shouldShowTrigger = !opened && !idle && !embed || app?.contents.customIntro && !introed;
31038
31010
  const classNames = getClassNames('llm', {
31039
31011
  '-open': opened,