@hanzogui/logo 8.3.0 → 8.3.2

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 (129) hide show
  1. package/dist/cjs/GuiLogo.js +12 -0
  2. package/dist/cjs/GuiLogo.js.map +1 -0
  3. package/dist/cjs/GuiLogoSvg.js +19 -0
  4. package/dist/cjs/GuiLogoSvg.js.map +1 -0
  5. package/dist/cjs/LogoIcon.js +14 -0
  6. package/dist/cjs/LogoIcon.js.map +1 -0
  7. package/dist/cjs/LogoWords.js +80 -0
  8. package/dist/cjs/LogoWords.js.map +1 -0
  9. package/dist/cjs/SeasonProvider.js +42 -0
  10. package/dist/cjs/SeasonProvider.js.map +1 -0
  11. package/dist/cjs/ThemeTint.js +18 -0
  12. package/dist/cjs/ThemeTint.js.map +1 -0
  13. package/dist/cjs/index.js +11 -0
  14. package/dist/cjs/index.js.map +1 -0
  15. package/dist/cjs/package.json +1 -0
  16. package/dist/cjs/tints.js +102 -0
  17. package/dist/cjs/tints.js.map +1 -0
  18. package/dist/cjs/useTint.js +93 -0
  19. package/dist/cjs/useTint.js.map +1 -0
  20. package/dist/esm/GuiLogo.js +8 -0
  21. package/dist/esm/GuiLogo.js.map +1 -0
  22. package/dist/esm/GuiLogoSvg.js +15 -0
  23. package/dist/esm/GuiLogoSvg.js.map +1 -0
  24. package/dist/esm/LogoIcon.js +10 -0
  25. package/dist/esm/LogoIcon.js.map +1 -0
  26. package/dist/esm/LogoWords.js +76 -0
  27. package/dist/esm/LogoWords.js.map +1 -0
  28. package/dist/esm/SeasonProvider.js +39 -0
  29. package/dist/esm/SeasonProvider.js.map +1 -0
  30. package/dist/esm/ThemeTint.js +13 -0
  31. package/dist/esm/ThemeTint.js.map +1 -0
  32. package/dist/esm/index.js +8 -8
  33. package/dist/esm/index.js.map +1 -1
  34. package/dist/esm/tints.js +93 -0
  35. package/dist/esm/tints.js.map +1 -0
  36. package/dist/esm/useTint.js +83 -0
  37. package/dist/esm/useTint.js.map +1 -0
  38. package/package.json +24 -25
  39. package/src/GuiLogo.tsx +2 -2
  40. package/src/LogoIcon.tsx +1 -1
  41. package/src/LogoWords.tsx +1 -1
  42. package/src/SeasonProvider.tsx +1 -1
  43. package/src/ThemeTint.tsx +1 -1
  44. package/src/index.tsx +7 -7
  45. package/src/useTint.tsx +1 -1
  46. package/types/GuiLogo.d.ts +7 -8
  47. package/types/GuiLogo.d.ts.map +1 -11
  48. package/types/GuiLogoSvg.d.ts +12 -13
  49. package/types/GuiLogoSvg.d.ts.map +1 -11
  50. package/types/LogoIcon.d.ts +4 -5
  51. package/types/LogoIcon.d.ts.map +1 -11
  52. package/types/LogoWords.d.ts +5 -6
  53. package/types/LogoWords.d.ts.map +1 -11
  54. package/types/SeasonProvider.d.ts +3 -4
  55. package/types/SeasonProvider.d.ts.map +1 -11
  56. package/types/ThemeTint.d.ts +5 -6
  57. package/types/ThemeTint.d.ts.map +1 -11
  58. package/types/index.d.ts +7 -8
  59. package/types/index.d.ts.map +1 -11
  60. package/types/tints.d.ts +17 -16
  61. package/types/tints.d.ts.map +1 -11
  62. package/types/useTint.d.ts +22 -23
  63. package/types/useTint.d.ts.map +1 -11
  64. package/dist/cjs/GuiLogo.cjs +0 -59
  65. package/dist/cjs/GuiLogo.native.js +0 -63
  66. package/dist/cjs/GuiLogo.native.js.map +0 -1
  67. package/dist/cjs/GuiLogoSvg.cjs +0 -42
  68. package/dist/cjs/GuiLogoSvg.native.js +0 -50
  69. package/dist/cjs/GuiLogoSvg.native.js.map +0 -1
  70. package/dist/cjs/LogoIcon.cjs +0 -51
  71. package/dist/cjs/LogoIcon.native.js +0 -55
  72. package/dist/cjs/LogoIcon.native.js.map +0 -1
  73. package/dist/cjs/LogoWords.cjs +0 -130
  74. package/dist/cjs/LogoWords.native.js +0 -139
  75. package/dist/cjs/LogoWords.native.js.map +0 -1
  76. package/dist/cjs/SeasonProvider.cjs +0 -46
  77. package/dist/cjs/SeasonProvider.native.js +0 -57
  78. package/dist/cjs/SeasonProvider.native.js.map +0 -1
  79. package/dist/cjs/ThemeTint.cjs +0 -57
  80. package/dist/cjs/ThemeTint.native.js +0 -62
  81. package/dist/cjs/ThemeTint.native.js.map +0 -1
  82. package/dist/cjs/index.cjs +0 -26
  83. package/dist/cjs/index.native.js +0 -29
  84. package/dist/cjs/index.native.js.map +0 -1
  85. package/dist/cjs/tints.cjs +0 -102
  86. package/dist/cjs/tints.native.js +0 -107
  87. package/dist/cjs/tints.native.js.map +0 -1
  88. package/dist/cjs/useTint.cjs +0 -116
  89. package/dist/cjs/useTint.native.js +0 -128
  90. package/dist/cjs/useTint.native.js.map +0 -1
  91. package/dist/esm/GuiLogo.mjs +0 -34
  92. package/dist/esm/GuiLogo.mjs.map +0 -1
  93. package/dist/esm/GuiLogo.native.js +0 -35
  94. package/dist/esm/GuiLogo.native.js.map +0 -1
  95. package/dist/esm/GuiLogoSvg.mjs +0 -17
  96. package/dist/esm/GuiLogoSvg.mjs.map +0 -1
  97. package/dist/esm/GuiLogoSvg.native.js +0 -22
  98. package/dist/esm/GuiLogoSvg.native.js.map +0 -1
  99. package/dist/esm/LogoIcon.mjs +0 -26
  100. package/dist/esm/LogoIcon.mjs.map +0 -1
  101. package/dist/esm/LogoIcon.native.js +0 -27
  102. package/dist/esm/LogoIcon.native.js.map +0 -1
  103. package/dist/esm/LogoWords.mjs +0 -94
  104. package/dist/esm/LogoWords.mjs.map +0 -1
  105. package/dist/esm/LogoWords.native.js +0 -100
  106. package/dist/esm/LogoWords.native.js.map +0 -1
  107. package/dist/esm/SeasonProvider.mjs +0 -21
  108. package/dist/esm/SeasonProvider.mjs.map +0 -1
  109. package/dist/esm/SeasonProvider.native.js +0 -29
  110. package/dist/esm/SeasonProvider.native.js.map +0 -1
  111. package/dist/esm/ThemeTint.mjs +0 -31
  112. package/dist/esm/ThemeTint.mjs.map +0 -1
  113. package/dist/esm/ThemeTint.native.js +0 -33
  114. package/dist/esm/ThemeTint.native.js.map +0 -1
  115. package/dist/esm/index.mjs +0 -8
  116. package/dist/esm/index.mjs.map +0 -1
  117. package/dist/esm/index.native.js +0 -8
  118. package/dist/esm/index.native.js.map +0 -1
  119. package/dist/esm/tints.mjs +0 -62
  120. package/dist/esm/tints.mjs.map +0 -1
  121. package/dist/esm/tints.native.js +0 -64
  122. package/dist/esm/tints.native.js.map +0 -1
  123. package/dist/esm/useTint.mjs +0 -74
  124. package/dist/esm/useTint.mjs.map +0 -1
  125. package/dist/esm/useTint.native.js +0 -83
  126. package/dist/esm/useTint.native.js.map +0 -1
  127. package/icon/index.js +0 -1
  128. package/icon/index.native.js +0 -1
  129. package/icon.cjs +0 -1
