@websolutespa/bom-mixer-llm 0.0.10 → 0.0.11
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 +6 -0
- package/dist/cjs/index.css +14 -16
- package/dist/cjs/index.js +44 -70
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.css +14 -16
- package/dist/esm/llm/components/Card/card.js +1 -1
- package/dist/esm/llm/components/Card/card.js.map +1 -1
- package/dist/esm/llm/components/Main/main.js +1 -0
- package/dist/esm/llm/components/Main/main.js.map +1 -1
- package/dist/esm/llm/components/ThronPlayer/thron-player.js +34 -34
- package/dist/esm/llm/components/ThronPlayer/thron-player.js.map +1 -1
- package/dist/esm/llm/llm.js +0 -34
- package/dist/esm/llm/llm.js.map +1 -1
- package/dist/esm/llm/theme.js +8 -1
- package/dist/esm/llm/theme.js.map +1 -1
- package/dist/types/llm/components/Main/main.d.ts.map +1 -1
- package/dist/types/llm/components/ThronPlayer/thron-player.d.ts +1 -1
- package/dist/types/llm/components/ThronPlayer/thron-player.d.ts.map +1 -1
- package/dist/types/llm/llm.d.ts.map +1 -1
- package/dist/types/llm/theme.d.ts +14 -0
- package/dist/types/llm/theme.d.ts.map +1 -1
- package/dist/types/useLlm/mock-app.lfo.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/llm/components/Card/_style.scss +2 -2
- package/src/llm/components/Card/card.tsx +1 -1
- package/src/llm/components/Main/main.tsx +3 -5
- package/src/llm/components/ThronPlayer/_style.scss +3 -2
- package/src/llm/components/ThronPlayer/thron-player.tsx +32 -32
- package/src/llm/components/Trigger/_style.scss +2 -4
- package/src/llm/llm.tsx +0 -35
- package/src/llm/theme.ts +7 -0
- package/src/useLlm/mock-app.lfo.ts +6 -0
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.css
CHANGED
|
@@ -888,8 +888,7 @@ llm-embed {
|
|
|
888
888
|
position: absolute;
|
|
889
889
|
padding: clamp(16px, 16px + (100vw - 375px) / 1545 * (8), 24px);
|
|
890
890
|
width: calc(100vw - 40px);
|
|
891
|
-
|
|
892
|
-
max-width: 460px;
|
|
891
|
+
max-width: var(--llm-popup-max-width);
|
|
893
892
|
left: 50%;
|
|
894
893
|
bottom: calc(100% + 12px);
|
|
895
894
|
translate: -50% 0%;
|
|
@@ -907,8 +906,7 @@ llm-embed {
|
|
|
907
906
|
}
|
|
908
907
|
.llm .llm__trigger-welcome > div + div {
|
|
909
908
|
width: calc(100vw - 40px);
|
|
910
|
-
|
|
911
|
-
max-width: 460px;
|
|
909
|
+
max-width: var(--llm-popup-max-width);
|
|
912
910
|
translate: -50% 10%;
|
|
913
911
|
opacity: 0;
|
|
914
912
|
}
|
|
@@ -1771,7 +1769,7 @@ llm-embed {
|
|
|
1771
1769
|
display: flex;
|
|
1772
1770
|
justify-content: center;
|
|
1773
1771
|
align-items: center;
|
|
1774
|
-
aspect-ratio:
|
|
1772
|
+
aspect-ratio: var(--llm-card-aspect-ratio);
|
|
1775
1773
|
border-radius: 24px;
|
|
1776
1774
|
overflow: hidden;
|
|
1777
1775
|
background: var(--llm-color-neutral-200);
|
|
@@ -1796,7 +1794,7 @@ llm-embed {
|
|
|
1796
1794
|
}
|
|
1797
1795
|
.llm .llm__card--video .llm__card-asset {
|
|
1798
1796
|
border-radius: 0;
|
|
1799
|
-
aspect-ratio:
|
|
1797
|
+
aspect-ratio: var(--llm-card-video-aspect-ratio);
|
|
1800
1798
|
}
|
|
1801
1799
|
.llm .llm__card--full .llm__card-media {
|
|
1802
1800
|
position: absolute;
|
|
@@ -2014,33 +2012,33 @@ llm-embed {
|
|
|
2014
2012
|
cursor: pointer;
|
|
2015
2013
|
}
|
|
2016
2014
|
|
|
2017
|
-
.
|
|
2015
|
+
.llm__thron-player .th-video .th-video-player .th-video-poster {
|
|
2018
2016
|
background-size: cover;
|
|
2019
2017
|
}
|
|
2020
|
-
.
|
|
2021
|
-
.
|
|
2018
|
+
.llm__thron-player .th-player-external-element.th-std-bars,
|
|
2019
|
+
.llm__thron-player .th-player.th-std-bars {
|
|
2022
2020
|
width: 100%;
|
|
2023
2021
|
height: 100%;
|
|
2024
2022
|
border-radius: 0;
|
|
2025
2023
|
margin: 0;
|
|
2026
2024
|
}
|
|
2027
|
-
.
|
|
2025
|
+
.llm__thron-player .th-video .th-video-player .th-display-icon-wrapper {
|
|
2028
2026
|
display: none;
|
|
2029
2027
|
}
|
|
2030
|
-
.
|
|
2028
|
+
.llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal.th-top {
|
|
2031
2029
|
display: none;
|
|
2032
2030
|
}
|
|
2033
|
-
.
|
|
2031
|
+
.llm__thron-player:not(.-enlarged) .th-time-info {
|
|
2034
2032
|
display: none;
|
|
2035
2033
|
}
|
|
2036
|
-
.
|
|
2037
|
-
.
|
|
2034
|
+
.llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal .th-group .th-button,
|
|
2035
|
+
.llm__thron-player:not(.-enlarged) .th-control-bar.th-horizontal .th-group .th-toggle-button:not(.th-fullscreen-button) {
|
|
2038
2036
|
display: none;
|
|
2039
2037
|
}
|
|
2040
|
-
.
|
|
2038
|
+
.llm__thron-player:not(.-enlarged) .th-time-rail {
|
|
2041
2039
|
display: none;
|
|
2042
2040
|
}
|
|
2043
|
-
.
|
|
2041
|
+
.llm__thron-player.-enlarged {
|
|
2044
2042
|
position: fixed;
|
|
2045
2043
|
width: calc(100vw - 40px);
|
|
2046
2044
|
height: calc((100vw - 40px) / 16 * 9);
|
package/dist/cjs/index.js
CHANGED
|
@@ -223,6 +223,9 @@ const defaultTheme = {
|
|
|
223
223
|
foreground: 'var(--llm-color-base-100)',
|
|
224
224
|
boxShadow: '0 0 30px rgba(0, 0, 0, 0.3)'
|
|
225
225
|
},
|
|
226
|
+
popup: {
|
|
227
|
+
maxWidth: '210px'
|
|
228
|
+
},
|
|
226
229
|
hint: {
|
|
227
230
|
fontFamily: 'var(--llm-font-primary)',
|
|
228
231
|
background: 'linear-gradient(rgba(154, 154, 154, 0.2) 10%, rgba(221, 221, 221, 0.1) 80%)',
|
|
@@ -248,7 +251,11 @@ const defaultTheme = {
|
|
|
248
251
|
},
|
|
249
252
|
card: {
|
|
250
253
|
background: 'var(--llm-color-neutral-100)',
|
|
251
|
-
foreground: 'var(--llm-color-neutral-900)'
|
|
254
|
+
foreground: 'var(--llm-color-neutral-900)',
|
|
255
|
+
aspectRatio: '240 / 165'
|
|
256
|
+
},
|
|
257
|
+
cardVideo: {
|
|
258
|
+
aspectRatio: '16 / 9'
|
|
252
259
|
},
|
|
253
260
|
markdown: {
|
|
254
261
|
marginTop: '0.5rem',
|
|
@@ -3688,6 +3695,40 @@ const Dialog = _a => {
|
|
|
3688
3695
|
})) : jsxRuntime.jsx(jsxRuntime.Fragment, {}), portal);
|
|
3689
3696
|
};
|
|
3690
3697
|
|
|
3698
|
+
const StaticNode = _a => {
|
|
3699
|
+
var {
|
|
3700
|
+
outerRef,
|
|
3701
|
+
playing
|
|
3702
|
+
} = _a,
|
|
3703
|
+
props = __rest(_a, ["outerRef", "playing"]);
|
|
3704
|
+
const innerRef = react.useRef(null);
|
|
3705
|
+
react.useEffect(() => {
|
|
3706
|
+
if (innerRef.current && outerRef.current) {
|
|
3707
|
+
outerRef.current.removeAttribute('style');
|
|
3708
|
+
innerRef.current.appendChild(outerRef.current);
|
|
3709
|
+
}
|
|
3710
|
+
}, [innerRef, outerRef]);
|
|
3711
|
+
const onClose = () => {
|
|
3712
|
+
if (typeof props.onClose === 'function') {
|
|
3713
|
+
props.onClose();
|
|
3714
|
+
}
|
|
3715
|
+
};
|
|
3716
|
+
const classNames = bomCore.getClassNames('llm__thron-player', 'llm__video', '-enlarged', {
|
|
3717
|
+
'-playing': playing
|
|
3718
|
+
});
|
|
3719
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3720
|
+
children: [jsxRuntime.jsx("div", {
|
|
3721
|
+
ref: innerRef,
|
|
3722
|
+
className: classNames
|
|
3723
|
+
}), jsxRuntime.jsx("button", {
|
|
3724
|
+
type: "button",
|
|
3725
|
+
className: "llm__video-reduce",
|
|
3726
|
+
onClick: () => onClose(),
|
|
3727
|
+
"aria-label": "Reduce",
|
|
3728
|
+
children: jsxRuntime.jsx(bomMixerIcons.IconLlmMinimize, {})
|
|
3729
|
+
})]
|
|
3730
|
+
});
|
|
3731
|
+
};
|
|
3691
3732
|
const ThronPlayer = props => {
|
|
3692
3733
|
const id = react.useMemo(() => {
|
|
3693
3734
|
return `video-${props.media.xcontentId}-${Math.round(Math.random() * 10000)}`;
|
|
@@ -3814,40 +3855,6 @@ const ThronPlayer = props => {
|
|
|
3814
3855
|
})]
|
|
3815
3856
|
});
|
|
3816
3857
|
};
|
|
3817
|
-
const StaticNode = _a => {
|
|
3818
|
-
var {
|
|
3819
|
-
outerRef,
|
|
3820
|
-
playing
|
|
3821
|
-
} = _a,
|
|
3822
|
-
props = __rest(_a, ["outerRef", "playing"]);
|
|
3823
|
-
const innerRef = react.useRef(null);
|
|
3824
|
-
react.useEffect(() => {
|
|
3825
|
-
if (innerRef.current && outerRef.current) {
|
|
3826
|
-
outerRef.current.removeAttribute('style');
|
|
3827
|
-
innerRef.current.appendChild(outerRef.current);
|
|
3828
|
-
}
|
|
3829
|
-
}, [innerRef, outerRef]);
|
|
3830
|
-
const onClose = () => {
|
|
3831
|
-
if (typeof props.onClose === 'function') {
|
|
3832
|
-
props.onClose();
|
|
3833
|
-
}
|
|
3834
|
-
};
|
|
3835
|
-
const classNames = bomCore.getClassNames('llm__thron-player', 'llm__video', '-enlarged', {
|
|
3836
|
-
'-playing': playing
|
|
3837
|
-
});
|
|
3838
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3839
|
-
children: [jsxRuntime.jsx("div", {
|
|
3840
|
-
ref: innerRef,
|
|
3841
|
-
className: classNames
|
|
3842
|
-
}), jsxRuntime.jsx("button", {
|
|
3843
|
-
type: "button",
|
|
3844
|
-
className: "llm__video-reduce",
|
|
3845
|
-
onClick: () => onClose(),
|
|
3846
|
-
"aria-label": "Reduce",
|
|
3847
|
-
children: jsxRuntime.jsx(bomMixerIcons.IconLlmMinimize, {})
|
|
3848
|
-
})]
|
|
3849
|
-
});
|
|
3850
|
-
};
|
|
3851
3858
|
|
|
3852
3859
|
const VideoPlayer = props => {
|
|
3853
3860
|
const id = react.useId();
|
|
@@ -3977,7 +3984,7 @@ const Card = props => {
|
|
|
3977
3984
|
dangerouslySetInnerHTML: {
|
|
3978
3985
|
__html: props.abstract
|
|
3979
3986
|
}
|
|
3980
|
-
}), props.
|
|
3987
|
+
}), props.cta && props.cta.url && jsxRuntime.jsxs("a", {
|
|
3981
3988
|
className: "llm__card-cta",
|
|
3982
3989
|
href: props.cta.url,
|
|
3983
3990
|
target: "_blank",
|
|
@@ -4885,6 +4892,7 @@ const Main = () => {
|
|
|
4885
4892
|
animate: "show",
|
|
4886
4893
|
exit: "exit",
|
|
4887
4894
|
className: classNames,
|
|
4895
|
+
"data-lenis-prevent": true,
|
|
4888
4896
|
children: [visible && jsxRuntime.jsx(Canvas, {}), !embedded && jsxRuntime.jsx(framerMotion.motion.div, {
|
|
4889
4897
|
className: "llm__top",
|
|
4890
4898
|
variants: slideIn(-1),
|
|
@@ -5007,40 +5015,6 @@ const LlmComponent = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
5007
5015
|
document.documentElement.style.overflow = opened ? 'hidden' : 'auto';
|
|
5008
5016
|
}
|
|
5009
5017
|
}, [opened, embedded]);
|
|
5010
|
-
/*
|
|
5011
|
-
useEffect(() => {
|
|
5012
|
-
if (innerRef.current) {
|
|
5013
|
-
const observer = new MutationObserver((mutations) => {
|
|
5014
|
-
const target = mutations[0].target as HTMLDivElement;
|
|
5015
|
-
const mutatedVars: Partial<LlmVars> = {};
|
|
5016
|
-
Object.entries(vars).forEach(([k, v]) => {
|
|
5017
|
-
const newValue = target.style.getPropertyValue(k);
|
|
5018
|
-
if (v !== newValue) {
|
|
5019
|
-
mutatedVars[k] = newValue;
|
|
5020
|
-
}
|
|
5021
|
-
if (
|
|
5022
|
-
k === '--llm-color-base-100' ||
|
|
5023
|
-
k === '--llm-color-base-200' ||
|
|
5024
|
-
k === '--llm-color-base-300' ||
|
|
5025
|
-
k === '--llm-color-base-400'
|
|
5026
|
-
) {
|
|
5027
|
-
console.log(k, newValue, v);
|
|
5028
|
-
}
|
|
5029
|
-
});
|
|
5030
|
-
if (Object.keys(mutatedVars).length > 0) {
|
|
5031
|
-
setVars(mutatedVars);
|
|
5032
|
-
}
|
|
5033
|
-
});
|
|
5034
|
-
observer.observe(innerRef.current, {
|
|
5035
|
-
attributes: true,
|
|
5036
|
-
attributeFilter: ['style'],
|
|
5037
|
-
});
|
|
5038
|
-
return () => observer.disconnect();
|
|
5039
|
-
} else {
|
|
5040
|
-
return () => { };
|
|
5041
|
-
}
|
|
5042
|
-
}, []);
|
|
5043
|
-
*/
|
|
5044
5018
|
const shouldShowTrigger = !opened && !idle && !embed || (app === null || app === void 0 ? void 0 : app.contents.customIntro) && !introed;
|
|
5045
5019
|
const classNames = bomCore.getClassNames('llm', {
|
|
5046
5020
|
'-open': opened,
|