@tamagui/logo 1.144.2 → 1.144.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/SeasonProvider.cjs +41 -0
- package/dist/cjs/SeasonProvider.js +32 -0
- package/dist/cjs/SeasonProvider.js.map +6 -0
- package/dist/cjs/SeasonProvider.native.js +52 -0
- package/dist/cjs/SeasonProvider.native.js.map +1 -0
- package/dist/esm/SeasonProvider.js +18 -0
- package/dist/esm/SeasonProvider.js.map +6 -0
- package/dist/esm/SeasonProvider.mjs +18 -0
- package/dist/esm/SeasonProvider.mjs.map +1 -0
- package/dist/esm/SeasonProvider.native.js +26 -0
- package/dist/esm/SeasonProvider.native.js.map +1 -0
- package/package.json +5 -5
- package/types/SeasonProvider.d.ts.map +11 -0
|
@@ -0,0 +1,41 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var SeasonProvider_exports = {};
|
|
22
|
+
__export(SeasonProvider_exports, {
|
|
23
|
+
SeasonProvider: () => SeasonProvider
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(SeasonProvider_exports);
|
|
26
|
+
var import_react = require("react"),
|
|
27
|
+
import_tints = require("./tints.cjs"),
|
|
28
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function useSeasonSync() {
|
|
30
|
+
(0, import_react.useEffect)(() => {
|
|
31
|
+
const computed = window.__TAMAGUI_SEASON__;
|
|
32
|
+
computed && (0, import_tints.setTintFamily)(computed);
|
|
33
|
+
}, []);
|
|
34
|
+
}
|
|
35
|
+
function SeasonProvider({
|
|
36
|
+
children
|
|
37
|
+
}) {
|
|
38
|
+
return useSeasonSync(), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
39
|
+
children
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var SeasonProvider_exports = {};
|
|
16
|
+
__export(SeasonProvider_exports, {
|
|
17
|
+
SeasonProvider: () => SeasonProvider
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(SeasonProvider_exports);
|
|
20
|
+
var import_react = require("react"), import_tints = require("./tints"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function useSeasonSync() {
|
|
22
|
+
(0, import_react.useEffect)(() => {
|
|
23
|
+
const computed = window.__TAMAGUI_SEASON__;
|
|
24
|
+
computed && (0, import_tints.setTintFamily)(computed);
|
|
25
|
+
}, []);
|
|
26
|
+
}
|
|
27
|
+
function SeasonProvider({
|
|
28
|
+
children
|
|
29
|
+
}) {
|
|
30
|
+
return useSeasonSync(), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=SeasonProvider.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/SeasonProvider.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA0B,kBAC1B,eAA+C,oBA2C3C;AAjBJ,SAAS,gBAAgB;AACvB,8BAAU,MAAM;AACd,UAAM,WAAY,OAAe;AACjC,IAAI,gBACF,4BAAc,QAAQ;AAAA,EAE1B,GAAG,CAAC,CAAC;AACP;AAEO,SAAS,eAAe;AAAA,EAC7B;AACF,GAEoB;AAClB,uBAAc,GAGZ,2EAQG,UACH;AAEJ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var SeasonProvider_exports = {};
|
|
24
|
+
__export(SeasonProvider_exports, {
|
|
25
|
+
SeasonProvider: () => SeasonProvider
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(SeasonProvider_exports);
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
29
|
+
import_react = require("react"),
|
|
30
|
+
import_tints = require("./tints.native.js");
|
|
31
|
+
function useSeasonSync() {
|
|
32
|
+
(0, import_react.useEffect)(function () {
|
|
33
|
+
var computed = window.__TAMAGUI_SEASON__;
|
|
34
|
+
computed && (0, import_tints.setTintFamily)(computed);
|
|
35
|
+
}, []);
|
|
36
|
+
}
|
|
37
|
+
function SeasonProvider(param) {
|
|
38
|
+
var {
|
|
39
|
+
children
|
|
40
|
+
} = param;
|
|
41
|
+
return useSeasonSync(), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
42
|
+
children: (/* disabled because were launchig v2 and its lunar new year */
|
|
43
|
+
/* <script
|
|
44
|
+
suppressHydrationWarning
|
|
45
|
+
dangerouslySetInnerHTML={{
|
|
46
|
+
__html: getInlineScript(),
|
|
47
|
+
}}
|
|
48
|
+
/> */
|
|
49
|
+
children)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=SeasonProvider.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SeasonProvider_exports","__export","SeasonProvider","module","exports","import_jsx_runtime","require","import_react","import_tints","useSeasonSync","useEffect","computed","window","__TAMAGUI_SEASON__","setTintFamily","param","children","jsx","Fragment"],"sources":["../../src/SeasonProvider.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAA0B,CAAAK,sBACqB;AA0B/C,IAAAK,kBAAS,GAAgBC,OAAA;EAAAC,YAAA,GAAAD,OAAA;EAAAE,YAAA,GAAAF,OAAA;AACvB,SAAAG,cAAA;EACE,IAAAF,YAAM,CAAAG,SAA2B;IAC7B,IAAAC,QAAA,GAAAC,MACF,CAAAC,kBAAA;IAEJF,QAAK,QAAAH,YAAA,CAAAM,aAAA,EAAAH,QAAA;EACP;AAEO;AAAwB,SAC7BT,eAAAa,KAAA;EACF,IAEoB;IAAAC;EAAA,IAAAD,KAAA;EAClB,OAAAN,aAAA,CAAc,GAGZ,mBAAAJ,kBAAA,CAAAY,GAAA,EAAAZ,kBAAA,CAAAa,QAAA;IAWJF,QAAA,G","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { setTintFamily } from "./tints";
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
function useSeasonSync() {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const computed = window.__TAMAGUI_SEASON__;
|
|
7
|
+
computed && setTintFamily(computed);
|
|
8
|
+
}, []);
|
|
9
|
+
}
|
|
10
|
+
function SeasonProvider({
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
return useSeasonSync(), /* @__PURE__ */ jsx(Fragment, { children });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
SeasonProvider
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=SeasonProvider.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/SeasonProvider.tsx"],
|
|
4
|
+
"mappings": "AACA,SAAS,iBAAiB;AAC1B,SAAS,qBAAsC;AA2C3C;AAjBJ,SAAS,gBAAgB;AACvB,YAAU,MAAM;AACd,UAAM,WAAY,OAAe;AACjC,IAAI,YACF,cAAc,QAAQ;AAAA,EAE1B,GAAG,CAAC,CAAC;AACP;AAEO,SAAS,eAAe;AAAA,EAC7B;AACF,GAEoB;AAClB,uBAAc,GAGZ,gCAQG,UACH;AAEJ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { setTintFamily } from "./tints.mjs";
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
function useSeasonSync() {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const computed = window.__TAMAGUI_SEASON__;
|
|
7
|
+
computed && setTintFamily(computed);
|
|
8
|
+
}, []);
|
|
9
|
+
}
|
|
10
|
+
function SeasonProvider({
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
return useSeasonSync(), /* @__PURE__ */jsx(Fragment, {
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export { SeasonProvider };
|
|
18
|
+
//# sourceMappingURL=SeasonProvider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","setTintFamily","Fragment","jsx","useSeasonSync","computed","window","__TAMAGUI_SEASON__","SeasonProvider","children"],"sources":["../../src/SeasonProvider.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,SAAA,QAAiB;AAC1B,SAASC,aAAA,QAAsC;AA2C3C,SAAAC,QAAA,EAAAC,GAAA;AAjBJ,SAASC,cAAA,EAAgB;EACvBJ,SAAA,CAAU,MAAM;IACd,MAAMK,QAAA,GAAYC,MAAA,CAAeC,kBAAA;IAC7BF,QAAA,IACFJ,aAAA,CAAcI,QAAQ;EAE1B,GAAG,EAAE;AACP;AAEO,SAASG,eAAe;EAC7BC;AACF,GAEoB;EAClB,OAAAL,aAAA,CAAc,GAGZ,eAAAD,GAAA,CAAAD,QAAA;IAQGO;EAAA,CACH;AAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { setTintFamily } from "./tints.native.js";
|
|
4
|
+
function useSeasonSync() {
|
|
5
|
+
useEffect(function () {
|
|
6
|
+
var computed = window.__TAMAGUI_SEASON__;
|
|
7
|
+
computed && setTintFamily(computed);
|
|
8
|
+
}, []);
|
|
9
|
+
}
|
|
10
|
+
function SeasonProvider(param) {
|
|
11
|
+
var {
|
|
12
|
+
children
|
|
13
|
+
} = param;
|
|
14
|
+
return useSeasonSync(), /* @__PURE__ */_jsx(_Fragment, {
|
|
15
|
+
children: (/* disabled because were launchig v2 and its lunar new year */
|
|
16
|
+
/* <script
|
|
17
|
+
suppressHydrationWarning
|
|
18
|
+
dangerouslySetInnerHTML={{
|
|
19
|
+
__html: getInlineScript(),
|
|
20
|
+
}}
|
|
21
|
+
/> */
|
|
22
|
+
children)
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export { SeasonProvider };
|
|
26
|
+
//# sourceMappingURL=SeasonProvider.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsx","_jsx","Fragment","_Fragment","useEffect","setTintFamily","useSeasonSync","computed","window","__TAMAGUI_SEASON__","SeasonProvider","param","children"],"sources":["../../src/SeasonProvider.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,GAAA,IAAAC,IAAA,EAAAC,QAAiB,IAAAC,SAAA;AAC1B,SAASC,SAAA,eAAsC;AA2C3C,SAAAC,aAAA;AAjBJ,SAASC,cAAA,EAAgB;EACvBF,SAAA,CAAU,YAAM;IACd,IAAAG,QAAM,GAAAC,MAAY,CAAAC,kBAAe;IAC7BF,QAAA,IACFF,aAAA,CAAcE,QAAQ;EAE1B,GAAG,EAAE;AACP;AAEO,SAASG,eAAeC,KAAA;EAC7B;IAAAC;EAAA,IAAAD,KAAA;EACF,OAEoBL,aAAA,mBAAAL,IAAA,CAAAE,SAAA;IAClBS,QAAA,GAcF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/logo",
|
|
3
|
-
"version": "1.144.
|
|
3
|
+
"version": "1.144.4",
|
|
4
4
|
"source": "src/index.tsx",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clean:build": "tamagui-build clean:build"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@tamagui/build": "1.144.
|
|
50
|
+
"@tamagui/build": "1.144.4",
|
|
51
51
|
"react": "*"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@tamagui/use-element-layout": "1.144.
|
|
61
|
-
"@tamagui/web": "1.144.
|
|
62
|
-
"tamagui": "1.144.
|
|
60
|
+
"@tamagui/use-element-layout": "1.144.4",
|
|
61
|
+
"@tamagui/web": "1.144.4",
|
|
62
|
+
"tamagui": "1.144.4"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,YAAY,WAAW;AAqCvB,OAAO,iBAAS,eAAe,EAC7B,YACC;CACD,UAAU,MAAM;IACd,MAAM",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/SeasonProvider.tsx"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"import type React from 'react'\nimport { useEffect } from 'react'\nimport { setTintFamily, type TintFamily } from './tints'\n\n// inline script that runs before hydration to set season class on html\n// auto-detects season from current date\nfunction getInlineScript() {\n return `(function(){\n var d = new Date();\n var m = d.getMonth();\n var day = d.getDate();\n var season = 'tamagui';\n\n if (m === 11 && day >= 14) season = 'xmas';\n else if (m === 9 && day >= 20) season = 'halloween';\n else if (m === 2 && day >= 10 && day <= 17) season = 'stpatricks';\n else if (m === 2 && day >= 30 || m === 3 && day <= 20) season = 'easter';\n else if (m === 1 && day >= 7 && day <= 14) season = 'valentine';\n else if (m === 0 && day >= 20 || m === 1 && day <= 12) season = 'lunar';\n\n if (season !== 'tamagui') {\n document.documentElement.classList.add(season + '-season');\n }\n window.__TAMAGUI_SEASON__ = season;\n})();`\n}\n\n// syncs the tint family with the value computed by the inline script\nfunction useSeasonSync() {\n useEffect(() => {\n const computed = (window as any).__TAMAGUI_SEASON__ as TintFamily | undefined\n if (computed) {\n setTintFamily(computed)\n }\n }, [])\n}\n\nexport function SeasonProvider({\n children,\n}: {\n children: React.ReactNode\n}): React.ReactNode {\n useSeasonSync()\n\n return (\n <>\n {/* disabled because were launchig v2 and its lunar new year */}\n {/* <script\n suppressHydrationWarning\n dangerouslySetInnerHTML={{\n __html: getInlineScript(),\n }}\n /> */}\n {children}\n </>\n )\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|