@fluentui-copilot/react-morse-code 0.0.7 → 0.0.9
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.json +43 -1
- package/CHANGELOG.md +22 -2
- package/dist/index.d.ts +10 -2
- package/lib/components/hooks/useAddModule.js +16 -0
- package/lib/components/hooks/useAddModule.js.map +1 -0
- package/lib/components/hooks/useFallbackRef.js +20 -0
- package/lib/components/hooks/useFallbackRef.js.map +1 -0
- package/lib/components/large/MorseCode.js.map +1 -0
- package/lib/components/large/MorseCodeFallback.js +17 -0
- package/lib/components/large/MorseCodeFallback.js.map +1 -0
- package/lib/components/{MorseCodeHoudini.js → large/MorseCodeHoudini.js} +12 -20
- package/lib/components/large/MorseCodeHoudini.js.map +1 -0
- package/lib/components/shared/renderMorseCode.js +11 -0
- package/lib/components/shared/renderMorseCode.js.map +1 -0
- package/lib/components/small/MorseCodeSmall.js +12 -0
- package/lib/components/small/MorseCodeSmall.js.map +1 -0
- package/lib/components/small/MorseCodeSmall.styles.js +21 -0
- package/lib/components/small/MorseCodeSmall.styles.js.map +1 -0
- package/lib/components/small/MorseCodeSmallFallback.js +17 -0
- package/lib/components/small/MorseCodeSmallFallback.js.map +1 -0
- package/lib/components/small/MorseCodeSmallHoudini.js +30 -0
- package/lib/components/small/MorseCodeSmallHoudini.js.map +1 -0
- package/lib/index.js +6 -3
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/hooks/useAddModule.js +29 -0
- package/lib-commonjs/components/hooks/useAddModule.js.map +1 -0
- package/lib-commonjs/components/hooks/useFallbackRef.js +32 -0
- package/lib-commonjs/components/hooks/useFallbackRef.js.map +1 -0
- package/lib-commonjs/components/large/MorseCode.js.map +1 -0
- package/lib-commonjs/components/large/MorseCodeFallback.js +23 -0
- package/lib-commonjs/components/large/MorseCodeFallback.js.map +1 -0
- package/lib-commonjs/components/{MorseCodeHoudini.js → large/MorseCodeHoudini.js} +12 -24
- package/lib-commonjs/components/large/MorseCodeHoudini.js.map +1 -0
- package/lib-commonjs/components/shared/renderMorseCode.js +21 -0
- package/lib-commonjs/components/shared/renderMorseCode.js.map +1 -0
- package/lib-commonjs/components/small/MorseCodeSmall.js +22 -0
- package/lib-commonjs/components/small/MorseCodeSmall.js.map +1 -0
- package/lib-commonjs/components/small/MorseCodeSmall.styles.js +40 -0
- package/lib-commonjs/components/small/MorseCodeSmall.styles.js.map +1 -0
- package/lib-commonjs/components/small/MorseCodeSmallFallback.js +23 -0
- package/lib-commonjs/components/small/MorseCodeSmallFallback.js.map +1 -0
- package/lib-commonjs/components/small/MorseCodeSmallHoudini.js +42 -0
- package/lib-commonjs/components/small/MorseCodeSmallHoudini.js.map +1 -0
- package/lib-commonjs/index.js +15 -3
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -4
- package/lib/components/MorseCode.js.map +0 -1
- package/lib/components/MorseCodeFallback.js +0 -35
- package/lib/components/MorseCodeFallback.js.map +0 -1
- package/lib/components/MorseCodeHoudini.js.map +0 -1
- package/lib/hooks/types.js +0 -2
- package/lib/hooks/types.js.map +0 -1
- package/lib/hooks/useFallbackMorseCode.js +0 -2
- package/lib/hooks/useFallbackMorseCode.js.map +0 -1
- package/lib/hooks/useHoudiniMorseCode.js +0 -2
- package/lib/hooks/useHoudiniMorseCode.js.map +0 -1
- package/lib/hooks/useMorseCode.js +0 -2
- package/lib/hooks/useMorseCode.js.map +0 -1
- package/lib-commonjs/components/MorseCode.js.map +0 -1
- package/lib-commonjs/components/MorseCodeFallback.js +0 -42
- package/lib-commonjs/components/MorseCodeFallback.js.map +0 -1
- package/lib-commonjs/components/MorseCodeHoudini.js.map +0 -1
- package/lib-commonjs/hooks/types.js +0 -5
- package/lib-commonjs/hooks/types.js.map +0 -1
- package/lib-commonjs/hooks/useFallbackMorseCode.js +0 -5
- package/lib-commonjs/hooks/useFallbackMorseCode.js.map +0 -1
- package/lib-commonjs/hooks/useHoudiniMorseCode.js +0 -5
- package/lib-commonjs/hooks/useHoudiniMorseCode.js.map +0 -1
- package/lib-commonjs/hooks/useMorseCode.js +0 -5
- package/lib-commonjs/hooks/useMorseCode.js.map +0 -1
- /package/lib/components/{MorseCode.js → large/MorseCode.js} +0 -0
- /package/lib/components/{MorseCode.styles.js → large/MorseCode.styles.js} +0 -0
- /package/lib/components/{MorseCode.styles.js.map → large/MorseCode.styles.js.map} +0 -0
- /package/lib-commonjs/components/{MorseCode.js → large/MorseCode.js} +0 -0
- /package/lib-commonjs/components/{MorseCode.styles.js → large/MorseCode.styles.js} +0 -0
- /package/lib-commonjs/components/{MorseCode.styles.js.map → large/MorseCode.styles.js.map} +0 -0
|
@@ -8,14 +8,18 @@ Object.defineProperty(exports, "MorseCodeHoudini", {
|
|
|
8
8
|
return MorseCodeHoudini;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
11
|
const _reactcomponents = require("@fluentui/react-components");
|
|
14
|
-
const
|
|
12
|
+
const _useAddModule = require("../hooks/useAddModule");
|
|
15
13
|
const _MorseCodestyles = require("./MorseCode.styles");
|
|
16
14
|
const _morsecode = require("@fluentui-copilot/morse-code");
|
|
17
|
-
const
|
|
15
|
+
const _renderMorseCode = require("../shared/renderMorseCode");
|
|
18
16
|
(0, _morsecode.initializeMorseCodeCustomProperties)();
|
|
17
|
+
const sharedStyles = {
|
|
18
|
+
backgroundImage: _morsecode.morseCodeTokens.backgroundImage,
|
|
19
|
+
animationIterationCount: _morsecode.morseCodeTokens.morseCodeAnimationIterationCount,
|
|
20
|
+
animationDuration: _morsecode.morseCodeTokens.morseCodeAnimationDuration,
|
|
21
|
+
animationTimingFunction: _morsecode.morseCodeTokens.morseCodeAnimationTimingFunction
|
|
22
|
+
};
|
|
19
23
|
const useMorseCodeAnimationClassName = (0, _reactcomponents.__resetStyles)("r1ms8zpq", "rqpk8qn", {
|
|
20
24
|
r: [
|
|
21
25
|
".r1ms8zpq{background-image:paint(morseCode);animation-iteration-count:infinite,infinite;animation-duration:2000ms,2000ms;animation-timing-function:linear,linear;animation-name:rarbvpc,r1i9k8jr;}",
|
|
@@ -29,26 +33,10 @@ const useMorseCodeAnimationClassName = (0, _reactcomponents.__resetStyles)("r1ms
|
|
|
29
33
|
]
|
|
30
34
|
});
|
|
31
35
|
const MorseCodeHoudini = ({ baseUrl = _morsecode.DEFAULT_BASE_URL, fileName = _morsecode.DEFAULT_FILE_URL, className, ...restProps })=>{
|
|
32
|
-
|
|
33
|
-
const path = `${baseUrl}${fileName}`;
|
|
34
|
-
if (!initializedModules[path]) {
|
|
35
|
-
(0, _houdiniutils.addModule)(baseUrl, fileName).then(()=>{
|
|
36
|
-
initializedModules[path] = true;
|
|
37
|
-
}).catch((err)=>{
|
|
38
|
-
initializedModules[path] = false;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}, [
|
|
42
|
-
baseUrl,
|
|
43
|
-
fileName
|
|
44
|
-
]);
|
|
36
|
+
(0, _useAddModule.useAddModule)(baseUrl, fileName);
|
|
45
37
|
const morseCodeStyles = (0, _MorseCodestyles.useMorseCodeStyles)();
|
|
46
38
|
const animationClassName = useMorseCodeAnimationClassName();
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
...restProps
|
|
51
|
-
}, /*#__PURE__*/ _react.createElement("div", {
|
|
52
|
-
className: (0, _reactcomponents.mergeClasses)('fai-MorseCode', 'fai-MorseCodeHoudini', morseCodeStyles.base, animationClassName)
|
|
53
|
-
}));
|
|
39
|
+
const wrapperClassName = (0, _reactcomponents.mergeClasses)(morseCodeStyles.wrapper, className);
|
|
40
|
+
const morseCodeClassName = (0, _reactcomponents.mergeClasses)('fai-MorseCode', 'fai-MorseCodeHoudini', morseCodeStyles.base, animationClassName);
|
|
41
|
+
return (0, _renderMorseCode.renderMorseCode)(wrapperClassName, restProps, morseCodeClassName);
|
|
54
42
|
}; //# sourceMappingURL=MorseCodeHoudini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport {\n initializeMorseCodeCustomProperties,\n morseCodeAnimationTokens,\n morseCodeTokens,\n DEFAULT_BASE_URL,\n DEFAULT_FILE_URL,\n} from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { renderMorseCode } from '../shared/renderMorseCode';\n\ninitializeMorseCodeCustomProperties();\n\nconst sharedStyles = {\n backgroundImage: morseCodeTokens.backgroundImage,\n animationIterationCount: morseCodeTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeTokens.morseCodeAnimationTimingFunction,\n};\n\nconst useMorseCodeAnimationClassName = makeResetStyles({\n ...sharedStyles,\n animationName: [morseCodeAnimationTokens.colorAnimation, morseCodeAnimationTokens.dotsAndDashes],\n\n '@media (forced-colors: active)': {\n ...sharedStyles,\n animationName: [morseCodeAnimationTokens.colorHCAnimation, morseCodeAnimationTokens.dotsAndDashes],\n },\n});\n\nexport const MorseCodeHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_FILE_URL,\n className,\n ...restProps\n}) => {\n useAddModule(baseUrl, fileName);\n\n const morseCodeStyles = useMorseCodeStyles();\n const animationClassName = useMorseCodeAnimationClassName();\n const wrapperClassName = mergeClasses(morseCodeStyles.wrapper, className);\n const morseCodeClassName = mergeClasses(\n 'fai-MorseCode',\n 'fai-MorseCodeHoudini',\n morseCodeStyles.base,\n animationClassName,\n );\n\n return renderMorseCode(wrapperClassName, restProps, morseCodeClassName);\n};\n"],"names":["morseCodeAnimationTokens","initializeMorseCodeCustomProperties","sharedStyles","backgroundImage","morseCodeTokens","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","useMorseCodeAnimationClassName","makeResetStyles","animationName","dotsAndDashes","DEFAULT_BASE_URL","DEFAULT_FILE_URL","useMorseCodeStyles","animationClassName","wrapperClassName","mergeClasses","morseCodeStyles","wrapper","className","morseCodeClassName","MorseCodeHoudini","baseUrl","useAddModule","fileName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA0B2DA;;;eAAAA;;;iCA1BrB;8BACT;iCACM;2BAQ5B;iCAGyB;AAEhCC,IAAAA,8CAAAA;AAEA,MAAMC,eAAe;qBACnBC,0BAAiBC,CAAAA,eAAgBD;6BACjCE,0BAAyBD,CAAAA,gCAAgBE;uBACzCC,0BAAmBH,CAAAA,0BAAgBI;6BACnCC,0BAAyBL,CAAAA,gCAAgBM;AAC3C;AAEA,MAAMC,iCAAiCC,IAAAA,8BAAAA,EAAAA,YAAgB,WAAA;OACrD;QAAA;QAAe;QAAA;QAAA;KAAA;OACfC;QAAAA;QAAe;KAAA;;MAA0Cb,mBAAAA,CAAyBc,YAAcC,2BAAA,aAEhGC,2BAAA,WACKd;kCACwDF,EAAAA,SAAAA;4BAAuCiB,IAAAA,mCAAA;UACpGC,qBAAAP;IACF,MAAAQ,mBAAAC,IAAAA,6BAAA,EAAAC,gBAAAC,OAAA,EAAAC;IAEA,MAAOC,qBAAMC,IAAAA,6BACXC,EAAAA,iBAAUX,wBACCC,gBACXO,IACA,EAAAL;WAEAS,IAAAA,gCAAaD,EAAAA,kBAASE,WAAAA;+CAGKjB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderMorseCode", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderMorseCode;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const renderMorseCode = (wrapperClassName, wrapperProps, morseCodeClassName, targetRef)=>{
|
|
14
|
+
return /*#__PURE__*/ _react.createElement("div", {
|
|
15
|
+
className: wrapperClassName,
|
|
16
|
+
...wrapperProps
|
|
17
|
+
}, /*#__PURE__*/ _react.createElement("div", {
|
|
18
|
+
ref: targetRef,
|
|
19
|
+
className: morseCodeClassName
|
|
20
|
+
}));
|
|
21
|
+
}; //# sourceMappingURL=renderMorseCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderMorseCode.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const renderMorseCode = (\n wrapperClassName: string,\n wrapperProps: React.HTMLAttributes<HTMLDivElement>,\n morseCodeClassName: string,\n targetRef?: (node: HTMLElement | null) => void,\n) => {\n return (\n <div className={wrapperClassName} {...wrapperProps}>\n <div ref={targetRef} className={morseCodeClassName} />\n </div>\n );\n};\n"],"names":["renderMorseCode","wrapperClassName","wrapperProps","morseCodeClassName","targetRef","React","createElement","div","className","ref"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;;iEAFU;AAEhB,MAAMA,kBAAkB,CAC7BC,kBACAC,cACAC,oBACAC;WAEA,WAAA,GAAAC,OACEC,aAAA,CAAA,OAACC;mBAAIC;uBAAiCN;4BACpCI,aAAA,CAAA,OAACC;aAAIE;mBAAgBD;;AAG3B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "MorseCodeSmall", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return MorseCodeSmall;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _houdiniutils = require("@fluentui-contrib/houdini-utils");
|
|
14
|
+
const _MorseCodeSmallFallback = require("./MorseCodeSmallFallback");
|
|
15
|
+
const _MorseCodeSmallHoudini = require("./MorseCodeSmallHoudini");
|
|
16
|
+
const houdiniAvailable = (0, _houdiniutils.hasHoudini)();
|
|
17
|
+
const MorseCodeSmall = (props)=>{
|
|
18
|
+
if (houdiniAvailable) {
|
|
19
|
+
return /*#__PURE__*/ _react.createElement(_MorseCodeSmallHoudini.MorseCodeSmallHoudini, props);
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/ _react.createElement(_MorseCodeSmallFallback.MorseCodeSmallFallback, props);
|
|
22
|
+
}; //# sourceMappingURL=MorseCodeSmall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MorseCodeSmall.tsx"],"sourcesContent":["import * as React from 'react';\nimport { hasHoudini } from '@fluentui-contrib/houdini-utils';\nimport { MorseCodeSmallFallback } from './MorseCodeSmallFallback';\nimport { MorseCodeSmallHoudini } from './MorseCodeSmallHoudini';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\n\nconst houdiniAvailable = hasHoudini();\n\nexport const MorseCodeSmall: React.FC<MorseCodeProps> = props => {\n if (houdiniAvailable) {\n return <MorseCodeSmallHoudini {...props} />;\n }\n\n return <MorseCodeSmallFallback {...props} />;\n};\n"],"names":["MorseCodeSmall","houdiniAvailable","hasHoudini","props","React","createElement","MorseCodeSmallHoudini","MorseCodeSmallFallback"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;8BACI;wCACY;uCACD;AAItC,MAAMC,mBAAmBC,IAAAA,wBAAAA;AAElB,MAAMF,iBAA2CG,CAAAA;QACtDF,kBAAIA;eACF,WAAA,GAAAG,OAAOC,aAAA,CAAAC,4CAACA,EAAAA;;WAGV,WAAA,GAAAF,OAAOC,aAAA,CAAAE,8CAACA,EAAAA;AACV"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useMorseCodeSmallStyles", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useMorseCodeSmallStyles;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const useMorseCodeSmallStyles = (0, _reactcomponents.__styles)({
|
|
13
|
+
base: {
|
|
14
|
+
B3jt8gx: "fziq3oc",
|
|
15
|
+
Bcicc91: "f10hrr0e",
|
|
16
|
+
sshi5w: "f1csse87",
|
|
17
|
+
Bvjb7m6: "fdgv6k0",
|
|
18
|
+
jekbwv: "f1x4gczw",
|
|
19
|
+
B20m2qn: "f1mvgrou",
|
|
20
|
+
It5emp: "f1p87gnb"
|
|
21
|
+
},
|
|
22
|
+
wrapper: {
|
|
23
|
+
a9b677: "fly5x3f",
|
|
24
|
+
Bqenvij: "f1l02sjl"
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
t: [
|
|
28
|
+
"@supports (aspect-ratio: 10 / 1){.fziq3oc{aspect-ratio:10/1;}}",
|
|
29
|
+
"@supports not (aspect-ratio: 10 / 1){.f10hrr0e{padding-top:10%;}}"
|
|
30
|
+
],
|
|
31
|
+
d: [
|
|
32
|
+
".f1csse87{min-height:5px;}",
|
|
33
|
+
".fdgv6k0{forced-color-adjust:none;}",
|
|
34
|
+
".f1x4gczw{--fai-morse-code-color-stop-1:0%;}",
|
|
35
|
+
".f1mvgrou{--fai-morse-code-color-stop-2:50%;}",
|
|
36
|
+
".f1p87gnb{--fai-morse-code-color-stop-3:100%;}",
|
|
37
|
+
".fly5x3f{width:100%;}",
|
|
38
|
+
".f1l02sjl{height:100%;}"
|
|
39
|
+
]
|
|
40
|
+
}); //# sourceMappingURL=MorseCodeSmall.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MorseCodeSmall.styles.ts"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nimport { morseCodeSmallTokens } from '@fluentui-copilot/morse-code';\n\nexport const useMorseCodeSmallStyles = makeStyles({\n base: {\n '@supports (aspect-ratio: 10 / 1)': {\n aspectRatio: morseCodeSmallTokens.morseCodeAspectRatio,\n },\n '@supports not (aspect-ratio: 10 / 1)': {\n paddingTop: morseCodeSmallTokens.morseCodeAspectRatioFallbackPaddingTop,\n },\n minHeight: '5px',\n forcedColorAdjust: 'none',\n '--fai-morse-code-color-stop-1': morseCodeSmallTokens.morseCodeColorStop1,\n '--fai-morse-code-color-stop-2': morseCodeSmallTokens.morseCodeColorStop2,\n '--fai-morse-code-color-stop-3': morseCodeSmallTokens.morseCodeColorStop3,\n },\n wrapper: {\n width: '100%',\n height: '100%',\n },\n});\n"],"names":["useMorseCodeSmallStyles","makeStyles","base","aspectRatio","paddingTop","minHeight"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGaA;;;eAAAA;;;iCAHM;AAGZ,MAAMA,0BAA0BC,IAAAA,yBAAAA,EAAAA;UACrCC;iBACE;iBACEC;gBACF;iBACA;gBACEC;iBACF;gBACAC;;aAEA;gBACA;iBACA;;;;;QAGO;KAAA;;;QACC;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAEZ,iDAAG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "MorseCodeSmallFallback", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return MorseCodeSmallFallback;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const _morsecode = require("@fluentui-copilot/morse-code");
|
|
13
|
+
const _MorseCodeSmallstyles = require("./MorseCodeSmall.styles");
|
|
14
|
+
const _useFallbackRef = require("../hooks/useFallbackRef");
|
|
15
|
+
const _renderMorseCode = require("../shared/renderMorseCode");
|
|
16
|
+
const MorseCodeSmallFallback = (props)=>{
|
|
17
|
+
const morseCodeStyles = (0, _MorseCodeSmallstyles.useMorseCodeSmallStyles)();
|
|
18
|
+
const targetRef = (0, _useFallbackRef.useFallbackRef)(_morsecode.morseCodeSmall);
|
|
19
|
+
const { className, ...restProps } = props;
|
|
20
|
+
const wrapperClassName = (0, _reactcomponents.mergeClasses)(morseCodeStyles.wrapper, className);
|
|
21
|
+
const morseCodeClassName = (0, _reactcomponents.mergeClasses)('fai-MorseCodeSmall', 'fai-MorseCodeSmallFallback', morseCodeStyles.base);
|
|
22
|
+
return (0, _renderMorseCode.renderMorseCode)(wrapperClassName, restProps, morseCodeClassName, targetRef);
|
|
23
|
+
}; //# sourceMappingURL=MorseCodeSmallFallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MorseCodeSmallFallback.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport { morseCodeSmall } from '@fluentui-copilot/morse-code';\nimport { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { useFallbackRef } from '../hooks/useFallbackRef';\nimport { renderMorseCode } from '../shared/renderMorseCode';\n\nexport const MorseCodeSmallFallback: React.FC<MorseCodeProps> = props => {\n const morseCodeStyles = useMorseCodeSmallStyles();\n\n const targetRef = useFallbackRef(morseCodeSmall);\n const { className, ...restProps } = props;\n const wrapperClassName = mergeClasses(morseCodeStyles.wrapper, className);\n const morseCodeClassName = mergeClasses('fai-MorseCodeSmall', 'fai-MorseCodeSmallFallback', morseCodeStyles.base);\n\n return renderMorseCode(wrapperClassName, restProps, morseCodeClassName, targetRef);\n};\n"],"names":["MorseCodeSmallFallback","props","morseCodeStyles","useMorseCodeSmallStyles","targetRef","useFallbackRef","morseCodeSmall","className","wrapperClassName","restProps","mergeClasses","wrapper"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;iCARgB;2BACE;sCACS;gCAGT;iCACC;AAEzB,MAAMA,yBAAmDC,CAAAA;UAC9DC,kBAAMA,IAAAA,6CAAkBC;UAExBC,YAAMA,IAAAA,8BAAYC,EAAAA,yBAAeC;UACjC,EACAC,SAAMC,EACN,GAAAC,cAEAR;IACA,MAAAO,mBAAAE,IAAAA,6BAAA,EAAAR,gBAAAS,OAAA,EAAAJ"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "MorseCodeSmallHoudini", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return MorseCodeSmallHoudini;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const _useAddModule = require("../hooks/useAddModule");
|
|
13
|
+
const _MorseCodeSmallstyles = require("./MorseCodeSmall.styles");
|
|
14
|
+
const _morsecode = require("@fluentui-copilot/morse-code");
|
|
15
|
+
const _renderMorseCode = require("../shared/renderMorseCode");
|
|
16
|
+
(0, _morsecode.initializeMorseCodeSmallCustomProperties)();
|
|
17
|
+
const sharedStyles = {
|
|
18
|
+
backgroundImage: _morsecode.morseCodeSmallTokens.backgroundImage,
|
|
19
|
+
animationIterationCount: _morsecode.morseCodeSmallTokens.morseCodeAnimationIterationCount,
|
|
20
|
+
animationDuration: _morsecode.morseCodeSmallTokens.morseCodeAnimationDuration,
|
|
21
|
+
animationTimingFunction: _morsecode.morseCodeSmallTokens.morseCodeAnimationTimingFunction
|
|
22
|
+
};
|
|
23
|
+
const useMorseCodeAnimationClassName = (0, _reactcomponents.__resetStyles)("r1qt6fj8", "rfhkifx", {
|
|
24
|
+
r: [
|
|
25
|
+
".r1qt6fj8{background-image:paint(morseCodeSmall);animation-iteration-count:infinite,infinite;animation-duration:2000ms,2000ms;animation-timing-function:linear,linear;animation-name:rarbvpc,r14jeaho;}",
|
|
26
|
+
"@keyframes rarbvpc{0%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode1);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode2);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode3);}20%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode1);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode2);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode3);}33%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode4);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode5);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode6);}50%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode4);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode5);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode6);}66%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode7);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode8);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode9);}80%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode7);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode8);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode9);}100%{--fai-morse-code-gradient-color-1:var(--colorBrandMorseCode1);--fai-morse-code-gradient-color-2:var(--colorBrandMorseCode2);--fai-morse-code-gradient-color-3:var(--colorBrandMorseCode3);}}",
|
|
27
|
+
"@keyframes r14jeaho{0%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:60px;--fai-morse-code-small-x-position-2:56px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:132px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:220px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:240px;--fai-morse-code-small-opacity-5:0;}10%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:60px;--fai-morse-code-small-x-position-2:56px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:132px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:220px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:240px;--fai-morse-code-small-opacity-5:0;}25%{--fai-morse-code-small-width-1:40px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:72px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:50px;--fai-morse-code-small-x-position-3:102px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:162px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}35%{--fai-morse-code-small-width-1:40px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:72px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:50px;--fai-morse-code-small-x-position-3:102px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:162px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}50%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:30px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:60px;--fai-morse-code-small-x-position-3:60px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:132px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}60%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:30px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:60px;--fai-morse-code-small-x-position-3:60px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:132px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}75%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:56px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:60px;--fai-morse-code-small-x-position-4:92px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}85%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:56px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:60px;--fai-morse-code-small-x-position-4:92px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}100%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:0px;--fai-morse-code-small-opacity-2:0;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:20px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:60px;--fai-morse-code-small-x-position-4:56px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:132px;--fai-morse-code-small-opacity-5:1;}}",
|
|
28
|
+
".rfhkifx{background-image:paint(morseCodeSmall);animation-iteration-count:infinite,infinite;animation-duration:2000ms,2000ms;animation-timing-function:linear,linear;animation-name:rarbvpc,r14jeaho;}"
|
|
29
|
+
],
|
|
30
|
+
s: [
|
|
31
|
+
"@media (forced-colors: active){.r1qt6fj8{background-image:paint(morseCodeSmall);animation-iteration-count:infinite,infinite;animation-duration:2000ms,2000ms;animation-timing-function:linear,linear;animation-name:r9zjrdo,r14jeaho;}@keyframes r9zjrdo{0%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode1);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode2);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode3);}20%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode1);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode2);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode3);}33%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode4);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode5);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode6);}50%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode4);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode5);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode6);}66%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode7);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode8);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode9);}80%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode7);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode8);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode9);}100%{--fai-morse-code-gradient-color-1:var(--colorHCMorseCode1);--fai-morse-code-gradient-color-2:var(--colorHCMorseCode2);--fai-morse-code-gradient-color-3:var(--colorHCMorseCode3);}}@keyframes r14jeaho{0%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:60px;--fai-morse-code-small-x-position-2:56px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:132px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:220px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:240px;--fai-morse-code-small-opacity-5:0;}10%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:60px;--fai-morse-code-small-x-position-2:56px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:132px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:220px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:240px;--fai-morse-code-small-opacity-5:0;}25%{--fai-morse-code-small-width-1:40px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:72px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:50px;--fai-morse-code-small-x-position-3:102px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:162px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}35%{--fai-morse-code-small-width-1:40px;--fai-morse-code-small-x-position-1:20px;--fai-morse-code-small-opacity-1:1;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:72px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:50px;--fai-morse-code-small-x-position-3:102px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:162px;--fai-morse-code-small-opacity-4:0;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}50%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:30px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:60px;--fai-morse-code-small-x-position-3:60px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:132px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}60%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:30px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:60px;--fai-morse-code-small-x-position-3:60px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:20px;--fai-morse-code-small-x-position-4:132px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}75%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:56px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:60px;--fai-morse-code-small-x-position-4:92px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}85%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:20px;--fai-morse-code-small-opacity-2:1;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:56px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:60px;--fai-morse-code-small-x-position-4:92px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:162px;--fai-morse-code-small-opacity-5:0;}100%{--fai-morse-code-small-width-1:20px;--fai-morse-code-small-x-position-1:0px;--fai-morse-code-small-opacity-1:0;--fai-morse-code-small-width-2:20px;--fai-morse-code-small-x-position-2:0px;--fai-morse-code-small-opacity-2:0;--fai-morse-code-small-width-3:20px;--fai-morse-code-small-x-position-3:20px;--fai-morse-code-small-opacity-3:1;--fai-morse-code-small-width-4:60px;--fai-morse-code-small-x-position-4:56px;--fai-morse-code-small-opacity-4:1;--fai-morse-code-small-width-5:20px;--fai-morse-code-small-x-position-5:132px;--fai-morse-code-small-opacity-5:1;}}}",
|
|
32
|
+
"@media (forced-colors: active){.rfhkifx{background-image:paint(morseCodeSmall);animation-iteration-count:infinite,infinite;animation-duration:2000ms,2000ms;animation-timing-function:linear,linear;animation-name:r9zjrdo,r14jeaho;}}"
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
const MorseCodeSmallHoudini = ({ baseUrl = _morsecode.DEFAULT_BASE_URL, fileName = _morsecode.DEFAULT_SMALL_FILE_URL, className, ...restProps })=>{
|
|
36
|
+
(0, _useAddModule.useAddModule)(baseUrl, fileName);
|
|
37
|
+
const morseCodeSmallStyles = (0, _MorseCodeSmallstyles.useMorseCodeSmallStyles)();
|
|
38
|
+
const animationClassName = useMorseCodeAnimationClassName();
|
|
39
|
+
const wrapperClassName = (0, _reactcomponents.mergeClasses)(morseCodeSmallStyles.wrapper, className);
|
|
40
|
+
const morseCodeClassName = (0, _reactcomponents.mergeClasses)('fai-MorseCodeSmall', 'fai-MorseCodeSmallHoudini', morseCodeSmallStyles.base, animationClassName);
|
|
41
|
+
return (0, _renderMorseCode.renderMorseCode)(wrapperClassName, restProps, morseCodeClassName);
|
|
42
|
+
}; //# sourceMappingURL=MorseCodeSmallHoudini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MorseCodeSmallHoudini.tsx"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\n morseCodeSmallAnimationTokens,\n morseCodeSmallTokens,\n DEFAULT_BASE_URL,\n DEFAULT_SMALL_FILE_URL,\n} from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { renderMorseCode } from '../shared/renderMorseCode';\n\ninitializeMorseCodeSmallCustomProperties();\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nconst useMorseCodeAnimationClassName = makeResetStyles({\n ...sharedStyles,\n animationName: [morseCodeSmallAnimationTokens.colorAnimation, morseCodeSmallAnimationTokens.dotsAndDashes],\n\n '@media (forced-colors: active)': {\n ...sharedStyles,\n animationName: [morseCodeSmallAnimationTokens.colorHCAnimation, morseCodeSmallAnimationTokens.dotsAndDashes],\n },\n});\n\nexport const MorseCodeSmallHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_SMALL_FILE_URL,\n className,\n ...restProps\n}) => {\n useAddModule(baseUrl, fileName);\n\n const morseCodeSmallStyles = useMorseCodeSmallStyles();\n const animationClassName = useMorseCodeAnimationClassName();\n const wrapperClassName = mergeClasses(morseCodeSmallStyles.wrapper, className);\n const morseCodeClassName = mergeClasses(\n 'fai-MorseCodeSmall',\n 'fai-MorseCodeSmallHoudini',\n morseCodeSmallStyles.base,\n animationClassName,\n );\n\n return renderMorseCode(wrapperClassName, restProps, morseCodeClassName);\n};\n"],"names":["morseCodeSmallAnimationTokens","initializeMorseCodeSmallCustomProperties","sharedStyles","backgroundImage","morseCodeSmallTokens","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","useMorseCodeAnimationClassName","makeResetStyles","animationName","dotsAndDashes","DEFAULT_BASE_URL","DEFAULT_SMALL_FILE_URL","useMorseCodeSmallStyles","animationClassName","wrapperClassName","mergeClasses","morseCodeSmallStyles","wrapper","className","morseCodeClassName","MorseCodeSmallHoudini","baseUrl","base","restProps","useAddModule","fileName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA0BgEA;;;eAAAA;;;iCA1B1B;8BACT;sCACW;2BAQjC;iCAGyB;AAEhCC,IAAAA,mDAAAA;AAEA,MAAMC,eAAe;qBACnBC,+BAAiBC,CAAAA,eAAqBD;6BACtCE,+BAAyBD,CAAAA,gCAAqBE;uBAC9CC,+BAAmBH,CAAAA,0BAAqBI;6BACxCC,+BAAyBL,CAAAA,gCAAqBM;AAChD;AAEA,MAAMC,iCAAiCC,IAAAA,8BAAAA,EAAAA,YAAgB,WAAA;OACrD;QAAA;QAAe;QAAA;QAAA;KAAA;OACfC;QAAAA;QAAe;KAAA;;MAA+Cb,wBAAAA,CAA8Bc,YAAcC,2BAAA,aAE1GC,iCAAA,WACKd;kCAC6DF,EAAAA,SAAAA;iCAA4CiB,IAAAA,6CAAA;UAC9GC,qBAAAP;IACF,MAAAQ,mBAAAC,IAAAA,6BAAA,EAAAC,qBAAAC,OAAA,EAAAC;IAEA,MAAOC,qBAAMC,IAAAA,6BACXC,EAAAA,sBAAUX,6BACCC,qBAEXW,IAAGC,EAAAA;WAEHC,IAAAA,gCAAaH,EAAAA,kBAASI,WAAAA;oDAGKnB"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -17,9 +17,21 @@ _export(exports, {
|
|
|
17
17
|
},
|
|
18
18
|
MorseCodeHoudini: function() {
|
|
19
19
|
return _MorseCodeHoudini.MorseCodeHoudini;
|
|
20
|
+
},
|
|
21
|
+
MorseCodeSmall: function() {
|
|
22
|
+
return _MorseCodeSmall.MorseCodeSmall;
|
|
23
|
+
},
|
|
24
|
+
MorseCodeSmallFallback: function() {
|
|
25
|
+
return _MorseCodeSmallFallback.MorseCodeSmallFallback;
|
|
26
|
+
},
|
|
27
|
+
MorseCodeSmallHoudini: function() {
|
|
28
|
+
return _MorseCodeSmallHoudini.MorseCodeSmallHoudini;
|
|
20
29
|
}
|
|
21
30
|
});
|
|
22
|
-
const _MorseCode = require("./components/MorseCode");
|
|
23
|
-
const _MorseCodeFallback = require("./components/MorseCodeFallback");
|
|
24
|
-
const _MorseCodeHoudini = require("./components/MorseCodeHoudini");
|
|
31
|
+
const _MorseCode = require("./components/large/MorseCode");
|
|
32
|
+
const _MorseCodeFallback = require("./components/large/MorseCodeFallback");
|
|
33
|
+
const _MorseCodeHoudini = require("./components/large/MorseCodeHoudini");
|
|
34
|
+
const _MorseCodeSmall = require("./components/small/MorseCodeSmall");
|
|
35
|
+
const _MorseCodeSmallFallback = require("./components/small/MorseCodeSmallFallback");
|
|
36
|
+
const _MorseCodeSmallHoudini = require("./components/small/MorseCodeSmallHoudini");
|
|
25
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { MorseCode } from './components/MorseCode';\nexport { MorseCodeFallback } from './components/MorseCodeFallback';\nexport { MorseCodeHoudini } from './components/MorseCodeHoudini';\n\nexport type { MorseCodeProps } from './components/MorseCode.types';\n"],"names":["MorseCode","MorseCodeFallback","MorseCodeHoudini"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { MorseCode } from './components/large/MorseCode';\nexport { MorseCodeFallback } from './components/large/MorseCodeFallback';\nexport { MorseCodeHoudini } from './components/large/MorseCodeHoudini';\n\nexport { MorseCodeSmall } from './components/small/MorseCodeSmall';\nexport { MorseCodeSmallFallback } from './components/small/MorseCodeSmallFallback';\nexport { MorseCodeSmallHoudini } from './components/small/MorseCodeSmallHoudini';\n\nexport type { MorseCodeProps } from './components/MorseCode.types';\n"],"names":["MorseCode","MorseCodeFallback","MorseCodeHoudini","MorseCodeSmall","MorseCodeSmallFallback","MorseCodeSmallHoudini"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,SAAS;eAATA,oBAAS;;IACTC,iBAAiB;eAAjBA,oCAAiB;;IACjBC,gBAAgB;eAAhBA,kCAAgB;;IAEhBC,cAAc;eAAdA,8BAAc;;IACdC,sBAAsB;eAAtBA,8CAAsB;;IACtBC,qBAAqB;eAArBA,4CAAqB;;;2BANJ;mCACQ;kCACD;gCAEF;wCACQ;uCACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-morse-code",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "A Fluent AI package",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@fluentui-contrib/houdini-utils": "0.3.5",
|
|
16
|
-
"@fluentui-copilot/morse-code": "^0.0.
|
|
16
|
+
"@fluentui-copilot/morse-code": "^0.0.8",
|
|
17
17
|
"@swc/helpers": "^0.5.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@fluentui/react-components": ">=9.
|
|
21
|
-
"@fluentui/react-jsx-runtime": ">=9.
|
|
20
|
+
"@fluentui/react-components": ">=9.66.0 <10.0.0",
|
|
21
|
+
"@fluentui/react-jsx-runtime": ">=9.1.1 <10.0.0",
|
|
22
22
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
23
23
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|
|
24
24
|
"react": ">=16.14.0 <19.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["MorseCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport { hasHoudini } from '@fluentui-contrib/houdini-utils';\nimport { MorseCodeFallback } from './MorseCodeFallback';\nimport { MorseCodeHoudini } from './MorseCodeHoudini';\n\nimport type { MorseCodeProps } from './MorseCode.types';\n\nconst houdiniAvailable = hasHoudini();\n\nexport const MorseCode: React.FC<MorseCodeProps> = props => {\n if (houdiniAvailable) {\n return <MorseCodeHoudini {...props} />;\n }\n\n return <MorseCodeFallback {...props} />;\n};\n"],"names":["React","hasHoudini","MorseCodeFallback","MorseCodeHoudini","houdiniAvailable","MorseCode","props"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,UAAU,QAAQ,kCAAkC;AAC7D,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,gBAAgB,QAAQ,qBAAqB;AAItD,MAAMC,mBAAmBH;AAEzB,OAAO,MAAMI,YAAsCC,CAAAA;IACjD,IAAIF,kBAAkB;QACpB,qBAAO,oBAACD,kBAAqBG;IAC/B;IAEA,qBAAO,oBAACJ,mBAAsBI;AAChC,EAAE"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { mergeClasses } from '@fluentui/react-components';
|
|
3
|
-
import { morseCode } from '@fluentui-copilot/morse-code';
|
|
4
|
-
import { useMorseCodeStyles } from './MorseCode.styles';
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
6
|
-
const ON_COMPLETE_NOOP = () => {};
|
|
7
|
-
export const MorseCodeFallback = props => {
|
|
8
|
-
const morseCodeStyles = useMorseCodeStyles();
|
|
9
|
-
const targetRef = React.useCallback(node => {
|
|
10
|
-
let animControls;
|
|
11
|
-
if (node) {
|
|
12
|
-
animControls = morseCode(node);
|
|
13
|
-
animControls.play(ON_COMPLETE_NOOP);
|
|
14
|
-
} else {
|
|
15
|
-
if (animControls) {
|
|
16
|
-
animControls.stop();
|
|
17
|
-
animControls.cleanup();
|
|
18
|
-
animControls = undefined;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}, []);
|
|
22
|
-
const {
|
|
23
|
-
className,
|
|
24
|
-
...restProps
|
|
25
|
-
} = props;
|
|
26
|
-
const cn = mergeClasses(morseCodeStyles.wrapper, className);
|
|
27
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: cn,
|
|
29
|
-
...restProps
|
|
30
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
ref: targetRef,
|
|
32
|
-
className: mergeClasses('fai-MorseCode', 'fai-MorseCodeFallback', morseCodeStyles.base)
|
|
33
|
-
}));
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=MorseCodeFallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["MorseCodeFallback.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { morseCode } from '@fluentui-copilot/morse-code';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport type { MorseCodeProps } from './MorseCode.types';\n\ntype FallbackAnimation = ReturnType<typeof morseCode>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst ON_COMPLETE_NOOP = () => {};\n\nexport const MorseCodeFallback: React.FC<MorseCodeProps> = props => {\n const morseCodeStyles = useMorseCodeStyles();\n\n const targetRef = React.useCallback((node: HTMLElement | null) => {\n let animControls: FallbackAnimation | undefined;\n\n if (node) {\n animControls = morseCode(node);\n animControls.play(ON_COMPLETE_NOOP);\n } else {\n if (animControls) {\n animControls.stop();\n animControls.cleanup();\n animControls = undefined;\n }\n }\n }, []);\n\n const { className, ...restProps } = props;\n const cn = mergeClasses(morseCodeStyles.wrapper, className);\n\n return (\n <div className={cn} {...restProps}>\n <div ref={targetRef} className={mergeClasses('fai-MorseCode', 'fai-MorseCodeFallback', morseCodeStyles.base)} />\n </div>\n );\n};\n"],"names":["React","mergeClasses","morseCode","useMorseCodeStyles","ON_COMPLETE_NOOP","MorseCodeFallback","props","morseCodeStyles","targetRef","useCallback","node","animControls","play","stop","cleanup","undefined","className","restProps","cn","wrapper","div","ref","base"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,kBAAkB,QAAQ,qBAAqB;AAMxD,gEAAgE;AAChE,MAAMC,mBAAmB,KAAO;AAEhC,OAAO,MAAMC,oBAA8CC,CAAAA;IACzD,MAAMC,kBAAkBJ;IAExB,MAAMK,YAAYR,MAAMS,WAAW,CAAC,CAACC;QACnC,IAAIC;QAEJ,IAAID,MAAM;YACRC,eAAeT,UAAUQ;YACzBC,aAAaC,IAAI,CAACR;QACpB,OAAO;YACL,IAAIO,cAAc;gBAChBA,aAAaE,IAAI;gBACjBF,aAAaG,OAAO;gBACpBH,eAAeI;YACjB;QACF;IACF,GAAG,EAAE;IAEL,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGX;IACpC,MAAMY,KAAKjB,aAAaM,gBAAgBY,OAAO,EAAEH;IAEjD,qBACE,oBAACI;QAAIJ,WAAWE;QAAK,GAAGD,SAAS;qBAC/B,oBAACG;QAAIC,KAAKb;QAAWQ,WAAWf,aAAa,iBAAiB,yBAAyBM,gBAAgBe,IAAI;;AAGjH,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { addModule } from '@fluentui-contrib/houdini-utils';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport {\n initializeMorseCodeCustomProperties,\n morseCodeAnimationTokens,\n morseCodeTokens,\n DEFAULT_BASE_URL,\n DEFAULT_FILE_URL,\n} from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from './MorseCode.types';\n\nconst initializedModules = {} as Record<string, boolean>;\n\ninitializeMorseCodeCustomProperties();\n\nconst useMorseCodeAnimationClassName = makeResetStyles({\n backgroundImage: morseCodeTokens.backgroundImage,\n animationIterationCount: morseCodeTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeTokens.morseCodeAnimationTimingFunction,\n animationName: [morseCodeAnimationTokens.colorAnimation, morseCodeAnimationTokens.dotsAndDashes],\n\n '@media (forced-colors: active)': {\n backgroundImage: morseCodeTokens.backgroundImage,\n animationIterationCount: morseCodeTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeTokens.morseCodeAnimationTimingFunction,\n animationName: [morseCodeAnimationTokens.colorHCAnimation, morseCodeAnimationTokens.dotsAndDashes],\n },\n});\n\nexport const MorseCodeHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_FILE_URL,\n className,\n ...restProps\n}) => {\n React.useEffect(() => {\n const path = `${baseUrl}${fileName}`;\n if (!initializedModules[path]) {\n addModule(baseUrl, fileName)\n .then(() => {\n initializedModules[path] = true;\n })\n .catch(err => {\n initializedModules[path] = false;\n });\n }\n }, [baseUrl, fileName]);\n\n const morseCodeStyles = useMorseCodeStyles();\n const animationClassName = useMorseCodeAnimationClassName();\n const cn = mergeClasses(morseCodeStyles.wrapper, className);\n\n return (\n <div className={cn} {...restProps}>\n <div\n className={mergeClasses('fai-MorseCode', 'fai-MorseCodeHoudini', morseCodeStyles.base, animationClassName)}\n />\n </div>\n );\n};\n"],"names":["React","makeResetStyles","mergeClasses","addModule","useMorseCodeStyles","initializeMorseCodeCustomProperties","morseCodeAnimationTokens","morseCodeTokens","DEFAULT_BASE_URL","DEFAULT_FILE_URL","initializedModules","useMorseCodeAnimationClassName","backgroundImage","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","animationName","colorAnimation","dotsAndDashes","colorHCAnimation","MorseCodeHoudini","baseUrl","fileName","className","restProps","useEffect","path","then","catch","err","morseCodeStyles","animationClassName","cn","wrapper","div","base"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAC3E,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,kBAAkB,QAAQ,qBAAqB;AAExD,SACEC,mCAAmC,EACnCC,wBAAwB,EACxBC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,QACX,+BAA+B;AAItC,MAAMC,qBAAqB,CAAC;AAE5BL;AAEA,MAAMM,iCAAiCV,gBAAgB;IACrDW,iBAAiBL,gBAAgBK,eAAe;IAChDC,yBAAyBN,gBAAgBO,gCAAgC;IACzEC,mBAAmBR,gBAAgBS,0BAA0B;IAC7DC,yBAAyBV,gBAAgBW,gCAAgC;IACzEC,eAAe;QAACb,yBAAyBc,cAAc;QAAEd,yBAAyBe,aAAa;KAAC;IAEhG,kCAAkC;QAChCT,iBAAiBL,gBAAgBK,eAAe;QAChDC,yBAAyBN,gBAAgBO,gCAAgC;QACzEC,mBAAmBR,gBAAgBS,0BAA0B;QAC7DC,yBAAyBV,gBAAgBW,gCAAgC;QACzEC,eAAe;YAACb,yBAAyBgB,gBAAgB;YAAEhB,yBAAyBe,aAAa;SAAC;IACpG;AACF;AAEA,OAAO,MAAME,mBAA6C,CAAC,EACzDC,UAAUhB,gBAAgB,EAC1BiB,WAAWhB,gBAAgB,EAC3BiB,SAAS,EACT,GAAGC,WACJ;IACC3B,MAAM4B,SAAS,CAAC;QACd,MAAMC,OAAO,CAAC,EAAEL,QAAQ,EAAEC,SAAS,CAAC;QACpC,IAAI,CAACf,kBAAkB,CAACmB,KAAK,EAAE;YAC7B1B,UAAUqB,SAASC,UAChBK,IAAI,CAAC;gBACJpB,kBAAkB,CAACmB,KAAK,GAAG;YAC7B,GACCE,KAAK,CAACC,CAAAA;gBACLtB,kBAAkB,CAACmB,KAAK,GAAG;YAC7B;QACJ;IACF,GAAG;QAACL;QAASC;KAAS;IAEtB,MAAMQ,kBAAkB7B;IACxB,MAAM8B,qBAAqBvB;IAC3B,MAAMwB,KAAKjC,aAAa+B,gBAAgBG,OAAO,EAAEV;IAEjD,qBACE,oBAACW;QAAIX,WAAWS;QAAK,GAAGR,SAAS;qBAC/B,oBAACU;QACCX,WAAWxB,aAAa,iBAAiB,wBAAwB+B,gBAAgBK,IAAI,EAAEJ;;AAI/F,EAAE"}
|
package/lib/hooks/types.js
DELETED
package/lib/hooks/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["types.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useFallbackMorseCode.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useHoudiniMorseCode.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useMorseCode.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["MorseCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport { hasHoudini } from '@fluentui-contrib/houdini-utils';\nimport { MorseCodeFallback } from './MorseCodeFallback';\nimport { MorseCodeHoudini } from './MorseCodeHoudini';\n\nimport type { MorseCodeProps } from './MorseCode.types';\n\nconst houdiniAvailable = hasHoudini();\n\nexport const MorseCode: React.FC<MorseCodeProps> = props => {\n if (houdiniAvailable) {\n return <MorseCodeHoudini {...props} />;\n }\n\n return <MorseCodeFallback {...props} />;\n};\n"],"names":["MorseCode","houdiniAvailable","hasHoudini","props","React","createElement","MorseCodeHoudini","MorseCodeFallback"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;8BACI;mCACO;kCACD;AAIjC,MAAMC,mBAAmBC,IAAAA,wBAAAA;AAElB,MAAMF,YAAsCG,CAAAA;QACjDF,kBAAIA;eACF,WAAA,GAAAG,OAAOC,aAAA,CAAAC,kCAACA,EAAAA;;WAGV,WAAA,GAAAF,OAAOC,aAAA,CAAAE,oCAACA,EAAAA;AACV"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "MorseCodeFallback", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return MorseCodeFallback;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
14
|
-
const _morsecode = require("@fluentui-copilot/morse-code");
|
|
15
|
-
const _MorseCodestyles = require("./MorseCode.styles");
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17
|
-
const ON_COMPLETE_NOOP = ()=>{};
|
|
18
|
-
const MorseCodeFallback = (props)=>{
|
|
19
|
-
const morseCodeStyles = (0, _MorseCodestyles.useMorseCodeStyles)();
|
|
20
|
-
const targetRef = _react.useCallback((node)=>{
|
|
21
|
-
let animControls;
|
|
22
|
-
if (node) {
|
|
23
|
-
animControls = (0, _morsecode.morseCode)(node);
|
|
24
|
-
animControls.play(ON_COMPLETE_NOOP);
|
|
25
|
-
} else {
|
|
26
|
-
if (animControls) {
|
|
27
|
-
animControls.stop();
|
|
28
|
-
animControls.cleanup();
|
|
29
|
-
animControls = undefined;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}, []);
|
|
33
|
-
const { className, ...restProps } = props;
|
|
34
|
-
const cn = (0, _reactcomponents.mergeClasses)(morseCodeStyles.wrapper, className);
|
|
35
|
-
return /*#__PURE__*/ _react.createElement("div", {
|
|
36
|
-
className: cn,
|
|
37
|
-
...restProps
|
|
38
|
-
}, /*#__PURE__*/ _react.createElement("div", {
|
|
39
|
-
ref: targetRef,
|
|
40
|
-
className: (0, _reactcomponents.mergeClasses)('fai-MorseCode', 'fai-MorseCodeFallback', morseCodeStyles.base)
|
|
41
|
-
}));
|
|
42
|
-
}; //# sourceMappingURL=MorseCodeFallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["MorseCodeFallback.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { morseCode } from '@fluentui-copilot/morse-code';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport type { MorseCodeProps } from './MorseCode.types';\n\ntype FallbackAnimation = ReturnType<typeof morseCode>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst ON_COMPLETE_NOOP = () => {};\n\nexport const MorseCodeFallback: React.FC<MorseCodeProps> = props => {\n const morseCodeStyles = useMorseCodeStyles();\n\n const targetRef = React.useCallback((node: HTMLElement | null) => {\n let animControls: FallbackAnimation | undefined;\n\n if (node) {\n animControls = morseCode(node);\n animControls.play(ON_COMPLETE_NOOP);\n } else {\n if (animControls) {\n animControls.stop();\n animControls.cleanup();\n animControls = undefined;\n }\n }\n }, []);\n\n const { className, ...restProps } = props;\n const cn = mergeClasses(morseCodeStyles.wrapper, className);\n\n return (\n <div className={cn} {...restProps}>\n <div ref={targetRef} className={mergeClasses('fai-MorseCode', 'fai-MorseCodeFallback', morseCodeStyles.base)} />\n </div>\n );\n};\n"],"names":["MorseCodeFallback","ON_COMPLETE_NOOP","props","morseCodeStyles","useMorseCodeStyles","targetRef","React","useCallback","animControls","node","morseCode","className","cn","restProps","wrapper","createElement","div","ref"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;iCACM;2BACH;iCACS;AAMnC,gEAAgE;AAChE,MAAMC,mBAAmB,KAAO;AAEzB,MAAMD,oBAA8CE,CAAAA;UACzDC,kBAAMA,IAAAA,mCAAkBC;UAExBC,YAAMA,OAAYC,WAAMC,CAAAA,CAAAA;YACtBC;YAEAC,MAAIA;2BACFD,IAAAA,oBAAeE,EAAAA;yBACfF,IAAAA,CAAAA;eACF;8BACMA;6BACFA,IAAAA;6BACAA,OAAAA;+BACAA;;;OAGN,EAAG;UAEH,EACAG,SAAMC,EAEN,GAAAC;UACuBD,KAAGC,IAAAA,6BAAS,EAAAV,gBAAAW,OAAA,EAAAH;yBAC/BL,OAAAS,aAACC,CAAAA,OAAAA;mBAASX;oBAAWM;;QAGzBM,KAAAZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { addModule } from '@fluentui-contrib/houdini-utils';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport {\n initializeMorseCodeCustomProperties,\n morseCodeAnimationTokens,\n morseCodeTokens,\n DEFAULT_BASE_URL,\n DEFAULT_FILE_URL,\n} from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from './MorseCode.types';\n\nconst initializedModules = {} as Record<string, boolean>;\n\ninitializeMorseCodeCustomProperties();\n\nconst useMorseCodeAnimationClassName = makeResetStyles({\n backgroundImage: morseCodeTokens.backgroundImage,\n animationIterationCount: morseCodeTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeTokens.morseCodeAnimationTimingFunction,\n animationName: [morseCodeAnimationTokens.colorAnimation, morseCodeAnimationTokens.dotsAndDashes],\n\n '@media (forced-colors: active)': {\n backgroundImage: morseCodeTokens.backgroundImage,\n animationIterationCount: morseCodeTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeTokens.morseCodeAnimationTimingFunction,\n animationName: [morseCodeAnimationTokens.colorHCAnimation, morseCodeAnimationTokens.dotsAndDashes],\n },\n});\n\nexport const MorseCodeHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_FILE_URL,\n className,\n ...restProps\n}) => {\n React.useEffect(() => {\n const path = `${baseUrl}${fileName}`;\n if (!initializedModules[path]) {\n addModule(baseUrl, fileName)\n .then(() => {\n initializedModules[path] = true;\n })\n .catch(err => {\n initializedModules[path] = false;\n });\n }\n }, [baseUrl, fileName]);\n\n const morseCodeStyles = useMorseCodeStyles();\n const animationClassName = useMorseCodeAnimationClassName();\n const cn = mergeClasses(morseCodeStyles.wrapper, className);\n\n return (\n <div className={cn} {...restProps}>\n <div\n className={mergeClasses('fai-MorseCode', 'fai-MorseCodeHoudini', morseCodeStyles.base, animationClassName)}\n />\n </div>\n );\n};\n"],"names":["animationTimingFunction","initializedModules","initializeMorseCodeCustomProperties","useMorseCodeAnimationClassName","makeResetStyles","backgroundImage","animationIterationCount","morseCodeTokens","animationName","morseCodeAnimationTokens","restProps","animationDuration","path","baseUrl","fileName","morseCodeStyles","MorseCodeHoudini","React","cn","mergeClasses","className","addModule","catch","err","base","animationClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAwBEA;;;eAAAA;;;;iEAxBqB;iCAEe;8BACZ;iCACS;2BAQ5B;AAIP,MAAMC,qBAAqB,CAAC;AAE5BC,IAAAA,8CAAAA;AAEA,MAAMC,iCAAiCC,IAAAA,8BAAAA,EAAAA,YAAgB,WAAA;OACrDC;QAAAA;QAAgD;QAAA;QAAA;KAAA;OAChDC;QAAAA;QAAyE;KAAA;;AAEzEN,MAAAA,mBAAyBO,CAAAA,YACzBC,2BAAe,aAACC,2BAAAA,WAAyCA,KAAuCC;WAG9FL,SAAAA,CAAAA;cACAC,OAAAA,CAAAA,EAAAA,QAAAA,EAAAA,SAAyBC,CAAAA;YACzBI,CAAAA,kBAAmBJ,CAAAA,KAAAA,EAAAA;uCACnBP,EAAAA,SAAAA,UAAyBO,IAAAA,CAAAA;gBACzBC,kBAAe,CAAAI,KAAA,GAAA;oBAACH,CAAAA,CAAAA;kCAA2CA,CAAAA,KAAAA,GAAAA;;QAC7D;IACF,GAAA;QAAAI;QAAAC;KAAA;IAEA,MAAOC,kBAAMC,IAAAA,mCACXH;UAKAI,qBAAgBd;UACde,KAAAC,IAAAA,6BAAgBN,EAAAA,gBAAUC,OAAU,EAAAM;WACpC,WAAKnB,GAAAA,OAAAA,aAA0B,CAAA,OAAA;mBAC7BoB;oBAEIpB;kBAEDqB,GAAAA,OAAMC,aAAAA,CAAAA,OAAAA;oDACLtB,EAAAA,iBAA2B,wBAAAc,gBAAAS,IAAA,EAAAC;;+CAGhC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["types.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useFallbackMorseCode.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useHoudiniMorseCode.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useMorseCode.ts"],"sourcesContent":["export {};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|