@@ -1,11 +1 @@
1
- {
2
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc",
3
- "names": [],
4
- "sources": [
5
- "src/index.tsx"
6
- ],
7
- "version": 3,
8
- "sourcesContent": [
9
- "export * from './GuiLogo'\nexport * from './LogoWords'\nexport * from './LogoIcon'\nexport * from './tints'\nexport * from './useTint'\nexport * from './ThemeTint'\nexport * from './SeasonProvider'\n"
10
- ]
11
- }
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA"}
package/types/tints.d.ts CHANGED
@@ -1,31 +1,32 @@
1
- import type { ThemeName } from "@hanzo/gui";
1
+ import type { ThemeName } from '@hanzo/gui';
2
2
  type ChangeHandler = (next: TintFamily) => void;
3
3
  declare const familiesValues: {
4
- hanzogui: ThemeName[];
5
- xmas: ThemeName[];
6
- easter: ThemeName[];
7
- halloween: ThemeName[];
8
- valentine: ThemeName[];
9
- lunar: ThemeName[];
10
- stpatricks: ThemeName[];
4
+ hanzogui: ThemeName[];
5
+ xmas: ThemeName[];
6
+ easter: ThemeName[];
7
+ halloween: ThemeName[];
8
+ valentine: ThemeName[];
9
+ lunar: ThemeName[];
10
+ stpatricks: ThemeName[];
11
11
  };
12
12
  type Family = keyof typeof familiesValues;
