@fluentui-copilot/react-morse-code 0.0.13 → 0.0.14

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 (38) hide show
  1. package/CHANGELOG.json +40 -1
  2. package/CHANGELOG.md +15 -2
  3. package/dist/index.d.ts +2 -2
  4. package/lib/components/hooks/useAddModule.js +3 -2
  5. package/lib/components/hooks/useAddModule.js.map +1 -1
  6. package/lib/components/hooks/useFallbackRef.js +11 -11
  7. package/lib/components/hooks/useFallbackRef.js.map +1 -1
  8. package/lib/components/large/MorseCode.js +7 -1
  9. package/lib/components/large/MorseCode.js.map +1 -1
  10. package/lib/components/large/MorseCodeHoudini.js +11 -3
  11. package/lib/components/large/MorseCodeHoudini.js.map +1 -1
  12. package/lib/components/shared/renderMorseCode.js.map +1 -1
  13. package/lib/components/small/MorseCodeSmall.js +7 -1
  14. package/lib/components/small/MorseCodeSmall.js.map +1 -1
  15. package/lib/components/small/MorseCodeSmallHoudini.js +11 -3
  16. package/lib/components/small/MorseCodeSmallHoudini.js.map +1 -1
  17. package/lib/components/small/MorseCodeSmallHoudini.styles.js +1 -2
  18. package/lib/components/small/MorseCodeSmallHoudini.styles.js.map +1 -1
  19. package/lib/components/small/MorseCodeSmallHoudini.styles.raw.js +1 -2
  20. package/lib/components/small/MorseCodeSmallHoudini.styles.raw.js.map +1 -1
  21. package/lib-commonjs/components/hooks/useAddModule.js +3 -2
  22. package/lib-commonjs/components/hooks/useAddModule.js.map +1 -1
  23. package/lib-commonjs/components/hooks/useFallbackRef.js +11 -11
  24. package/lib-commonjs/components/hooks/useFallbackRef.js.map +1 -1
  25. package/lib-commonjs/components/large/MorseCode.js +7 -1
  26. package/lib-commonjs/components/large/MorseCode.js.map +1 -1
  27. package/lib-commonjs/components/large/MorseCodeHoudini.js +11 -2
  28. package/lib-commonjs/components/large/MorseCodeHoudini.js.map +1 -1
  29. package/lib-commonjs/components/shared/renderMorseCode.js.map +1 -1
  30. package/lib-commonjs/components/small/MorseCodeSmall.js +7 -1
  31. package/lib-commonjs/components/small/MorseCodeSmall.js.map +1 -1
  32. package/lib-commonjs/components/small/MorseCodeSmallHoudini.js +11 -2
  33. package/lib-commonjs/components/small/MorseCodeSmallHoudini.js.map +1 -1
  34. package/lib-commonjs/components/small/MorseCodeSmallHoudini.styles.js +0 -1
  35. package/lib-commonjs/components/small/MorseCodeSmallHoudini.styles.js.map +1 -1
  36. package/lib-commonjs/components/small/MorseCodeSmallHoudini.styles.raw.js +0 -1
  37. package/lib-commonjs/components/small/MorseCodeSmallHoudini.styles.raw.js.map +1 -1
  38. package/package.json +9 -9
package/CHANGELOG.json CHANGED
@@ -2,7 +2,46 @@
2
2
  "name": "@fluentui-copilot/react-morse-code",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 29 Sep 2025 20:25:10 GMT",