13
- type Families = { [key in Family] : ThemeName[] };
13
+ type Families = {
14
+ [key in Family]: ThemeName[];
15
+ };
14
16
  declare const families: Families;
15
17
  export type TintFamily = keyof typeof families;
16
18
  export declare function getTints(): {
17
- name: string;
18
- tints: ThemeName[];
19
- families: Families;
19
+ name: string;
20
+ tints: ThemeName[];
21
+ families: Families;
20
22
  };
21
23
  export declare function useTints(): {
22
- name: string;
23
- tints: ThemeName[];
24
- families: Families;
24
+ name: string;
25
+ tints: ThemeName[];
26
+ families: Families;
25
27
  };
26
28
  export declare function setTintFamily(next: TintFamily): void;
27
29
  export declare const setNextTintFamily: () => void;
28
30
  export declare const onTintFamilyChange: (cb: ChangeHandler) => () => void;
29
31
  export {};
30
-
31
32
  //# sourceMappingURL=tints.d.ts.map
@@ -1,11 +1 @@
1
- {
2
- "mappings": "AACA,cAAc,iBAAiB;KAE1B,iBAAiB,MAAM;AAQ5B,cAAM;CACJ,UAA4E;CAC5E,MAAiE;CACjE,QAQK;CACL,WAQK;CACL,WAAgE;CAChE,OAAkE;CAClE,YAQK;;KAGF,sBAAsB;KAMtB,cAAc,OAAO,UAAS;AACnC,cAAM,UAA6B;AAEnC,YAAY,0BAA0B;AAItC,OAAO,iBAAS,YAAY;CAC1B;CACA,OAAO;CACP,UAAU;;AASZ,OAAO,iBAAS,YAAY;CAC1B;CACA,OAAO;CACP,UAAU;;AAeZ,OAAO,iBAAS,cAAc,MAAM;AAwBpC,OAAO,cAAM;AAIb,OAAO,cAAM,qBAAsB,IAAI",
3
- "names": [],
4
- "sources": [
5
- "src/tints.tsx"
6
- ],
7
- "version": 3,
8
- "sourcesContent": [
9
- "import React from 'react'\nimport type { ThemeName } from '@hanzo/gui'\n\ntype ChangeHandler = (next: TintFamily) => void\n\nconst listeners = new Set<ChangeHandler>()\n\n// A seasonal ramp of tint stops. These used to be one entry per letter of the\n// old seven-letter wordmark, with index 3 reserved as the neutral notch; the\n// wordmark is Hanzo now and every reader indexes by `tints.length`, so the\n// length is just how many stops the ramp has.\nconst familiesValues = {\n hanzogui: ['yellow', 'yellow', 'yellow', 'gray', 'red', 'green', 'blue'] as ThemeName[],\n xmas: ['red', 'green', 'red', 'green', 'red', 'green', 'red'] as ThemeName[],\n easter: [\n 'yellow',\n 'yellow',\n 'yellow',\n 'yellow',\n 'yellow',\n 'yellow',\n 'yellow',\n ] as ThemeName[],\n halloween: [\n 'yellow',\n 'gray',\n 'yellow',\n 'gray',\n 'yellow',\n 'gray',\n 'yellow',\n ] as ThemeName[],\n valentine: ['red', 'red', 'red', 'red', 'red', 'red', 'red'] as ThemeName[],\n lunar: ['yellow', 'red', 'red', 'red', 'red', 'red', 'yellow'] as ThemeName[],\n stpatricks: [\n 'green',\n 'yellow',\n 'green',\n 'yellow',\n 'green',\n 'yellow',\n 'green',\n ] as ThemeName[],\n}\n\ntype Family = keyof typeof familiesValues\n\nconst DEFAULT_FAMILY: Family = 'hanzogui'\n\nconst familiesNames = Object.keys(familiesValues) as any as Family[]\n\ntype Families = { [key in Family]: ThemeName[] }\nconst families = familiesValues as Families\n\nexport type TintFamily = keyof typeof families\n\nlet fam: TintFamily = DEFAULT_FAMILY\n\nexport function getTints(): {\n name: string\n tints: ThemeName[]\n families: Families\n} {\n return {\n name: fam || DEFAULT_FAMILY,\n tints: families[fam] || families.hanzogui,\n families,\n }\n}\n\nexport function useTints(): {\n name: string\n tints: ThemeName[]\n families: Families\n} {\n const [val, setVal] = React.useState(getTints())\n\n React.useEffect(() => {\n return onTintFamilyChange(() => {\n React.startTransition(() => {\n setVal(getTints())\n })\n })\n }, [])\n\n return val\n}\n\nexport function setTintFamily(next: TintFamily): void {\n if (!families[next]) throw `impossible`\n fam = next\n\n // update DOM class for CSS-based styling (e.g., rainbow gradients)\n if (typeof document !== 'undefined') {\n const root = document.documentElement.classList\n // remove all season classes\n familiesNames.forEach((s) => {\n if (s !== 'hanzogui') {\n root.remove(`${s}-season`)\n }\n })\n // add the new one if not hanzogui\n if (next !== 'hanzogui') {\n root.add(`${next}-season`)\n }\n }\n\n React.startTransition(() => {\n listeners.forEach((l) => l(next))\n })\n}\n\nexport const setNextTintFamily = (): void => {\n setTintFamily(familiesNames[(familiesNames.indexOf(fam) + 1) % familiesNames.length])\n}\n\nexport const onTintFamilyChange = (cb: ChangeHandler) => {\n listeners.add(cb)\n return (): void => {\n listeners.delete(cb)\n }\n}\n"
10
- ]
11
- }
1
+ {"version":3,"file":"tints.d.ts","sourceRoot":"","sources":["../src/tints.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAA;AAQ/C,QAAA,MAAM,cAAc;IAClB,QAAQ,EAAoE,SAAS,EAAE;IACvF,IAAI,EAA6D,SAAS,EAAE;IAC5E,MAAM,EAQD,SAAS,EAAE;IAChB,SAAS,EAQJ,SAAS,EAAE;IAChB,SAAS,EAAuD,SAAS,EAAE;IAC3E,KAAK,EAA6D,SAAS,EAAE;IAC7E,UAAU,EAQL,SAAS,EAAE;CACjB,CAAA;AAED,KAAK,MAAM,GAAG,MAAM,OAAO,cAAc,CAAA;AAMzC,KAAK,QAAQ,GAAG;KAAG,GAAG,IAAI,MAAM,GAAG,SAAS,EAAE;CAAE,CAAA;AAChD,QAAA,MAAM,QAAQ,EAAqB,QAAQ,CAAA;AAE3C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,QAAQ,CAAA;AAI9C,wBAAgB,QAAQ,IAAI;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAMA;AAED,wBAAgB,QAAQ,IAAI;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAYA;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAsBpD;AAED,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAA;AAED,eAAO,MAAM,kBAAkB,OAAQ,aAAa,WAEvC,IAGZ,CAAA"}
@@ -1,31 +1,30 @@
1
- import React from "react";
2
- import { type ThemeName } from "@hanzo/gui";
1
+ import React from 'react';
2
+ import { type ThemeName } from '@hanzo/gui';
3
3
  export declare const onTintChange: (listener: (cur: number) => void) => () => void;
4
4
  export declare const setTintIndex: (next: number) => void;
5
5
  export declare const setDisableTintTheme: (disable: boolean) => void;
6
6
  export declare const getDisableTintTheme: () => boolean;
7
- export declare function getDocsSection(pathname: string): "compiler" | "ui" | "core" | null;
7
+ export declare function getDocsSection(pathname: string): 'compiler' | 'ui' | 'core' | null;
8
8
  export declare const InitialPathContext: React.Context<number>;
9
9
  export declare const useTint: (altOffset?: number) => {
10
- tints: ThemeName[];
11
- tintIndex: number;
12
- tintAltIndex: number;
13
- tint: ThemeName;
14
- tintAlt: ThemeName;
15
- setTintIndex: (next: number) => void;
16
- setNextTintFamily: () => void;
17
- setNextTint: () => void;
18
- setDisableTintTheme: (disable: boolean) => void;
19
- disableTintTheme: boolean;
20
- name: string;
21
- families: {
22
- hanzogui: string[];
23
- xmas: string[];
24
- easter: string[];
25
- halloween: string[];
26
- valentine: string[];
27
- lunar: string[];
28
- };
10
+ tints: ThemeName[];
11
+ tintIndex: number;
12
+ tintAltIndex: number;
13
+ tint: ThemeName;
14
+ tintAlt: ThemeName;
15
+ setTintIndex: (next: number) => void;
16
+ setNextTintFamily: () => void;
17
+ setNextTint: () => void;
18
+ setDisableTintTheme: (disable: boolean) => void;
19
+ disableTintTheme: boolean;
20
+ name: string;
21
+ families: {
22
+ hanzogui: string[];
23
+ xmas: string[];
24
+ easter: string[];
25
+ halloween: string[];
26
+ valentine: string[];
27
+ lunar: string[];
28
+ };
29
29
  };
30
-
31
30
  //# sourceMappingURL=useTint.d.ts.map
@@ -1,11 +1 @@
1
- {
2
- "mappings": "AAAA,OAAO,WAA+D;AACtE,cAA+B,iBAAiB;AAShD,OAAO,cAAM,eAAgB,WAAW;AASxC,OAAO,cAAM,eAAgB;AAQ7B,OAAO,cAAM,sBAAuB;AAMpC,OAAO,cAAM;AAEb,OAAO,iBAAS,eAAe,mBAAmB,aAAa,OAAO;AAYtE,OAAO,cAAM,oBAAoB,MAAM;AAEvC,OAAO,cAAM,UACX,uBACC;CACD,OAAO;CACP;CACA;CACA,MAAM;CACN,SAAS;CACT,eAAe;CACf;CACA;CACA,sBAAsB;CACtB;CACA;CACA,UAAU;EACR;EACA;EACA;EACA;EACA;EACA",
3
- "names": [],
4
- "sources": [
5
- "src/useTint.tsx"
6
- ],
7
- "version": 3,
8
- "sourcesContent": [
9
- "import React, { createContext, useContext, useEffect, useState } from 'react'\nimport { useDidFinishSSR, type ThemeName } from '@hanzo/gui'\nimport { getTints, setNextTintFamily, useTints } from './tints'\n\nlet current = 3\nlet disableTintTheme = false\n\nconst listeners = new Set<Function>()\nconst disableListeners = new Set<Function>()\n\nexport const onTintChange = (listener: (cur: number) => void) => {\n listeners.add(listener)\n return (): void => {\n listeners.delete(listener)\n }\n}\n\nconst numTints = getTints().tints.length\n\nexport const setTintIndex = (next: number): void => {\n const val = Math.max(0, next % numTints)\n if (val === current) return\n current = val\n listeners.forEach((x) => x(val))\n}\n\n// when true, useTint returns null for tint/tintAlt so ThemeTint doesn't apply sub-themes\nexport const setDisableTintTheme = (disable: boolean): void => {\n if (disable === disableTintTheme) return\n disableTintTheme = disable\n disableListeners.forEach((x) => x(disable))\n}\n\nexport const getDisableTintTheme = (): boolean => disableTintTheme\n\nexport function getDocsSection(pathname: string): 'compiler' | 'ui' | 'core' | null {\n return pathname === '/docs/intro/compiler-install' ||\n pathname === '/docs/intro/benchmarks' ||\n pathname === '/docs/intro/why-a-compiler'\n ? 'compiler'\n : pathname.startsWith('/ui/')\n ? 'ui'\n : pathname.startsWith('/docs/')\n ? 'core'\n : null\n}\n\nexport const InitialPathContext: React.Context<number> = createContext(3)\n\nexport const useTint = (\n altOffset = -1\n): {\n tints: ThemeName[]\n tintIndex: number\n tintAltIndex: number\n tint: ThemeName\n tintAlt: ThemeName\n setTintIndex: (next: number) => void\n setNextTintFamily: () => void\n setNextTint: () => void\n setDisableTintTheme: (disable: boolean) => void\n disableTintTheme: boolean\n name: string\n families: {\n hanzogui: string[]\n xmas: string[]\n easter: string[]\n halloween: string[]\n valentine: string[]\n lunar: string[]\n }\n} => {\n const initial = useContext(InitialPathContext)\n const didHydrate = useDidFinishSSR()\n const [index, setIndex] = useState(didHydrate ? current : initial)\n const [disabled, setDisabled] = useState(disableTintTheme)\n const tintsContext = useTints()\n const { tints } = tintsContext\n const tintAltIndex = Math.abs((index + altOffset) % tints.length)\n\n useEffect(() => {\n return onTintChange((cur) => {\n setIndex(cur)\n })\n }, [])\n\n useEffect(() => {\n const cb = (val: boolean) => setDisabled(val)\n disableListeners.add(cb)\n return () => {\n disableListeners.delete(cb)\n }\n }, [])\n\n // return null for tint when disabled or at the \"none\" position (index 3)\n const tint = disabled || index === 3 ? null : tints[index]\n const tintAlt = disabled || tintAltIndex === 3 ? null : tints[tintAltIndex]\n\n return {\n ...tintsContext,\n tints: tintsContext.tints as ThemeName[],\n tintIndex: index,\n tintAltIndex,\n tint: tint as ThemeName,\n tintAlt: tintAlt as ThemeName,\n setTintIndex,\n setNextTintFamily,\n setDisableTintTheme,\n disableTintTheme: disabled,\n setNextTint: () => {\n React.startTransition(() => {\n setTintIndex(index + 1)\n })\n },\n } as const\n}\n"
10
- ]
11
- }
1
+ {"version":3,"file":"useTint.d.ts","sourceRoot":"","sources":["../src/useTint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAA;AAC7E,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAS5D,eAAO,MAAM,YAAY,aAAc,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,WAE/C,IAGZ,CAAA;AAID,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,IAK3C,CAAA;AAGD,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,IAItD,CAAA;AAED,eAAO,MAAM,mBAAmB,QAAO,OAA2B,CAAA;AAElE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAUlF;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAoB,CAAA;AAEzE,eAAO,MAAM,OAAO,0BAEjB;IACD,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,SAAS,CAAA;IAClB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC/C,gBAAgB,EAAE,OAAO,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,EAAE,CAAA;QAClB,IAAI,EAAE,MAAM,EAAE,CAAA;QACd,MAAM,EAAE,MAAM,EAAE,CAAA;QAChB,SAAS,EAAE,MAAM,EAAE,CAAA;QACnB,SAAS,EAAE,MAAM,EAAE,CAAA;QACnB,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;CA6CF,CAAA"}
@@ -1,59 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var GuiLogo_exports = {};
24
- __export(GuiLogo_exports, {
25
- GuiLogo: () => GuiLogo
26
- });
27
- module.exports = __toCommonJS(GuiLogo_exports);
28
- var import_gui = require("@hanzo/gui");
29
- var import_LogoIcon = require("./LogoIcon.cjs");
30
- var import_LogoWords = require("./LogoWords.cjs");
31
- var import_jsx_runtime = require("react/jsx-runtime");
32
- const GuiLogo = ({
33
- showWords,
34
- downscale,
35
- animated,
36
- color,
37
- ref,
38
- ...props
39
- }) => {
40
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_gui.XStack, {
41
- render: "span",
42
- ref,
43
- alignItems: "center",
44
- justifyContent: "center",
45
- gap: "$5",
46
- ...props,
47
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_LogoIcon.LogoIcon, {
48
- downscale: (downscale ?? 1) * (showWords ? 2 : 1.5),
49
- color
50
- }), showWords && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui.YStack, {
51
- render: "span",
52
- marginBottom: -4,
53
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_LogoWords.LogoWords, {
54
- animated,
55
- downscale: downscale ?? 2
56
- })
57
- })]
58
- });
59
- };
@@ -1,63 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
25
- var GuiLogo_exports = {};
26
- __export(GuiLogo_exports, {
27
- GuiLogo: () => GuiLogo
28
- });
29
- module.exports = __toCommonJS(GuiLogo_exports);
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var import_gui = require("@hanzo/gui");
32
- var import_LogoIcon = require("./LogoIcon.native.js");
33
- var import_LogoWords = require("./LogoWords.native.js");
34
- var GuiLogo = function (param) {
35
- var {
36
- showWords,
37
- downscale,
38
- animated,
39
- color,
40
- ref,
41
- ...props
42
- } = param;
43
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_gui.XStack, {
44
- render: "span",
45
- ref,
46
- alignItems: "center",
47
- justifyContent: "center",
48
- gap: "$5",
49
- ...props,
50
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_LogoIcon.LogoIcon, {
51
- downscale: (downscale !== null && downscale !== void 0 ? downscale : 1) * (showWords ? 2 : 1.5),
52
- color
53
- }), showWords && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui.YStack, {
54
- render: "span",
55
- marginBottom: -4,
56
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_LogoWords.LogoWords, {
57
- animated,
58
- downscale: downscale !== null && downscale !== void 0 ? downscale : 2
59
- })
60
- })]
61
- });
62
- };
63
- //# sourceMappingURL=GuiLogo.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GuiLogo_exports","__export","GuiLogo","module","exports","import_jsx_runtime","require","import_gui","import_LogoIcon","import_LogoWords","param","showWords","downscale","animated","color","ref","props","jsxs","XStack","render","alignItems","justifyContent","gap","children","jsx","LogoIcon","YStack","marginBottom","LogoWords"],"sources":["../../src/GuiLogo.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAA+BT,YAAA,CAAAK,eAAA;AAC/B,IAAAK,kBAAyB,GAAAC,OAAA;AACzB,IAAAC,UAAA,GAAAD,OAA0B;AAmBtB,IAAAE,eAAA,GAAAF,OAAA;AATG,IAAAG,gBAAiB,GAAAH,OAAA;AAAA,IACtBJ,OAAA,YAAAA,CAAAQ,KAAA;EACA;IAAAC,SAAA;IAAAC,SAAA;IAAAC,QAAA;IAAAC,KAAA;IAAAC,GAAA;IAAA,GAAAC;EAAA,IAAAN,KAAA;EACA,0BAAAL,kBAAA,CAAAY,IAAA,EAAAV,UAAA,CAAAW,MAAA;IACAC,MAAA;IACAJ,GAAA;IACAK,UAAG;IACLC,cAA8B;IAC5BC,GAAA,EACE;IAAC,GAAAN,KAAA;IAAAO,QAAA,GACC,eAAO,IAAAlB,kBAAA,CAAAmB,GAAA,EAAAhB,eAAA,CAAAiB,QAAA;MACPb,SAAA,GAAAA,SAAA,aAAAA,SAAA,cAAAA,SAAA,SAAAD,SAAA;MACAG;IACA,IACAH,SAAI,uBAAAN,kBAAA,CAAAmB,GAAA,EAAAjB,UAAA,CAAAmB,MAAA;MACHP,MAAG;MAEJQ,YAAA;MAAAJ,QAAA,qBAAAlB,kBAAC,CAAAmB,GAAA,EAAAf,gBAAA,CAAAmB,SAAS;QACTf,QAAA;QAGCD,SAAA,EAAAA,SAAA,aAAAA,SAAA,cAAAA,SAAA;MAAA;IAEJ","ignoreList":[]}
@@ -1,42 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var GuiLogoSvg_exports = {};
24
- __export(GuiLogoSvg_exports, {
25
- GuiIconSvg: () => GuiIconSvg
26
- });
27
- module.exports = __toCommonJS(GuiLogoSvg_exports);
28
- var import_logos = require("@hanzo/logo/logos");
29
- var import_jsx_runtime = require("react/jsx-runtime");
30
- const GuiIconSvg = ({
31
- color = "currentColor",
32
- ...props
33
- }) => /* @__PURE__ */(0, import_jsx_runtime.jsx)("svg", {
34
- viewBox: "0 0 67 67",
35
- width: "67px",
36
- height: "67px",
37
- ...props,
38
- children: import_logos.MARK_BLOCKS.map(d => /* @__PURE__ */(0, import_jsx_runtime.jsx)("path", {
39
- d,
40
- fill: color
41
- }, d))
42
- });
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
25
- var GuiLogoSvg_exports = {};
26
- __export(GuiLogoSvg_exports, {
27
- GuiIconSvg: () => GuiIconSvg
28
- });
29
- module.exports = __toCommonJS(GuiLogoSvg_exports);
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var import_logos = require("@hanzo/logo/logos");
32
- var GuiIconSvg = function (param) {
33
- var {
34
- color = "currentColor",
35
- ...props
36
- } = param;
37
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)("svg", {
38
- viewBox: "0 0 67 67",
39
- width: "67px",
40
- height: "67px",
41
- ...props,
42
- children: import_logos.MARK_BLOCKS.map(function (d) {
43
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)("path", {
44
- d,
45
- fill: color
46
- }, d);
47
- })
48
- });
49
- };
50
- //# sourceMappingURL=GuiLogoSvg.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GuiLogoSvg_exports","__export","GuiIconSvg","module","exports","import_jsx_runtime","require","import_logos","param","color","props","jsx"],"sources":["../../src/GuiLogoSvg.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAA4B,CAAAK,kBAAA;AAuBtB,IAAAK,kBAAA,GAAAC,OAAA;AANC,IAAAC,YAAM,GAAaD,OAAC;AAAA,IACzBJ,UAAQ,YAAAA,CAAAM,KAAA;EACR,IAAG;IAAAC,KAAA;IAAA,GAAAC;EAAA,IAAAF,KAAA;EACL,OACE,mBAAAH,kBAAA,CAAAM,GAAC,SAAI","ignoreList":[]}
@@ -1,51 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var LogoIcon_exports = {};
24
- __export(LogoIcon_exports, {
25
- LogoIcon: () => LogoIcon
26
- });
27
- module.exports = __toCommonJS(LogoIcon_exports);
28
- var import_gui = require("@hanzo/gui");
29
- var import_GuiLogoSvg = require("./GuiLogoSvg.cjs");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- const LogoIcon = ({
32
- downscale = 2,
33
- color
34
- }) => {
35
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui.YStack, {
36
- render: "span",
37
- className: "unselectable",
38
- alignSelf: "center",
39
- marginVertical: -10,
40
- pressStyle: {
41
- opacity: 0.7,
42
- scaleX: -1
43
- },
44
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GuiLogoSvg.GuiIconSvg, {
45
- className: "hanzogui-icon",
46
- width: 440 / 8 / downscale,
47
- height: 440 / 8 / downscale,
48
- color
49
- })
50
- });
51
- };
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
25
- var LogoIcon_exports = {};
26
- __export(LogoIcon_exports, {
27
- LogoIcon: () => LogoIcon
28
- });
29
- module.exports = __toCommonJS(LogoIcon_exports);
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var import_gui = require("@hanzo/gui");
32
- var import_GuiLogoSvg = require("./GuiLogoSvg.native.js");
33
- var LogoIcon = function (param) {
34
- var {
35
- downscale = 2,
36
- color
37
- } = param;
38
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui.YStack, {
39
- render: "span",
40
- className: "unselectable",
41
- alignSelf: "center",
42
- marginVertical: -10,
43
- pressStyle: {
44
- opacity: 0.7,
45
- scaleX: -1
46
- },
47
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GuiLogoSvg.GuiIconSvg, {
48
- className: "hanzogui-icon",
49
- width: 440 / 8 / downscale,
50
- height: 440 / 8 / downscale,
51
- color
52
- })
53
- });
54
- };
55
- //# sourceMappingURL=LogoIcon.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","LogoIcon_exports","__export","LogoIcon","module","exports","import_jsx_runtime","require","import_gui","import_GuiLogoSvg","param","downscale","color","jsx","YStack","render","className","alignSelf","marginVertical","pressStyle","opacity","scaleX","children","GuiIconSvg","width","height"],"sources":["../../src/LogoIcon.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAuBT,YAAA,CAAAK,gBAAA;AACvB,IAAAK,kBAAA,GAA2BC,OAAA;AAqBrB,IAAAC,UAAA,GAAAD,OAAA;AAlBC,IAAAE,iBAAkB,GAAAF,OAAA;AAAA,IACvBJ,QAAA,GAAY,SAAAA,CAAAO,KAAA;EACZ;IAAAC,SAAA;IAAAC;EAAA,IAAAF,KAAA;EACF,OAGmB,mBAAAJ,kBAAA,CAAAO,GAAA,EAAAL,UAAA,CAAAM,MAAA;IACjBC,MACE;IAACC,SAAA;IAAAC,SAAA;IAAAC,cACQ;IAAAC,UACP;MACAC,OAAA,KAAU;MACVC,MAAA;IAAgB;IACJC,QACV,iBAAS,IAAAhB,kBAAA,CAAAO,GAAA,EAAAJ,iBAAA,CAAAc,UAAA;MAAAP,SACT,EAAQ;MACVQ,KAAA,YAAAb,SAAA;MAEAc,MAAA,YAAAd,SAAA;MAAAC;IAAC;EAAA;AACW","ignoreList":[]}
@@ -1,130 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
30
- }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
34
- var LogoWords_exports = {};
35
- __export(LogoWords_exports, {
36
- LogoWords: () => LogoWords
37
- });
38
- module.exports = __toCommonJS(LogoWords_exports);
39
- var import_react = __toESM(require("react"), 1);
40
- var import_gui = require("@hanzo/gui");
41
- var import_wordmarks = require("@hanzo/logo/wordmarks");
42
- var import_useTint = require("./useTint.cjs");
43
- var import_jsx_runtime = require("react/jsx-runtime");
44
- const WORDMARK = import_wordmarks.WORDMARKS["Hanzo"];
45
- const [WM_X, WM_Y, WM_W, WM_H] = WORDMARK.box;
46
- const LogoWords = import_react.default.memo(({
47
- downscale = 1,
48
- animated,
49
- ...props
50
- }) => {
51
- const Tint = (0, import_useTint.useTint)();
52
- const [hovered, setHovered] = import_react.default.useState(false);
53
- const [mounted, setMounted] = import_react.default.useState("start");
54
- const {
55
- tintIndex: index
56
- } = Tint;
57
- const sections = Tint.tints.length;
58
- (0, import_react.useEffect)(() => {
59
- const idle = window.requestIdleCallback || setTimeout;
60
- idle(() => {
61
- setTimeout(() => {
62
- setMounted("animate");
63
- }, 50);
64
- setTimeout(() => {
65
- setMounted("done");
66
- }, 1500);
67
- });
68
- }, []);
69
- (0, import_react.useEffect)(() => {
70
- const handleKeyDown = event => {
71
- const i = Number.parseInt(event.key, 10) - 1;
72
- if (!Number.isNaN(i) && i >= 0 && i < Tint.tints.length) {
73
- Tint.setTintIndex(i);
74
- }
75
- };
76
- window.addEventListener("keydown", handleKeyDown);
77
- return () => {
78
- window.removeEventListener("keydown", handleKeyDown);
79
- };
80
- }, [Tint]);
81
- const [layout, setLayout] = (0, import_react.useState)();
82
- const fill = hovered ? `var(--${Tint.tints[index]}9)` : "var(--color12)";
83
- const width = 373 * (1 / downscale) * 0.3333333;
84
- const height = width * WM_H / WM_W;
85
- const dotX = Math.round(width / sections * (index + 0.5));
86
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_gui.XStack, {
87
- onMouseEnter: () => setHovered(true),
88
- onMouseLeave: () => setHovered(false),
89
- paddingVertical: "$2",
90
- "data-tauri-drag-region": true,
91
- marginVertical: "$-2",
92
- position: "relative",
93
- className: "logo-words",
94
- onLayout: e => {
95
- setLayout(e.nativeEvent.layout);
96
- },
97
- onMouseMove: e => {
98
- if (!layout) return;
99
- const x = e.clientX - layout.pageX;
100
- const sectionWidth = layout.width / sections;
101
- const section = Math.min(sections - 1, Math.max(0, Math.floor(x / sectionWidth)));
102
- Tint.setTintIndex(section);
103
- },
104
- ...props,
105
- children: [animated && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui.Circle, {
106
- transition: "medium",
107
- position: "absolute",
108
- top: 0,
109
- left: 0,
110
- y: mounted === "start" ? -30 : -4,
111
- x: dotX,
112
- size: 4,
113
- backgroundColor: "$color12"
114
- }), /* @__PURE__ */(0, import_jsx_runtime.jsx)("svg", {
115
- "data-tauri-drag-region": true,
116
- role: "img",
117
- "aria-label": "Hanzo",
118
- width,
119
- height,
120
- viewBox: `${WM_X} ${-WM_Y - WM_H} ${WM_W} ${WM_H}`,
121
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("g", {
122
- transform: "scale(1,-1)",
123
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("path", {
124
- d: WORDMARK.d,
125
- fill
126
- })
127
- })
128
- })]
129
- });
130
- });