5
+ "date": "Tue, 14 Oct 2025 00:02:52 GMT",
6
+ "tag": "@fluentui-copilot/react-morse-code_v0.0.14",
7
+ "version": "0.0.14",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "hochelmartin@gmail.com",
12
+ "package": "@fluentui-copilot/react-morse-code",
13
+ "commit": "da79330fcf3989311e4838ea7cfc6d4b8318102a",
14
+ "comment": "fix: properly specify package dependencies to dedupe in valid semver ranges"
15
+ },
16
+ {
17
+ "author": "tristan.watanabe@gmail.com",
18
+ "package": "@fluentui-copilot/react-morse-code",
19
+ "commit": "9a3bf49a3c6302529b2c9b6bc3fc63f549aaf88f",
20
+ "comment": "chore: enforce explicit return types."
21
+ },
22
+ {
23
+ "author": "owcampbe@microsoft.com",
24
+ "package": "@fluentui-copilot/react-morse-code",
25
+ "commit": "c061b8849089b94414af04d3903c1695a4474a4d",
26
+ "comment": "fix: Improve multi-window support."
27
+ },
28
+ {
29
+ "author": "twatanabe@microsoft.com",
30
+ "package": "@fluentui-copilot/react-morse-code",
31
+ "commit": "068a3c71be5da80beeab05640fe768ef631b0c00",
32
+ "comment": "chore: bump @fluentui/react-components peer dep minbar to ^9.70.0."
33
+ },
34
+ {
35
+ "author": "tristan.watanabe@gmail.com",
36
+ "package": "@fluentui-copilot/react-morse-code",
37
+ "commit": "74cfcbd7c8afdc8fe3f4b512a9a421613fa32841",
38
+ "comment": "chore: update react peer deps to support React 19."
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Mon, 29 Sep 2025 20:26:50 GMT",
6
45
  "tag": "@fluentui-copilot/react-morse-code_v0.0.13",
7
46
  "version": "0.0.13",
8
47
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,25 @@
1
1
  # Change Log - @fluentui-copilot/react-morse-code
2
2
 
3
- This log was last generated on Mon, 29 Sep 2025 20:25:10 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 14 Oct 2025 00:02:52 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.0.14](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-morse-code_v0.0.14)
8
+
9
+ Tue, 14 Oct 2025 00:02:52 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-morse-code_v0.0.13..@fluentui-copilot/react-morse-code_v0.0.14)
11
+
12
+ ### Patches
13
+
14
+ - fix: properly specify package dependencies to dedupe in valid semver ranges ([PR #3371](https://github.com/microsoft/fluentai/pull/3371) by hochelmartin@gmail.com)
15
+ - chore: enforce explicit return types. ([PR #3360](https://github.com/microsoft/fluentai/pull/3360) by tristan.watanabe@gmail.com)
16
+ - fix: Improve multi-window support. ([PR #3366](https://github.com/microsoft/fluentai/pull/3366) by owcampbe@microsoft.com)
17
+ - chore: bump @fluentui/react-components peer dep minbar to ^9.70.0. ([PR #3344](https://github.com/microsoft/fluentai/pull/3344) by twatanabe@microsoft.com)
18
+ - chore: update react peer deps to support React 19. ([PR #3361](https://github.com/microsoft/fluentai/pull/3361) by tristan.watanabe@gmail.com)
19
+
7
20
  ## [0.0.13](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-morse-code_v0.0.13)
8
21
 
9
- Mon, 29 Sep 2025 20:25:10 GMT
22
+ Mon, 29 Sep 2025 20:26:50 GMT
10
23
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-morse-code_v0.0.11..@fluentui-copilot/react-morse-code_v0.0.13)
11
24
 
12
25
  ### Patches
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export declare const MorseCode: React_2.FC<MorseCodeProps>;
6
6
 
7
7
  export declare const MorseCodeFallback: React.FC<MorseCodeProps>;
8
8
 
9
- export declare const MorseCodeHoudini: React.FC<MorseCodeProps>;
9
+ export declare const MorseCodeHoudini: React_2.FC<MorseCodeProps>;
10
10
 
11
11
  export declare type MorseCodeProps = React_2.HTMLAttributes<HTMLDivElement> & {
12
12
  baseUrl?: string;
@@ -17,6 +17,6 @@ export declare const MorseCodeSmall: React_2.FC<MorseCodeProps>;
17
17
 
18
18
  export declare const MorseCodeSmallFallback: React.FC<MorseCodeProps>;
19
19
 
20
- export declare const MorseCodeSmallHoudini: React.FC<MorseCodeProps>;
20
+ export declare const MorseCodeSmallHoudini: React_2.FC<MorseCodeProps>;
21
21
 
22
22
  export { }
@@ -1,17 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import { addModule } from '@fluentui-contrib/houdini-utils';
3
3
  const initializedModules = {};
4
- export const useAddModule = (baseUrl, fileName)=>{
4
+ export const useAddModule = (targetWindow, baseUrl, fileName)=>{
5
5
  React.useEffect(()=>{
6
6
  const path = `${baseUrl}${fileName}`;
7
7
  if (!initializedModules[path]) {
8
- addModule(baseUrl, fileName).then(()=>{
8
+ addModule(targetWindow, baseUrl, fileName).then(()=>{
9
9
  initializedModules[path] = true;
10
10
  }).catch((_err)=>{
11
11
  initializedModules[path] = false;
12
12
  });
13
13
  }
14
14
  }, [
15
+ targetWindow,
15
16
  baseUrl,
16
17
  fileName
17
18
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["useAddModule.ts"],"sourcesContent":["import * as React from 'react';\nimport { addModule } from '@fluentui-contrib/houdini-utils';\n\nconst initializedModules = {} as Record<string, boolean>;\n\nexport const useAddModule = (baseUrl: string, fileName: string): void => {\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"],"names":["React","addModule","initializedModules","useAddModule","baseUrl","fileName","useEffect","path","then","catch","_err"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,QAAQ,kCAAkC;AAE5D,MAAMC,qBAAqB,CAAC;AAE5B,OAAO,MAAMC,eAAe,CAACC,SAAiBC;IAC5CL,MAAMM,SAAS,CAAC;QACd,MAAMC,OAAO,CAAC,EAAEH,QAAQ,EAAEC,SAAS,CAAC;QACpC,IAAI,CAACH,kBAAkB,CAACK,KAAK,EAAE;YAC7BN,UAAUG,SAASC,UAChBG,IAAI,CAAC;gBACJN,kBAAkB,CAACK,KAAK,GAAG;YAC7B,GACCE,KAAK,CAACC,CAAAA;gBACLR,kBAAkB,CAACK,KAAK,GAAG;YAC7B;QACJ;IACF,GAAG;QAACH;QAASC;KAAS;AACxB,EAAE"}
1
+ {"version":3,"sources":["useAddModule.ts"],"sourcesContent":["import * as React from 'react';\nimport { addModule } from '@fluentui-contrib/houdini-utils';\n\nconst initializedModules = {} as Record<string, boolean>;\n\nexport const useAddModule = (targetWindow: Window | undefined, baseUrl: string, fileName: string): void => {\n React.useEffect(() => {\n const path = `${baseUrl}${fileName}`;\n if (!initializedModules[path]) {\n addModule(targetWindow, baseUrl, fileName)\n .then(() => {\n initializedModules[path] = true;\n })\n .catch(_err => {\n initializedModules[path] = false;\n });\n }\n }, [targetWindow, baseUrl, fileName]);\n};\n"],"names":["React","addModule","initializedModules","useAddModule","targetWindow","baseUrl","fileName","useEffect","path","then","catch","_err"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,QAAQ,kCAAkC;AAE5D,MAAMC,qBAAqB,CAAC;AAE5B,OAAO,MAAMC,eAAe,CAACC,cAAkCC,SAAiBC;IAC9EN,MAAMO,SAAS,CAAC;QACd,MAAMC,OAAO,CAAC,EAAEH,QAAQ,EAAEC,SAAS,CAAC;QACpC,IAAI,CAACJ,kBAAkB,CAACM,KAAK,EAAE;YAC7BP,UAAUG,cAAcC,SAASC,UAC9BG,IAAI,CAAC;gBACJP,kBAAkB,CAACM,KAAK,GAAG;YAC7B,GACCE,KAAK,CAACC,CAAAA;gBACLT,kBAAkB,CAACM,KAAK,GAAG;YAC7B;QACJ;IACF,GAAG;QAACJ;QAAcC;QAASC;KAAS;AACtC,EAAE"}
@@ -1,18 +1,18 @@
1
1
  import * as React from 'react';
2
- // eslint-disable-next-line @typescript-eslint/no-empty-function
3
- const ON_COMPLETE_NOOP = ()=>{};
2
+ const ON_COMPLETE_NOOP = ()=>{
3
+ return;
4
+ };
4
5
  export const useFallbackRef = (anim)=>{
6
+ const animControls = React.useRef();
5
7
  const targetRef = React.useCallback((node)=>{
6
- let animControls;
8
+ if (animControls.current) {
9
+ animControls.current.stop();
10
+ animControls.current.cleanup();
11
+ animControls.current = undefined;
12
+ }
7
13
  if (node) {
8
- animControls = anim(node);
9
- animControls.play(ON_COMPLETE_NOOP);
10
- } else {
11
- if (animControls) {
12
- animControls.stop();
13
- animControls.cleanup();
14
- animControls = undefined;
15
- }
14
+ animControls.current = anim(node);
15
+ animControls.current.play(ON_COMPLETE_NOOP);
16
16
  }
17
17
  }, [
18
18
  anim
@@ -1 +1 @@
1
- {"version":3,"sources":["useFallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport type { fallbackPaintAnimation } from '@fluentui-contrib/houdini-utils';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst ON_COMPLETE_NOOP = () => {};\n\nexport type FallbackAnim = (target: HTMLElement) => ReturnType<typeof fallbackPaintAnimation>;\n\nexport const useFallbackRef = (anim: FallbackAnim) => {\n const targetRef = React.useCallback(\n (node: HTMLElement | null) => {\n let animControls: ReturnType<typeof fallbackPaintAnimation> | undefined;\n\n if (node) {\n animControls = anim(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 [anim],\n );\n\n return targetRef;\n};\n"],"names":["React","ON_COMPLETE_NOOP","useFallbackRef","anim","targetRef","useCallback","node","animControls","play","stop","cleanup","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,gEAAgE;AAChE,MAAMC,mBAAmB,KAAO;AAIhC,OAAO,MAAMC,iBAAiB,CAACC;IAC7B,MAAMC,YAAYJ,MAAMK,WAAW,CACjC,CAACC;QACC,IAAIC;QAEJ,IAAID,MAAM;YACRC,eAAeJ,KAAKG;YACpBC,aAAaC,IAAI,CAACP;QACpB,OAAO;YACL,IAAIM,cAAc;gBAChBA,aAAaE,IAAI;gBACjBF,aAAaG,OAAO;gBACpBH,eAAeI;YACjB;QACF;IACF,GACA;QAACR;KAAK;IAGR,OAAOC;AACT,EAAE"}
1
+ {"version":3,"sources":["useFallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport type { fallbackPaintAnimation } from '@fluentui-contrib/houdini-utils';\n\nconst ON_COMPLETE_NOOP = () => {\n return;\n};\n\nexport type FallbackAnim = (target: HTMLElement) => ReturnType<typeof fallbackPaintAnimation>;\n\nexport const useFallbackRef = (anim: FallbackAnim): ((node: HTMLElement | null) => void) => {\n const animControls = React.useRef<ReturnType<typeof fallbackPaintAnimation> | undefined>();\n const targetRef = React.useCallback(\n (node: HTMLElement | null) => {\n if (animControls.current) {\n animControls.current.stop();\n animControls.current.cleanup();\n animControls.current = undefined;\n }\n\n if (node) {\n animControls.current = anim(node);\n animControls.current.play(ON_COMPLETE_NOOP);\n }\n },\n [anim],\n );\n\n return targetRef;\n};\n"],"names":["React","ON_COMPLETE_NOOP","useFallbackRef","anim","animControls","useRef","targetRef","useCallback","node","current","stop","cleanup","undefined","play"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,mBAAmB;IACvB;AACF;AAIA,OAAO,MAAMC,iBAAiB,CAACC;IAC7B,MAAMC,eAAeJ,MAAMK,MAAM;IACjC,MAAMC,YAAYN,MAAMO,WAAW,CACjC,CAACC;QACC,IAAIJ,aAAaK,OAAO,EAAE;YACxBL,aAAaK,OAAO,CAACC,IAAI;YACzBN,aAAaK,OAAO,CAACE,OAAO;YAC5BP,aAAaK,OAAO,GAAGG;QACzB;QAEA,IAAIJ,MAAM;YACRJ,aAAaK,OAAO,GAAGN,KAAKK;YAC5BJ,aAAaK,OAAO,CAACI,IAAI,CAACZ;QAC5B;IACF,GACA;QAACE;KAAK;IAGR,OAAOG;AACT,EAAE"}
@@ -2,8 +2,14 @@ import * as React from 'react';
2
2
  import { hasHoudini } from '@fluentui-contrib/houdini-utils';
3
3
  import { MorseCodeFallback } from './MorseCodeFallback';
4
4
  import { MorseCodeHoudini } from './MorseCodeHoudini';
5
- const houdiniAvailable = hasHoudini();
5
+ import { useFluent } from '@fluentui/react-components';
6
6
  export const MorseCode = (props)=>{
7
+ const { targetDocument } = useFluent();
8
+ var _targetDocument_defaultView;
9
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
10
+ const houdiniAvailable = React.useMemo(()=>hasHoudini(targetWindow), [
11
+ targetWindow
12
+ ]);
7
13
  if (houdiniAvailable) {
8
14
  return /*#__PURE__*/ React.createElement(MorseCodeHoudini, props);
9
15
  }
@@ -1 +1 @@
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
+ {"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';\nimport { useFluent } from '@fluentui/react-components';\n\nexport const MorseCode: React.FC<MorseCodeProps> = props => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n\n const houdiniAvailable = React.useMemo(() => hasHoudini(targetWindow), [targetWindow]);\n\n if (houdiniAvailable) {\n return <MorseCodeHoudini {...props} />;\n }\n\n return <MorseCodeFallback {...props} />;\n};\n"],"names":["React","hasHoudini","MorseCodeFallback","MorseCodeHoudini","useFluent","MorseCode","props","targetDocument","targetWindow","defaultView","undefined","houdiniAvailable","useMemo"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,UAAU,QAAQ,kCAAkC;AAC7D,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,gBAAgB,QAAQ,qBAAqB;AAGtD,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAO,MAAMC,YAAsCC,CAAAA;IACjD,MAAM,EAAEC,cAAc,EAAE,GAAGH;QACNG;IAArB,MAAMC,eAAeD,CAAAA,8BAAAA,2BAAAA,qCAAAA,eAAgBE,WAAW,cAA3BF,yCAAAA,8BAA+BG;IAEpD,MAAMC,mBAAmBX,MAAMY,OAAO,CAAC,IAAMX,WAAWO,eAAe;QAACA;KAAa;IAErF,IAAIG,kBAAkB;QACpB,qBAAO,oBAACR,kBAAqBG;IAC/B;IAEA,qBAAO,oBAACJ,mBAAsBI;AAChC,EAAE"}
@@ -1,12 +1,20 @@
1
- import { mergeClasses } from '@fluentui/react-components';
1
+ import * as React from 'react';
2
+ import { mergeClasses, useFluent } from '@fluentui/react-components';
2
3
  import { useAddModule } from '../hooks/useAddModule';
3
4
  import { useMorseCodeStyles } from './MorseCode.styles';
4
5
  import { initializeMorseCodeCustomProperties, DEFAULT_BASE_URL, DEFAULT_FILE_URL } from '@fluentui-copilot/morse-code';
5
6
  import { renderMorseCode } from '../shared/renderMorseCode';
6
7
  import { useMorseCodeAnimationClassName } from './MorseCodeHoudini.styles';
7
- initializeMorseCodeCustomProperties();
8
8
  export const MorseCodeHoudini = ({ baseUrl = DEFAULT_BASE_URL, fileName = DEFAULT_FILE_URL, className, ...restProps })=>{
9
- useAddModule(baseUrl, fileName);
9
+ const { targetDocument } = useFluent();
10
+ var _targetDocument_defaultView;
11
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
12
+ React.useEffect(()=>{
13
+ initializeMorseCodeCustomProperties(targetWindow);
14
+ }, [
15
+ targetWindow
16
+ ]);
17
+ useAddModule(targetWindow, baseUrl, fileName);
10
18
  const morseCodeStyles = useMorseCodeStyles();
11
19
  const animationClassName = useMorseCodeAnimationClassName();
12
20
  const wrapperClassName = mergeClasses(morseCodeStyles.wrapper, className);
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport { initializeMorseCodeCustomProperties, DEFAULT_BASE_URL, DEFAULT_FILE_URL } from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { renderMorseCode } from '../shared/renderMorseCode';\nimport { useMorseCodeAnimationClassName } from './MorseCodeHoudini.styles';\n\ninitializeMorseCodeCustomProperties();\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":["mergeClasses","useAddModule","useMorseCodeStyles","initializeMorseCodeCustomProperties","DEFAULT_BASE_URL","DEFAULT_FILE_URL","renderMorseCode","useMorseCodeAnimationClassName","MorseCodeHoudini","baseUrl","fileName","className","restProps","morseCodeStyles","animationClassName","wrapperClassName","wrapper","morseCodeClassName","base"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,kBAAkB,QAAQ,qBAAqB;AAExD,SAASC,mCAAmC,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,+BAA+B;AAGvH,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,8BAA8B,QAAQ,4BAA4B;AAE3EJ;AAEA,OAAO,MAAMK,mBAA6C,CAAC,EACzDC,UAAUL,gBAAgB,EAC1BM,WAAWL,gBAAgB,EAC3BM,SAAS,EACT,GAAGC,WACJ;IACCX,aAAaQ,SAASC;IAEtB,MAAMG,kBAAkBX;IACxB,MAAMY,qBAAqBP;IAC3B,MAAMQ,mBAAmBf,aAAaa,gBAAgBG,OAAO,EAAEL;IAC/D,MAAMM,qBAAqBjB,aACzB,iBACA,wBACAa,gBAAgBK,IAAI,EACpBJ;IAGF,OAAOR,gBAAgBS,kBAAkBH,WAAWK;AACtD,EAAE"}
1
+ {"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses, useFluent } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport { initializeMorseCodeCustomProperties, DEFAULT_BASE_URL, DEFAULT_FILE_URL } from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { renderMorseCode } from '../shared/renderMorseCode';\nimport { useMorseCodeAnimationClassName } from './MorseCodeHoudini.styles';\n\nexport const MorseCodeHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_FILE_URL,\n className,\n ...restProps\n}) => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n\n React.useEffect(() => {\n initializeMorseCodeCustomProperties(targetWindow);\n }, [targetWindow]);\n\n useAddModule(targetWindow, 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":["React","mergeClasses","useFluent","useAddModule","useMorseCodeStyles","initializeMorseCodeCustomProperties","DEFAULT_BASE_URL","DEFAULT_FILE_URL","renderMorseCode","useMorseCodeAnimationClassName","MorseCodeHoudini","baseUrl","fileName","className","restProps","targetDocument","targetWindow","defaultView","undefined","useEffect","morseCodeStyles","animationClassName","wrapperClassName","wrapper","morseCodeClassName","base"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,EAAEC,SAAS,QAAQ,6BAA6B;AACrE,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,kBAAkB,QAAQ,qBAAqB;AAExD,SAASC,mCAAmC,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,+BAA+B;AAGvH,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,8BAA8B,QAAQ,4BAA4B;AAE3E,OAAO,MAAMC,mBAA6C,CAAC,EACzDC,UAAUL,gBAAgB,EAC1BM,WAAWL,gBAAgB,EAC3BM,SAAS,EACT,GAAGC,WACJ;IACC,MAAM,EAAEC,cAAc,EAAE,GAAGb;QACNa;IAArB,MAAMC,eAAeD,CAAAA,8BAAAA,2BAAAA,qCAAAA,eAAgBE,WAAW,cAA3BF,yCAAAA,8BAA+BG;IAEpDlB,MAAMmB,SAAS,CAAC;QACdd,oCAAoCW;IACtC,GAAG;QAACA;KAAa;IAEjBb,aAAaa,cAAcL,SAASC;IAEpC,MAAMQ,kBAAkBhB;IACxB,MAAMiB,qBAAqBZ;IAC3B,MAAMa,mBAAmBrB,aAAamB,gBAAgBG,OAAO,EAAEV;IAC/D,MAAMW,qBAAqBvB,aACzB,iBACA,wBACAmB,gBAAgBK,IAAI,EACpBJ;IAGF,OAAOb,gBAAgBc,kBAAkBR,WAAWU;AACtD,EAAE"}
@@ -1 +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":["React","renderMorseCode","wrapperClassName","wrapperProps","morseCodeClassName","targetRef","div","className","ref"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,OAAO,MAAMC,kBAAkB,CAC7BC,kBACAC,cACAC,oBACAC;IAEA,qBACE,oBAACC;QAAIC,WAAWL;QAAmB,GAAGC,YAAY;qBAChD,oBAACG;QAAIE,KAAKH;QAAWE,WAAWH;;AAGtC,EAAE"}
1
+ {"version":3,"sources":["renderMorseCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-components';\n\nexport const renderMorseCode = (\n wrapperClassName: string,\n wrapperProps: React.HTMLAttributes<HTMLDivElement>,\n morseCodeClassName: string,\n targetRef?: (node: HTMLElement | null) => void,\n): JSXElement => {\n return (\n <div className={wrapperClassName} {...wrapperProps}>\n <div ref={targetRef} className={morseCodeClassName} />\n </div>\n );\n};\n"],"names":["React","renderMorseCode","wrapperClassName","wrapperProps","morseCodeClassName","targetRef","div","className","ref"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,MAAMC,kBAAkB,CAC7BC,kBACAC,cACAC,oBACAC;IAEA,qBACE,oBAACC;QAAIC,WAAWL;QAAmB,GAAGC,YAAY;qBAChD,oBAACG;QAAIE,KAAKH;QAAWE,WAAWH;;AAGtC,EAAE"}
@@ -2,8 +2,14 @@ import * as React from 'react';
2
2
  import { hasHoudini } from '@fluentui-contrib/houdini-utils';
3
3
  import { MorseCodeSmallFallback } from './MorseCodeSmallFallback';
4
4
  import { MorseCodeSmallHoudini } from './MorseCodeSmallHoudini';
5
- const houdiniAvailable = hasHoudini();
5
+ import { useFluent } from '@fluentui/react-components';
6
6
  export const MorseCodeSmall = (props)=>{
7
+ const { targetDocument } = useFluent();
8
+ var _targetDocument_defaultView;
9
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
10
+ const houdiniAvailable = React.useMemo(()=>hasHoudini(targetWindow), [
11
+ targetWindow
12
+ ]);
7
13
  if (houdiniAvailable) {
8
14
  return /*#__PURE__*/ React.createElement(MorseCodeSmallHoudini, props);
9
15
  }
@@ -1 +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":["React","hasHoudini","MorseCodeSmallFallback","MorseCodeSmallHoudini","houdiniAvailable","MorseCodeSmall","props"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,UAAU,QAAQ,kCAAkC;AAC7D,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,SAASC,qBAAqB,QAAQ,0BAA0B;AAIhE,MAAMC,mBAAmBH;AAEzB,OAAO,MAAMI,iBAA2CC,CAAAA;IACtD,IAAIF,kBAAkB;QACpB,qBAAO,oBAACD,uBAA0BG;IACpC;IAEA,qBAAO,oBAACJ,wBAA2BI;AACrC,EAAE"}
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';\nimport { useFluent } from '@fluentui/react-components';\n\nexport const MorseCodeSmall: React.FC<MorseCodeProps> = props => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n const houdiniAvailable = React.useMemo(() => hasHoudini(targetWindow), [targetWindow]);\n\n if (houdiniAvailable) {\n return <MorseCodeSmallHoudini {...props} />;\n }\n\n return <MorseCodeSmallFallback {...props} />;\n};\n"],"names":["React","hasHoudini","MorseCodeSmallFallback","MorseCodeSmallHoudini","useFluent","MorseCodeSmall","props","targetDocument","targetWindow","defaultView","undefined","houdiniAvailable","useMemo"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,UAAU,QAAQ,kCAAkC;AAC7D,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,SAASC,qBAAqB,QAAQ,0BAA0B;AAGhE,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAO,MAAMC,iBAA2CC,CAAAA;IACtD,MAAM,EAAEC,cAAc,EAAE,GAAGH;QACNG;IAArB,MAAMC,eAAeD,CAAAA,8BAAAA,2BAAAA,qCAAAA,eAAgBE,WAAW,cAA3BF,yCAAAA,8BAA+BG;IACpD,MAAMC,mBAAmBX,MAAMY,OAAO,CAAC,IAAMX,WAAWO,eAAe;QAACA;KAAa;IAErF,IAAIG,kBAAkB;QACpB,qBAAO,oBAACR,uBAA0BG;IACpC;IAEA,qBAAO,oBAACJ,wBAA2BI;AACrC,EAAE"}
@@ -1,12 +1,20 @@
1
- import { mergeClasses } from '@fluentui/react-components';
1
+ import * as React from 'react';
2
+ import { mergeClasses, useFluent } from '@fluentui/react-components';
2
3
  import { useAddModule } from '../hooks/useAddModule';
3
4
  import { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';
4
5
  import { initializeMorseCodeSmallCustomProperties, DEFAULT_BASE_URL, DEFAULT_SMALL_FILE_URL } from '@fluentui-copilot/morse-code';
5
6
  import { renderMorseCode } from '../shared/renderMorseCode';
6
7
  import { useMorseCodeAnimationClassName } from './MorseCodeSmallHoudini.styles';
7
- initializeMorseCodeSmallCustomProperties();
8
8
  export const MorseCodeSmallHoudini = ({ baseUrl = DEFAULT_BASE_URL, fileName = DEFAULT_SMALL_FILE_URL, className, ...restProps })=>{
9
- useAddModule(baseUrl, fileName);
9
+ const { targetDocument } = useFluent();
10
+ var _targetDocument_defaultView;
11
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
12
+ React.useEffect(()=>{
13
+ initializeMorseCodeSmallCustomProperties(targetWindow);
14
+ }, [
15
+ targetWindow
16
+ ]);
17
+ useAddModule(targetWindow, baseUrl, fileName);
10
18
  const morseCodeSmallStyles = useMorseCodeSmallStyles();
11
19
  const animationClassName = useMorseCodeAnimationClassName();
12
20
  const wrapperClassName = mergeClasses(morseCodeSmallStyles.wrapper, className);
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeSmallHoudini.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\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';\nimport { useMorseCodeAnimationClassName } from './MorseCodeSmallHoudini.styles';\n\ninitializeMorseCodeSmallCustomProperties();\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":["mergeClasses","useAddModule","useMorseCodeSmallStyles","initializeMorseCodeSmallCustomProperties","DEFAULT_BASE_URL","DEFAULT_SMALL_FILE_URL","renderMorseCode","useMorseCodeAnimationClassName","MorseCodeSmallHoudini","baseUrl","fileName","className","restProps","morseCodeSmallStyles","animationClassName","wrapperClassName","wrapper","morseCodeClassName","base"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,uBAAuB,QAAQ,0BAA0B;AAElE,SACEC,wCAAwC,EACxCC,gBAAgB,EAChBC,sBAAsB,QACjB,+BAA+B;AAGtC,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,8BAA8B,QAAQ,iCAAiC;AAEhFJ;AAEA,OAAO,MAAMK,wBAAkD,CAAC,EAC9DC,UAAUL,gBAAgB,EAC1BM,WAAWL,sBAAsB,EACjCM,SAAS,EACT,GAAGC,WACJ;IACCX,aAAaQ,SAASC;IAEtB,MAAMG,uBAAuBX;IAC7B,MAAMY,qBAAqBP;IAC3B,MAAMQ,mBAAmBf,aAAaa,qBAAqBG,OAAO,EAAEL;IACpE,MAAMM,qBAAqBjB,aACzB,sBACA,6BACAa,qBAAqBK,IAAI,EACzBJ;IAGF,OAAOR,gBAAgBS,kBAAkBH,WAAWK;AACtD,EAAE"}
1
+ {"version":3,"sources":["MorseCodeSmallHoudini.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses, useFluent } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\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';\nimport { useMorseCodeAnimationClassName } from './MorseCodeSmallHoudini.styles';\n\nexport const MorseCodeSmallHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_SMALL_FILE_URL,\n className,\n ...restProps\n}) => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n\n React.useEffect(() => {\n initializeMorseCodeSmallCustomProperties(targetWindow);\n }, [targetWindow]);\n\n useAddModule(targetWindow, 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":["React","mergeClasses","useFluent","useAddModule","useMorseCodeSmallStyles","initializeMorseCodeSmallCustomProperties","DEFAULT_BASE_URL","DEFAULT_SMALL_FILE_URL","renderMorseCode","useMorseCodeAnimationClassName","MorseCodeSmallHoudini","baseUrl","fileName","className","restProps","targetDocument","targetWindow","defaultView","undefined","useEffect","morseCodeSmallStyles","animationClassName","wrapperClassName","wrapper","morseCodeClassName","base"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,EAAEC,SAAS,QAAQ,6BAA6B;AACrE,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,uBAAuB,QAAQ,0BAA0B;AAElE,SACEC,wCAAwC,EACxCC,gBAAgB,EAChBC,sBAAsB,QACjB,+BAA+B;AAGtC,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,8BAA8B,QAAQ,iCAAiC;AAEhF,OAAO,MAAMC,wBAAkD,CAAC,EAC9DC,UAAUL,gBAAgB,EAC1BM,WAAWL,sBAAsB,EACjCM,SAAS,EACT,GAAGC,WACJ;IACC,MAAM,EAAEC,cAAc,EAAE,GAAGb;QACNa;IAArB,MAAMC,eAAeD,CAAAA,8BAAAA,2BAAAA,qCAAAA,eAAgBE,WAAW,cAA3BF,yCAAAA,8BAA+BG;IAEpDlB,MAAMmB,SAAS,CAAC;QACdd,yCAAyCW;IAC3C,GAAG;QAACA;KAAa;IAEjBb,aAAaa,cAAcL,SAASC;IAEpC,MAAMQ,uBAAuBhB;IAC7B,MAAMiB,qBAAqBZ;IAC3B,MAAMa,mBAAmBrB,aAAamB,qBAAqBG,OAAO,EAAEV;IACpE,MAAMW,qBAAqBvB,aACzB,sBACA,6BACAmB,qBAAqBK,IAAI,EACzBJ;IAGF,OAAOb,gBAAgBc,kBAAkBR,WAAWU;AACtD,EAAE"}
@@ -1,6 +1,5 @@
1
1
  import { __resetStyles } from '@fluentui/react-components';
2
- import { initializeMorseCodeSmallCustomProperties, morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';
3
- initializeMorseCodeSmallCustomProperties();
2
+ import { morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';
4
3
  const sharedStyles = {
5
4
  backgroundImage: morseCodeSmallTokens.backgroundImage,
6
5
  animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\n morseCodeSmallAnimationTokens,\n morseCodeSmallTokens,\n} from '@fluentui-copilot/morse-code';\n\ninitializeMorseCodeSmallCustomProperties();\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["makeResetStyles","initializeMorseCodeSmallCustomProperties","morseCodeSmallAnimationTokens","morseCodeSmallTokens","sharedStyles","backgroundImage","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","useMorseCodeAnimationClassName","animationName","colorAnimation","dotsAndDashes","colorHCAnimation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SACEC,wCAAwC,EACxCC,6BAA6B,EAC7BC,oBAAoB,QACf,+BAA+B;AAEtCF;AAEA,MAAMG,eAAe;IACnBC,iBAAiBF,qBAAqBE,eAAe;IACrDC,yBAAyBH,qBAAqBI,gCAAgC;IAC9EC,mBAAmBL,qBAAqBM,0BAA0B;IAClEC,yBAAyBP,qBAAqBQ,gCAAgC;AAChF;AAEA,OAAO,MAAMC,iCAAiCZ,gBAAgB;IAC5D,GAAGI,YAAY;IACfS,eAAe;QAACX,8BAA8BY,cAAc;QAAEZ,8BAA8Ba,aAAa;KAAC;IAE1G,kCAAkC;QAChC,GAAGX,YAAY;QACfS,eAAe;YAACX,8BAA8Bc,gBAAgB;YAAEd,8BAA8Ba,aAAa;SAAC;IAC9G;AACF,GAAG"}
1
+ {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport { morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["makeResetStyles","morseCodeSmallAnimationTokens","morseCodeSmallTokens","sharedStyles","backgroundImage","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","useMorseCodeAnimationClassName","animationName","colorAnimation","dotsAndDashes","colorHCAnimation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,6BAA6B,EAAEC,oBAAoB,QAAQ,+BAA+B;AAEnG,MAAMC,eAAe;IACnBC,iBAAiBF,qBAAqBE,eAAe;IACrDC,yBAAyBH,qBAAqBI,gCAAgC;IAC9EC,mBAAmBL,qBAAqBM,0BAA0B;IAClEC,yBAAyBP,qBAAqBQ,gCAAgC;AAChF;AAEA,OAAO,MAAMC,iCAAiCX,gBAAgB;IAC5D,GAAGG,YAAY;IACfS,eAAe;QAACX,8BAA8BY,cAAc;QAAEZ,8BAA8Ba,aAAa;KAAC;IAE1G,kCAAkC;QAChC,GAAGX,YAAY;QACfS,eAAe;YAACX,8BAA8Bc,gBAAgB;YAAEd,8BAA8Ba,aAAa;SAAC;IAC9G;AACF,GAAG"}
@@ -1,6 +1,5 @@
1
1
  import { makeResetStyles } from '@fluentui/react-components';
2
- import { initializeMorseCodeSmallCustomProperties, morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';
3
- initializeMorseCodeSmallCustomProperties();
2
+ import { morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';
4
3
  const sharedStyles = {
5
4
  backgroundImage: morseCodeSmallTokens.backgroundImage,
6
5
  animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\n morseCodeSmallAnimationTokens,\n morseCodeSmallTokens,\n} from '@fluentui-copilot/morse-code';\n\ninitializeMorseCodeSmallCustomProperties();\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["makeResetStyles","initializeMorseCodeSmallCustomProperties","morseCodeSmallAnimationTokens","morseCodeSmallTokens","sharedStyles","backgroundImage","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","useMorseCodeAnimationClassName","animationName","colorAnimation","dotsAndDashes","colorHCAnimation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SACEC,wCAAwC,EACxCC,6BAA6B,EAC7BC,oBAAoB,QACf,+BAA+B;AAEtCF;AAEA,MAAMG,eAAe;IACnBC,iBAAiBF,qBAAqBE,eAAe;IACrDC,yBAAyBH,qBAAqBI,gCAAgC;IAC9EC,mBAAmBL,qBAAqBM,0BAA0B;IAClEC,yBAAyBP,qBAAqBQ,gCAAgC;AAChF;AAEA,OAAO,MAAMC,iCAAiCZ,gBAAgB;IAC5D,GAAGI,YAAY;IACfS,eAAe;QAACX,8BAA8BY,cAAc;QAAEZ,8BAA8Ba,aAAa;KAAC;IAE1G,kCAAkC;QAChC,GAAGX,YAAY;QACfS,eAAe;YAACX,8BAA8Bc,gBAAgB;YAAEd,8BAA8Ba,aAAa;SAAC;IAC9G;AACF,GAAG"}
1
+ {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport { morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["makeResetStyles","morseCodeSmallAnimationTokens","morseCodeSmallTokens","sharedStyles","backgroundImage","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","useMorseCodeAnimationClassName","animationName","colorAnimation","dotsAndDashes","colorHCAnimation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,6BAA6B,EAAEC,oBAAoB,QAAQ,+BAA+B;AAEnG,MAAMC,eAAe;IACnBC,iBAAiBF,qBAAqBE,eAAe;IACrDC,yBAAyBH,qBAAqBI,gCAAgC;IAC9EC,mBAAmBL,qBAAqBM,0BAA0B;IAClEC,yBAAyBP,qBAAqBQ,gCAAgC;AAChF;AAEA,OAAO,MAAMC,iCAAiCX,gBAAgB;IAC5D,GAAGG,YAAY;IACfS,eAAe;QAACX,8BAA8BY,cAAc;QAAEZ,8BAA8Ba,aAAa;KAAC;IAE1G,kCAAkC;QAChC,GAAGX,YAAY;QACfS,eAAe;YAACX,8BAA8Bc,gBAAgB;YAAEd,8BAA8Ba,aAAa;SAAC;IAC9G;AACF,GAAG"}
@@ -12,17 +12,18 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _houdiniutils = require("@fluentui-contrib/houdini-utils");
14
14
  const initializedModules = {};
15
- const useAddModule = (baseUrl, fileName)=>{
15
+ const useAddModule = (targetWindow, baseUrl, fileName)=>{
16
16
  _react.useEffect(()=>{
17
17
  const path = `${baseUrl}${fileName}`;
18
18
  if (!initializedModules[path]) {
19
- (0, _houdiniutils.addModule)(baseUrl, fileName).then(()=>{
19
+ (0, _houdiniutils.addModule)(targetWindow, baseUrl, fileName).then(()=>{
20
20
  initializedModules[path] = true;
21
21
  }).catch((_err)=>{
22
22
  initializedModules[path] = false;
23
23
  });
24
24
  }
25
25
  }, [
26
+ targetWindow,
26
27
  baseUrl,
27
28
  fileName
28
29
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["useAddModule.ts"],"sourcesContent":["import * as React from 'react';\nimport { addModule } from '@fluentui-contrib/houdini-utils';\n\nconst initializedModules = {} as Record<string, boolean>;\n\nexport const useAddModule = (baseUrl: string, fileName: string): void => {\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"],"names":["useAddModule","initializedModules","baseUrl","fileName","React","useEffect","path","addModule","then","catch","_err"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;8BACG;AAE1B,MAAMC,qBAAqB,CAAC;AAErB,MAAMD,eAAe,CAACE,SAAiBC;IAC5CC,OAAMC,SAAS,CAAC;QACd,MAAMC,OAAO,CAAC,EAAEJ,QAAQ,EAAEC,SAAS,CAAC;QACpC,IAAI,CAACF,kBAAkB,CAACK,KAAK,EAAE;YAC7BC,IAAAA,uBAAAA,EAAUL,SAASC,UAChBK,IAAI,CAAC;gBACJP,kBAAkB,CAACK,KAAK,GAAG;YAC7B,GACCG,KAAK,CAACC,CAAAA;gBACLT,kBAAkB,CAACK,KAAK,GAAG;YAC7B;QACJ;IACF,GAAG;QAACJ;QAASC;KAAS;AACxB"}
1
+ {"version":3,"sources":["useAddModule.ts"],"sourcesContent":["import * as React from 'react';\nimport { addModule } from '@fluentui-contrib/houdini-utils';\n\nconst initializedModules = {} as Record<string, boolean>;\n\nexport const useAddModule = (targetWindow: Window | undefined, baseUrl: string, fileName: string): void => {\n React.useEffect(() => {\n const path = `${baseUrl}${fileName}`;\n if (!initializedModules[path]) {\n addModule(targetWindow, baseUrl, fileName)\n .then(() => {\n initializedModules[path] = true;\n })\n .catch(_err => {\n initializedModules[path] = false;\n });\n }\n }, [targetWindow, baseUrl, fileName]);\n};\n"],"names":["useAddModule","initializedModules","targetWindow","baseUrl","fileName","React","useEffect","path","addModule","then","catch","_err"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;8BACG;AAE1B,MAAMC,qBAAqB,CAAC;AAErB,MAAMD,eAAe,CAACE,cAAkCC,SAAiBC;IAC9EC,OAAMC,SAAS,CAAC;QACd,MAAMC,OAAO,CAAC,EAAEJ,QAAQ,EAAEC,SAAS,CAAC;QACpC,IAAI,CAACH,kBAAkB,CAACM,KAAK,EAAE;YAC7BC,IAAAA,uBAAAA,EAAUN,cAAcC,SAASC,UAC9BK,IAAI,CAAC;gBACJR,kBAAkB,CAACM,KAAK,GAAG;YAC7B,GACCG,KAAK,CAACC,CAAAA;gBACLV,kBAAkB,CAACM,KAAK,GAAG;YAC7B;QACJ;IACF,GAAG;QAACL;QAAcC;QAASC;KAAS;AACtC"}
@@ -10,20 +10,20 @@ Object.defineProperty(exports, "useFallbackRef", {
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- // eslint-disable-next-line @typescript-eslint/no-empty-function
14
- const ON_COMPLETE_NOOP = ()=>{};
13
+ const ON_COMPLETE_NOOP = ()=>{
14
+ return;
15
+ };
15
16
  const useFallbackRef = (anim)=>{
17
+ const animControls = _react.useRef();
16
18
  const targetRef = _react.useCallback((node)=>{
17
- let animControls;
19
+ if (animControls.current) {
20
+ animControls.current.stop();
21
+ animControls.current.cleanup();
22
+ animControls.current = undefined;
23
+ }
18
24
  if (node) {
19
- animControls = anim(node);
20
- animControls.play(ON_COMPLETE_NOOP);
21
- } else {
22
- if (animControls) {
23
- animControls.stop();
24
- animControls.cleanup();
25
- animControls = undefined;
26
- }
25
+ animControls.current = anim(node);
26
+ animControls.current.play(ON_COMPLETE_NOOP);
27
27
  }
28
28
  }, [
29
29
  anim
@@ -1 +1 @@
1
- {"version":3,"sources":["useFallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport type { fallbackPaintAnimation } from '@fluentui-contrib/houdini-utils';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst ON_COMPLETE_NOOP = () => {};\n\nexport type FallbackAnim = (target: HTMLElement) => ReturnType<typeof fallbackPaintAnimation>;\n\nexport const useFallbackRef = (anim: FallbackAnim) => {\n const targetRef = React.useCallback(\n (node: HTMLElement | null) => {\n let animControls: ReturnType<typeof fallbackPaintAnimation> | undefined;\n\n if (node) {\n animControls = anim(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 [anim],\n );\n\n return targetRef;\n};\n"],"names":["useFallbackRef","ON_COMPLETE_NOOP","anim","targetRef","React","useCallback","node","animControls","play","stop","cleanup","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;AAEvB,gEAAgE;AAChE,MAAMC,mBAAmB,KAAO;AAIzB,MAAMD,iBAAiB,CAACE;IAC7B,MAAMC,YAAYC,OAAMC,WAAW,CACjC,CAACC;QACC,IAAIC;QAEJ,IAAID,MAAM;YACRC,eAAeL,KAAKI;YACpBC,aAAaC,IAAI,CAACP;QACpB,OAAO;YACL,IAAIM,cAAc;gBAChBA,aAAaE,IAAI;gBACjBF,aAAaG,OAAO;gBACpBH,eAAeI;YACjB;QACF;IACF,GACA;QAACT;KAAK;IAGR,OAAOC;AACT"}
1
+ {"version":3,"sources":["useFallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport type { fallbackPaintAnimation } from '@fluentui-contrib/houdini-utils';\n\nconst ON_COMPLETE_NOOP = () => {\n return;\n};\n\nexport type FallbackAnim = (target: HTMLElement) => ReturnType<typeof fallbackPaintAnimation>;\n\nexport const useFallbackRef = (anim: FallbackAnim): ((node: HTMLElement | null) => void) => {\n const animControls = React.useRef<ReturnType<typeof fallbackPaintAnimation> | undefined>();\n const targetRef = React.useCallback(\n (node: HTMLElement | null) => {\n if (animControls.current) {\n animControls.current.stop();\n animControls.current.cleanup();\n animControls.current = undefined;\n }\n\n if (node) {\n animControls.current = anim(node);\n animControls.current.play(ON_COMPLETE_NOOP);\n }\n },\n [anim],\n );\n\n return targetRef;\n};\n"],"names":["useFallbackRef","ON_COMPLETE_NOOP","anim","animControls","React","useRef","targetRef","useCallback","node","current","stop","cleanup","undefined","play"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;AAGvB,MAAMC,mBAAmB;IACvB;AACF;AAIO,MAAMD,iBAAiB,CAACE;IAC7B,MAAMC,eAAeC,OAAMC,MAAM;IACjC,MAAMC,YAAYF,OAAMG,WAAW,CACjC,CAACC;QACC,IAAIL,aAAaM,OAAO,EAAE;YACxBN,aAAaM,OAAO,CAACC,IAAI;YACzBP,aAAaM,OAAO,CAACE,OAAO;YAC5BR,aAAaM,OAAO,GAAGG;QACzB;QAEA,IAAIJ,MAAM;YACRL,aAAaM,OAAO,GAAGP,KAAKM;YAC5BL,aAAaM,OAAO,CAACI,IAAI,CAACZ;QAC5B;IACF,GACA;QAACC;KAAK;IAGR,OAAOI;AACT"}
@@ -13,8 +13,14 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _houdiniutils = require("@fluentui-contrib/houdini-utils");
14
14
  const _MorseCodeFallback = require("./MorseCodeFallback");
15
15
  const _MorseCodeHoudini = require("./MorseCodeHoudini");
16
- const houdiniAvailable = (0, _houdiniutils.hasHoudini)();
16
+ const _reactcomponents = require("@fluentui/react-components");
17
17
  const MorseCode = (props)=>{
18
+ const { targetDocument } = (0, _reactcomponents.useFluent)();
19
+ var _targetDocument_defaultView;
20
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
21
+ const houdiniAvailable = _react.useMemo(()=>(0, _houdiniutils.hasHoudini)(targetWindow), [
22
+ targetWindow
23
+ ]);
18
24
  if (houdiniAvailable) {
19
25
  return /*#__PURE__*/ _react.createElement(_MorseCodeHoudini.MorseCodeHoudini, props);
20
26
  }
@@ -1 +1 @@
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;IACjD,IAAIF,kBAAkB;QACpB,OAAA,WAAA,GAAOG,OAAAC,aAAA,CAACC,kCAAAA,EAAqBH;IAC/B;IAEA,OAAA,WAAA,GAAOC,OAAAC,aAAA,CAACE,oCAAAA,EAAsBJ;AAChC"}
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';\nimport { useFluent } from '@fluentui/react-components';\n\nexport const MorseCode: React.FC<MorseCodeProps> = props => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n\n const houdiniAvailable = React.useMemo(() => hasHoudini(targetWindow), [targetWindow]);\n\n if (houdiniAvailable) {\n return <MorseCodeHoudini {...props} />;\n }\n\n return <MorseCodeFallback {...props} />;\n};\n"],"names":["MorseCode","props","targetDocument","useFluent","targetWindow","defaultView","undefined","houdiniAvailable","React","useMemo","hasHoudini","createElement","MorseCodeHoudini","MorseCodeFallback"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;8BACI;mCACO;kCACD;iCAGP;AAEnB,MAAMA,YAAsCC,CAAAA;IACjD,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,0BAAAA;QACND;IAArB,MAAME,eAAeF,CAAAA,8BAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBG,WAAW,AAAXA,MAAW,QAA3BH,gCAAAA,KAAAA,IAAAA,8BAA+BI;IAEpD,MAAMC,mBAAmBC,OAAMC,OAAO,CAAC,IAAMC,IAAAA,wBAAAA,EAAWN,eAAe;QAACA;KAAa;IAErF,IAAIG,kBAAkB;QACpB,OAAA,WAAA,GAAOC,OAAAG,aAAA,CAACC,kCAAAA,EAAqBX;IAC/B;IAEA,OAAA,WAAA,GAAOO,OAAAG,aAAA,CAACE,oCAAAA,EAAsBZ;AAChC"}
@@ -8,15 +8,24 @@ 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"));
11
13
  const _reactcomponents = require("@fluentui/react-components");
12
14
  const _useAddModule = require("../hooks/useAddModule");
13
15
  const _MorseCodestyles = require("./MorseCode.styles");
14
16
  const _morsecode = require("@fluentui-copilot/morse-code");
15
17
  const _renderMorseCode = require("../shared/renderMorseCode");
16
18
  const _MorseCodeHoudinistyles = require("./MorseCodeHoudini.styles");
17
- (0, _morsecode.initializeMorseCodeCustomProperties)();
18
19
  const MorseCodeHoudini = ({ baseUrl = _morsecode.DEFAULT_BASE_URL, fileName = _morsecode.DEFAULT_FILE_URL, className, ...restProps })=>{
19
- (0, _useAddModule.useAddModule)(baseUrl, fileName);
20
+ const { targetDocument } = (0, _reactcomponents.useFluent)();
21
+ var _targetDocument_defaultView;
22
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
23
+ _react.useEffect(()=>{
24
+ (0, _morsecode.initializeMorseCodeCustomProperties)(targetWindow);
25
+ }, [
26
+ targetWindow
27
+ ]);
28
+ (0, _useAddModule.useAddModule)(targetWindow, baseUrl, fileName);
20
29
  const morseCodeStyles = (0, _MorseCodestyles.useMorseCodeStyles)();
21
30
  const animationClassName = (0, _MorseCodeHoudinistyles.useMorseCodeAnimationClassName)();
22
31
  const wrapperClassName = (0, _reactcomponents.mergeClasses)(morseCodeStyles.wrapper, className);
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport { initializeMorseCodeCustomProperties, DEFAULT_BASE_URL, DEFAULT_FILE_URL } from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { renderMorseCode } from '../shared/renderMorseCode';\nimport { useMorseCodeAnimationClassName } from './MorseCodeHoudini.styles';\n\ninitializeMorseCodeCustomProperties();\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":["MorseCodeHoudini","initializeMorseCodeCustomProperties","baseUrl","DEFAULT_BASE_URL","fileName","DEFAULT_FILE_URL","className","restProps","useAddModule","morseCodeStyles","useMorseCodeStyles","animationClassName","useMorseCodeAnimationClassName","wrapperClassName","mergeClasses","wrapper","morseCodeClassName","base","renderMorseCode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;iCAZgB;8BACA;iCACM;2BAEqD;iCAGxD;wCACe;AAE/CC,IAAAA,8CAAAA;AAEO,MAAMD,mBAA6C,CAAC,EACzDE,UAAUC,2BAAgB,EAC1BC,WAAWC,2BAAgB,EAC3BC,SAAS,EACT,GAAGC,WACJ;IACCC,IAAAA,0BAAAA,EAAaN,SAASE;IAEtB,MAAMK,kBAAkBC,IAAAA,mCAAAA;IACxB,MAAMC,qBAAqBC,IAAAA,sDAAAA;IAC3B,MAAMC,mBAAmBC,IAAAA,6BAAAA,EAAaL,gBAAgBM,OAAO,EAAET;IAC/D,MAAMU,qBAAqBF,IAAAA,6BAAAA,EACzB,iBACA,wBACAL,gBAAgBQ,IAAI,EACpBN;IAGF,OAAOO,IAAAA,gCAAAA,EAAgBL,kBAAkBN,WAAWS;AACtD"}
1
+ {"version":3,"sources":["MorseCodeHoudini.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses, useFluent } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeStyles } from './MorseCode.styles';\n\nimport { initializeMorseCodeCustomProperties, DEFAULT_BASE_URL, DEFAULT_FILE_URL } from '@fluentui-copilot/morse-code';\n\nimport type { MorseCodeProps } from '../MorseCode.types';\nimport { renderMorseCode } from '../shared/renderMorseCode';\nimport { useMorseCodeAnimationClassName } from './MorseCodeHoudini.styles';\n\nexport const MorseCodeHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_FILE_URL,\n className,\n ...restProps\n}) => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n\n React.useEffect(() => {\n initializeMorseCodeCustomProperties(targetWindow);\n }, [targetWindow]);\n\n useAddModule(targetWindow, 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":["MorseCodeHoudini","baseUrl","DEFAULT_BASE_URL","fileName","DEFAULT_FILE_URL","className","restProps","targetDocument","useFluent","targetWindow","defaultView","undefined","React","useEffect","initializeMorseCodeCustomProperties","useAddModule","morseCodeStyles","useMorseCodeStyles","animationClassName","useMorseCodeAnimationClassName","wrapperClassName","mergeClasses","wrapper","morseCodeClassName","base","renderMorseCode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACiB;8BACX;iCACM;2BAEqD;iCAGxD;wCACe;AAExC,MAAMA,mBAA6C,CAAC,EACzDC,UAAUC,2BAAgB,EAC1BC,WAAWC,2BAAgB,EAC3BC,SAAS,EACT,GAAGC,WACJ;IACC,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,0BAAAA;QACND;IAArB,MAAME,eAAeF,CAAAA,8BAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBG,WAAW,AAAXA,MAAW,QAA3BH,gCAAAA,KAAAA,IAAAA,8BAA+BI;IAEpDC,OAAMC,SAAS,CAAC;QACdC,IAAAA,8CAAAA,EAAoCL;IACtC,GAAG;QAACA;KAAa;IAEjBM,IAAAA,0BAAAA,EAAaN,cAAcR,SAASE;IAEpC,MAAMa,kBAAkBC,IAAAA,mCAAAA;IACxB,MAAMC,qBAAqBC,IAAAA,sDAAAA;IAC3B,MAAMC,mBAAmBC,IAAAA,6BAAAA,EAAaL,gBAAgBM,OAAO,EAAEjB;IAC/D,MAAMkB,qBAAqBF,IAAAA,6BAAAA,EACzB,iBACA,wBACAL,gBAAgBQ,IAAI,EACpBN;IAGF,OAAOO,IAAAA,gCAAAA,EAAgBL,kBAAkBd,WAAWiB;AACtD"}
@@ -1 +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;IAEA,OAAA,WAAA,GACEC,OAAAC,aAAA,CAACC,OAAAA;QAAIC,WAAWP;QAAmB,GAAGC,YAAY;qBAChDG,OAAAC,aAAA,CAACC,OAAAA;QAAIE,KAAKL;QAAWI,WAAWL;;AAGtC"}
1
+ {"version":3,"sources":["renderMorseCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-components';\n\nexport const renderMorseCode = (\n wrapperClassName: string,\n wrapperProps: React.HTMLAttributes<HTMLDivElement>,\n morseCodeClassName: string,\n targetRef?: (node: HTMLElement | null) => void,\n): JSXElement => {\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":";;;;+BAGaA;;;eAAAA;;;;iEAHU;AAGhB,MAAMA,kBAAkB,CAC7BC,kBACAC,cACAC,oBACAC;IAEA,OAAA,WAAA,GACEC,OAAAC,aAAA,CAACC,OAAAA;QAAIC,WAAWP;QAAmB,GAAGC,YAAY;qBAChDG,OAAAC,aAAA,CAACC,OAAAA;QAAIE,KAAKL;QAAWI,WAAWL;;AAGtC"}
@@ -13,8 +13,14 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _houdiniutils = require("@fluentui-contrib/houdini-utils");
14
14
  const _MorseCodeSmallFallback = require("./MorseCodeSmallFallback");
15
15
  const _MorseCodeSmallHoudini = require("./MorseCodeSmallHoudini");
16
- const houdiniAvailable = (0, _houdiniutils.hasHoudini)();
16
+ const _reactcomponents = require("@fluentui/react-components");
17
17
  const MorseCodeSmall = (props)=>{
18
+ const { targetDocument } = (0, _reactcomponents.useFluent)();
19
+ var _targetDocument_defaultView;
20
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
21
+ const houdiniAvailable = _react.useMemo(()=>(0, _houdiniutils.hasHoudini)(targetWindow), [
22
+ targetWindow
23
+ ]);
18
24
  if (houdiniAvailable) {
19
25
  return /*#__PURE__*/ _react.createElement(_MorseCodeSmallHoudini.MorseCodeSmallHoudini, props);
20
26
  }
@@ -1 +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;IACtD,IAAIF,kBAAkB;QACpB,OAAA,WAAA,GAAOG,OAAAC,aAAA,CAACC,4CAAAA,EAA0BH;IACpC;IAEA,OAAA,WAAA,GAAOC,OAAAC,aAAA,CAACE,8CAAAA,EAA2BJ;AACrC"}
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';\nimport { useFluent } from '@fluentui/react-components';\n\nexport const MorseCodeSmall: React.FC<MorseCodeProps> = props => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n const houdiniAvailable = React.useMemo(() => hasHoudini(targetWindow), [targetWindow]);\n\n if (houdiniAvailable) {\n return <MorseCodeSmallHoudini {...props} />;\n }\n\n return <MorseCodeSmallFallback {...props} />;\n};\n"],"names":["MorseCodeSmall","props","targetDocument","useFluent","targetWindow","defaultView","undefined","houdiniAvailable","React","useMemo","hasHoudini","createElement","MorseCodeSmallHoudini","MorseCodeSmallFallback"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;8BACI;wCACY;uCACD;iCAGZ;AAEnB,MAAMA,iBAA2CC,CAAAA;IACtD,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,0BAAAA;QACND;IAArB,MAAME,eAAeF,CAAAA,8BAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBG,WAAW,AAAXA,MAAW,QAA3BH,gCAAAA,KAAAA,IAAAA,8BAA+BI;IACpD,MAAMC,mBAAmBC,OAAMC,OAAO,CAAC,IAAMC,IAAAA,wBAAAA,EAAWN,eAAe;QAACA;KAAa;IAErF,IAAIG,kBAAkB;QACpB,OAAA,WAAA,GAAOC,OAAAG,aAAA,CAACC,4CAAAA,EAA0BX;IACpC;IAEA,OAAA,WAAA,GAAOO,OAAAG,aAAA,CAACE,8CAAAA,EAA2BZ;AACrC"}
@@ -8,15 +8,24 @@ Object.defineProperty(exports, "MorseCodeSmallHoudini", {
8
8
  return MorseCodeSmallHoudini;
9
9
  }
10
10
  });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _reactcomponents = require("@fluentui/react-components");
12
14
  const _useAddModule = require("../hooks/useAddModule");
13
15
  const _MorseCodeSmallstyles = require("./MorseCodeSmall.styles");
14
16
  const _morsecode = require("@fluentui-copilot/morse-code");
15
17
  const _renderMorseCode = require("../shared/renderMorseCode");
16
18
  const _MorseCodeSmallHoudinistyles = require("./MorseCodeSmallHoudini.styles");
17
- (0, _morsecode.initializeMorseCodeSmallCustomProperties)();
18
19
  const MorseCodeSmallHoudini = ({ baseUrl = _morsecode.DEFAULT_BASE_URL, fileName = _morsecode.DEFAULT_SMALL_FILE_URL, className, ...restProps })=>{
19
- (0, _useAddModule.useAddModule)(baseUrl, fileName);
20
+ const { targetDocument } = (0, _reactcomponents.useFluent)();
21
+ var _targetDocument_defaultView;
22
+ const targetWindow = (_targetDocument_defaultView = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) !== null && _targetDocument_defaultView !== void 0 ? _targetDocument_defaultView : undefined;
23
+ _react.useEffect(()=>{
24
+ (0, _morsecode.initializeMorseCodeSmallCustomProperties)(targetWindow);
25
+ }, [
26
+ targetWindow
27
+ ]);
28
+ (0, _useAddModule.useAddModule)(targetWindow, baseUrl, fileName);
20
29
  const morseCodeSmallStyles = (0, _MorseCodeSmallstyles.useMorseCodeSmallStyles)();
21
30
  const animationClassName = (0, _MorseCodeSmallHoudinistyles.useMorseCodeAnimationClassName)();
22
31
  const wrapperClassName = (0, _reactcomponents.mergeClasses)(morseCodeSmallStyles.wrapper, className);
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeSmallHoudini.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\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';\nimport { useMorseCodeAnimationClassName } from './MorseCodeSmallHoudini.styles';\n\ninitializeMorseCodeSmallCustomProperties();\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":["MorseCodeSmallHoudini","initializeMorseCodeSmallCustomProperties","baseUrl","DEFAULT_BASE_URL","fileName","DEFAULT_SMALL_FILE_URL","className","restProps","useAddModule","morseCodeSmallStyles","useMorseCodeSmallStyles","animationClassName","useMorseCodeAnimationClassName","wrapperClassName","mergeClasses","wrapper","morseCodeClassName","base","renderMorseCode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;iCAhBgB;8BACA;sCACW;2BAMjC;iCAGyB;6CACe;AAE/CC,IAAAA,mDAAAA;AAEO,MAAMD,wBAAkD,CAAC,EAC9DE,UAAUC,2BAAgB,EAC1BC,WAAWC,iCAAsB,EACjCC,SAAS,EACT,GAAGC,WACJ;IACCC,IAAAA,0BAAAA,EAAaN,SAASE;IAEtB,MAAMK,uBAAuBC,IAAAA,6CAAAA;IAC7B,MAAMC,qBAAqBC,IAAAA,2DAAAA;IAC3B,MAAMC,mBAAmBC,IAAAA,6BAAAA,EAAaL,qBAAqBM,OAAO,EAAET;IACpE,MAAMU,qBAAqBF,IAAAA,6BAAAA,EACzB,sBACA,6BACAL,qBAAqBQ,IAAI,EACzBN;IAGF,OAAOO,IAAAA,gCAAAA,EAAgBL,kBAAkBN,WAAWS;AACtD"}
1
+ {"version":3,"sources":["MorseCodeSmallHoudini.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses, useFluent } from '@fluentui/react-components';\nimport { useAddModule } from '../hooks/useAddModule';\nimport { useMorseCodeSmallStyles } from './MorseCodeSmall.styles';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\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';\nimport { useMorseCodeAnimationClassName } from './MorseCodeSmallHoudini.styles';\n\nexport const MorseCodeSmallHoudini: React.FC<MorseCodeProps> = ({\n baseUrl = DEFAULT_BASE_URL,\n fileName = DEFAULT_SMALL_FILE_URL,\n className,\n ...restProps\n}) => {\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView ?? undefined;\n\n React.useEffect(() => {\n initializeMorseCodeSmallCustomProperties(targetWindow);\n }, [targetWindow]);\n\n useAddModule(targetWindow, 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":["MorseCodeSmallHoudini","baseUrl","DEFAULT_BASE_URL","fileName","DEFAULT_SMALL_FILE_URL","className","restProps","targetDocument","useFluent","targetWindow","defaultView","undefined","React","useEffect","initializeMorseCodeSmallCustomProperties","useAddModule","morseCodeSmallStyles","useMorseCodeSmallStyles","animationClassName","useMorseCodeAnimationClassName","wrapperClassName","mergeClasses","wrapper","morseCodeClassName","base","renderMorseCode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;iCACiB;8BACX;sCACW;2BAMjC;iCAGyB;6CACe;AAExC,MAAMA,wBAAkD,CAAC,EAC9DC,UAAUC,2BAAgB,EAC1BC,WAAWC,iCAAsB,EACjCC,SAAS,EACT,GAAGC,WACJ;IACC,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,0BAAAA;QACND;IAArB,MAAME,eAAeF,CAAAA,8BAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBG,WAAW,AAAXA,MAAW,QAA3BH,gCAAAA,KAAAA,IAAAA,8BAA+BI;IAEpDC,OAAMC,SAAS,CAAC;QACdC,IAAAA,mDAAAA,EAAyCL;IAC3C,GAAG;QAACA;KAAa;IAEjBM,IAAAA,0BAAAA,EAAaN,cAAcR,SAASE;IAEpC,MAAMa,uBAAuBC,IAAAA,6CAAAA;IAC7B,MAAMC,qBAAqBC,IAAAA,2DAAAA;IAC3B,MAAMC,mBAAmBC,IAAAA,6BAAAA,EAAaL,qBAAqBM,OAAO,EAAEjB;IACpE,MAAMkB,qBAAqBF,IAAAA,6BAAAA,EACzB,sBACA,6BACAL,qBAAqBQ,IAAI,EACzBN;IAGF,OAAOO,IAAAA,gCAAAA,EAAgBL,kBAAkBd,WAAWiB;AACtD"}
@@ -10,7 +10,6 @@ Object.defineProperty(exports, "useMorseCodeAnimationClassName", {
10
10
  });
11
11
  const _reactcomponents = require("@fluentui/react-components");
12
12
  const _morsecode = require("@fluentui-copilot/morse-code");
13
- (0, _morsecode.initializeMorseCodeSmallCustomProperties)();
14
13
  const sharedStyles = {
15
14
  backgroundImage: _morsecode.morseCodeSmallTokens.backgroundImage,
16
15
  animationIterationCount: _morsecode.morseCodeSmallTokens.morseCodeAnimationIterationCount,
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\n morseCodeSmallAnimationTokens,\n morseCodeSmallTokens,\n} from '@fluentui-copilot/morse-code';\n\ninitializeMorseCodeSmallCustomProperties();\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["useMorseCodeAnimationClassName","initializeMorseCodeSmallCustomProperties","sharedStyles","backgroundImage","morseCodeSmallTokens","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","makeResetStyles","animationName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;iCAjBW;2BAMjB;AAEPC,IAAAA,mDAAAA;AAEA,MAAMC,eAAe;qBACnBC,+BAAiBC,CAAAA,eAAqBD;6BACtCE,+BAAyBD,CAAAA,gCAAqBE;uBAC9CC,+BAAmBH,CAAAA,0BAAqBI;6BACxCC,+BAAyBL,CAAAA,gCAAqBM;AAChD;AAEO,MAAMV,iCAAiCW,IAAAA,8BAAAA,EAAAA,YAAgB,WAAA;OAC5D;QAAA;QAAe;QAAA;QAAA;KAAA;OACfC;QAAAA;QAAe;KAAA;4DAA0F"}
1
+ {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport { morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["useMorseCodeAnimationClassName","sharedStyles","backgroundImage","morseCodeSmallTokens","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","makeResetStyles","animationName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;iCAXW;2BAE4C;AAEpE,MAAMC,eAAe;qBACnBC,+BAAiBC,CAAAA,eAAqBD;6BACtCE,+BAAyBD,CAAAA,gCAAqBE;uBAC9CC,+BAAmBH,CAAAA,0BAAqBI;6BACxCC,+BAAyBL,CAAAA,gCAAqBM;AAChD;AAEO,MAAMT,iCAAiCU,IAAAA,8BAAAA,EAAAA,YAAgB,WAAA;OAC5D;QAAA;QAAe;QAAA;QAAA;KAAA;OACfC;QAAAA;QAAe;KAAA;4DAA0F"}
@@ -10,7 +10,6 @@ Object.defineProperty(exports, "useMorseCodeAnimationClassName", {
10
10
  });
11
11
  const _reactcomponents = require("@fluentui/react-components");
12
12
  const _morsecode = require("@fluentui-copilot/morse-code");
13
- (0, _morsecode.initializeMorseCodeSmallCustomProperties)();
14
13
  const sharedStyles = {
15
14
  backgroundImage: _morsecode.morseCodeSmallTokens.backgroundImage,
16
15
  animationIterationCount: _morsecode.morseCodeSmallTokens.morseCodeAnimationIterationCount,
@@ -1 +1 @@
1
- {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport {\n initializeMorseCodeSmallCustomProperties,\n morseCodeSmallAnimationTokens,\n morseCodeSmallTokens,\n} from '@fluentui-copilot/morse-code';\n\ninitializeMorseCodeSmallCustomProperties();\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["useMorseCodeAnimationClassName","initializeMorseCodeSmallCustomProperties","sharedStyles","backgroundImage","morseCodeSmallTokens","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","makeResetStyles","animationName","morseCodeSmallAnimationTokens","colorAnimation","dotsAndDashes","colorHCAnimation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;iCAjBmB;2BAMzB;AAEPC,IAAAA,mDAAAA;AAEA,MAAMC,eAAe;IACnBC,iBAAiBC,+BAAAA,CAAqBD,eAAe;IACrDE,yBAAyBD,+BAAAA,CAAqBE,gCAAgC;IAC9EC,mBAAmBH,+BAAAA,CAAqBI,0BAA0B;IAClEC,yBAAyBL,+BAAAA,CAAqBM,gCAAgC;AAChF;AAEO,MAAMV,iCAAiCW,IAAAA,gCAAAA,EAAgB;IAC5D,GAAGT,YAAY;IACfU,eAAe;QAACC,wCAAAA,CAA8BC,cAAc;QAAED,wCAAAA,CAA8BE,aAAa;KAAC;IAE1G,kCAAkC;QAChC,GAAGb,YAAY;QACfU,eAAe;YAACC,wCAAAA,CAA8BG,gBAAgB;YAAEH,wCAAAA,CAA8BE,aAAa;SAAC;IAC9G;AACF"}
1
+ {"version":3,"sources":["MorseCodeSmallHoudini.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@fluentui/react-components';\n\nimport { morseCodeSmallAnimationTokens, morseCodeSmallTokens } from '@fluentui-copilot/morse-code';\n\nconst sharedStyles = {\n backgroundImage: morseCodeSmallTokens.backgroundImage,\n animationIterationCount: morseCodeSmallTokens.morseCodeAnimationIterationCount,\n animationDuration: morseCodeSmallTokens.morseCodeAnimationDuration,\n animationTimingFunction: morseCodeSmallTokens.morseCodeAnimationTimingFunction,\n};\n\nexport const 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"],"names":["useMorseCodeAnimationClassName","sharedStyles","backgroundImage","morseCodeSmallTokens","animationIterationCount","morseCodeAnimationIterationCount","animationDuration","morseCodeAnimationDuration","animationTimingFunction","morseCodeAnimationTimingFunction","makeResetStyles","animationName","morseCodeSmallAnimationTokens","colorAnimation","dotsAndDashes","colorHCAnimation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;iCAXmB;2BAEoC;AAEpE,MAAMC,eAAe;IACnBC,iBAAiBC,+BAAAA,CAAqBD,eAAe;IACrDE,yBAAyBD,+BAAAA,CAAqBE,gCAAgC;IAC9EC,mBAAmBH,+BAAAA,CAAqBI,0BAA0B;IAClEC,yBAAyBL,+BAAAA,CAAqBM,gCAAgC;AAChF;AAEO,MAAMT,iCAAiCU,IAAAA,gCAAAA,EAAgB;IAC5D,GAAGT,YAAY;IACfU,eAAe;QAACC,wCAAAA,CAA8BC,cAAc;QAAED,wCAAAA,CAA8BE,aAAa;KAAC;IAE1G,kCAAkC;QAChC,GAAGb,YAAY;QACfU,eAAe;YAACC,wCAAAA,CAA8BG,gBAAgB;YAAEH,wCAAAA,CAA8BE,aAAa;SAAC;IAC9G;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-morse-code",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "A Fluent AI package",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,17 +12,17 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-contrib/houdini-utils": "0.3.5",
16
- "@fluentui-copilot/morse-code": "^0.0.11",
15
+ "@fluentui-contrib/houdini-utils": "^0.5.1",
16
+ "@fluentui-copilot/morse-code": "~0.1.0",
17
17
  "@swc/helpers": "^0.5.1"
18
18
  },
19
19
  "peerDependencies": {
20
- "@fluentui/react-components": ">=9.66.0 <10.0.0",
21
- "@fluentui/react-jsx-runtime": ">=9.1.1 <10.0.0",
22
- "@types/react": ">=16.14.0 <19.0.0",
23
- "@types/react-dom": ">=16.9.8 <19.0.0",
24
- "react": ">=16.14.0 <19.0.0",
25
- "react-dom": ">=16.14.0 <19.0.0"
20
+ "@fluentui/react-components": ">=9.70.0 <10.0.0",
21
+ "@fluentui/react-jsx-runtime": ">=9.2.0 <10.0.0",
22
+ "@types/react": ">=16.14.0 <20.0.0",
23
+ "@types/react-dom": ">=16.9.8 <20.0.0",
24
+ "react": ">=16.14.0 <20.0.0",
25
+ "react-dom": ">=16.14.0 <20.0.0"
26
26
  },
27
27
  "beachball": {
28
28
  "disallowedChangeTypes": [