@tamagui/helpers 1.13.2 → 1.13.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/clamp.js +1 -30
- package/dist/cjs/clamp.js.map +2 -2
- package/dist/cjs/composeEventHandlers.js +1 -39
- package/dist/cjs/composeEventHandlers.js.map +2 -2
- package/dist/cjs/concatClassName.js +1 -89
- package/dist/cjs/concatClassName.js.map +2 -2
- package/dist/cjs/index.js +1 -23
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js +1 -16
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/validStyleProps.js +1 -214
- package/dist/cjs/validStyleProps.js.map +2 -2
- package/dist/esm/clamp.js +1 -6
- package/dist/esm/clamp.js.map +2 -2
- package/dist/esm/clamp.mjs +1 -6
- package/dist/esm/clamp.mjs.map +2 -2
- package/dist/esm/composeEventHandlers.js +1 -15
- package/dist/esm/composeEventHandlers.js.map +2 -2
- package/dist/esm/composeEventHandlers.mjs +1 -15
- package/dist/esm/composeEventHandlers.mjs.map +2 -2
- package/dist/esm/concatClassName.js +1 -65
- package/dist/esm/concatClassName.js.map +2 -2
- package/dist/esm/concatClassName.mjs +1 -65
- package/dist/esm/concatClassName.mjs.map +2 -2
- package/dist/esm/index.js +1 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -6
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/validStyleProps.js +1 -182
- package/dist/esm/validStyleProps.js.map +2 -2
- package/dist/esm/validStyleProps.mjs +1 -182
- package/dist/esm/validStyleProps.mjs.map +2 -2
- package/package.json +3 -3
package/dist/cjs/clamp.js
CHANGED
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var clamp_exports = {};
|
|
20
|
-
__export(clamp_exports, {
|
|
21
|
-
clamp: () => clamp
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(clamp_exports);
|
|
24
|
-
function clamp(value, [min, max]) {
|
|
25
|
-
return Math.min(max, Math.max(min, value));
|
|
26
|
-
}
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
clamp
|
|
30
|
-
});
|
|
1
|
+
"use strict";var u=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var h=(m,n)=>{for(var r in n)u(m,r,{get:n[r],enumerable:!0})},i=(m,n,r,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of b(n))!c.call(m,e)&&e!==r&&u(m,e,{get:()=>n[e],enumerable:!(t=a(n,e))||t.enumerable});return m};var o=m=>i(u({},"__esModule",{value:!0}),m);var x={};h(x,{clamp:()=>p});module.exports=o(x);function p(m,[n,r]){return Math.min(r,Math.max(n,m))}0&&(module.exports={clamp});
|
|
31
2
|
//# sourceMappingURL=clamp.js.map
|
package/dist/cjs/clamp.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/clamp.ts"],
|
|
4
4
|
"sourcesContent": ["export function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value))\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAO,SAASE,EAAME,EAAe,CAACC,EAAKC,CAAG,EAA6B,CACzE,OAAO,KAAK,IAAIA,EAAK,KAAK,IAAID,EAAKD,CAAK,CAAC,CAC3C",
|
|
6
|
+
"names": ["clamp_exports", "__export", "clamp", "__toCommonJS", "value", "min", "max"]
|
|
7
7
|
}
|
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var composeEventHandlers_exports = {};
|
|
20
|
-
__export(composeEventHandlers_exports, {
|
|
21
|
-
composeEventHandlers: () => composeEventHandlers
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(composeEventHandlers_exports);
|
|
24
|
-
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
25
|
-
if (!og || !next) {
|
|
26
|
-
return next || og;
|
|
27
|
-
}
|
|
28
|
-
return function composedEventHandler(event) {
|
|
29
|
-
og == null ? void 0 : og(event);
|
|
30
|
-
if (!event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
31
|
-
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
32
|
-
return next == null ? void 0 : next(event);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
composeEventHandlers
|
|
39
|
-
});
|
|
1
|
+
"use strict";var E=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var s=(n,e)=>{for(var t in e)E(n,t,{get:e[t],enumerable:!0})},v=(n,e,t,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a(e))!l.call(n,r)&&r!==t&&E(n,r,{get:()=>e[r],enumerable:!(d=u(e,r))||d.enumerable});return n};var f=n=>v(E({},"__esModule",{value:!0}),n);var p={};s(p,{composeEventHandlers:()=>i});module.exports=f(p);function i(n,e,{checkDefaultPrevented:t=!0}={}){return!n||!e?e||n:function(r){if(n==null||n(r),!r||!(t&&"defaultPrevented"in r)||"defaultPrevented"in r&&!r.defaultPrevented)return e==null?void 0:e(r)}}0&&(module.exports={composeEventHandlers});
|
|
40
2
|
//# sourceMappingURL=composeEventHandlers.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
4
|
"sourcesContent": ["type Events = Object\n\nexport type EventHandler<E extends Events> = (event: E) => void\n\nexport function composeEventHandlers<E extends Events>(\n og?: EventHandler<E>,\n next?: EventHandler<E>,\n { checkDefaultPrevented = true } = {}\n) {\n if (!og || !next) {\n return next || og\n }\n return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !event ||\n !(checkDefaultPrevented && 'defaultPrevented' in event) ||\n // @ts-ignore\n ('defaultPrevented' in event && !event.defaultPrevented)\n ) {\n return next?.(event)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAIO,SAASE,EACdE,EACAC,EACA,CAAE,sBAAAC,EAAwB,EAAK,EAAI,CAAC,EACpC,CACA,MAAI,CAACF,GAAM,CAACC,EACHA,GAAQD,EAEV,SAA8BG,EAAU,CAE7C,GADAH,GAAA,MAAAA,EAAKG,GAEH,CAACA,GACD,EAAED,GAAyB,qBAAsBC,IAEhD,qBAAsBA,GAAS,CAACA,EAAM,iBAEvC,OAAOF,GAAA,YAAAA,EAAOE,EAElB,CACF",
|
|
6
|
+
"names": ["composeEventHandlers_exports", "__export", "composeEventHandlers", "__toCommonJS", "og", "next", "checkDefaultPrevented", "event"]
|
|
7
7
|
}
|
|
@@ -1,90 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var concatClassName_exports = {};
|
|
20
|
-
__export(concatClassName_exports, {
|
|
21
|
-
concatClassName: () => concatClassName
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(concatClassName_exports);
|
|
24
|
-
function concatClassName(_cn) {
|
|
25
|
-
const args = arguments;
|
|
26
|
-
const usedPrefixes = [];
|
|
27
|
-
let final = "";
|
|
28
|
-
const len = args.length;
|
|
29
|
-
let propObjects = null;
|
|
30
|
-
for (let x = len; x >= 0; x--) {
|
|
31
|
-
const cns = args[x];
|
|
32
|
-
if (!cns)
|
|
33
|
-
continue;
|
|
34
|
-
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
35
|
-
propObjects = propObjects || [];
|
|
36
|
-
propObjects.push(cns);
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
const names = Array.isArray(cns) ? cns : cns.split(" ");
|
|
40
|
-
const numNames = names.length;
|
|
41
|
-
for (let i = numNames - 1; i >= 0; i--) {
|
|
42
|
-
const name = names[i];
|
|
43
|
-
if (!name || name === " ")
|
|
44
|
-
continue;
|
|
45
|
-
if (name[0] !== "_") {
|
|
46
|
-
final = name + " " + final;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
const splitIndex = name.indexOf("-");
|
|
50
|
-
if (splitIndex < 1) {
|
|
51
|
-
final = name + " " + final;
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
const nextChar = name[splitIndex + 1];
|
|
55
|
-
const isMediaQuery = nextChar === "_";
|
|
56
|
-
const styleKey = name.slice(1, name.lastIndexOf("-"));
|
|
57
|
-
const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
|
|
58
|
-
const uid = mediaKey ? styleKey + mediaKey : styleKey;
|
|
59
|
-
if (usedPrefixes.indexOf(uid) > -1) {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
usedPrefixes.push(uid);
|
|
63
|
-
const propName = styleKey;
|
|
64
|
-
if (propName && propObjects) {
|
|
65
|
-
if (propObjects.some((po) => {
|
|
66
|
-
if (mediaKey) {
|
|
67
|
-
const propKey = pseudoInvert[mediaKey];
|
|
68
|
-
return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
|
|
69
|
-
}
|
|
70
|
-
const res = po && propName in po && po[propName] !== null;
|
|
71
|
-
return res;
|
|
72
|
-
})) {
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
final = name + " " + final;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return final;
|
|
80
|
-
}
|
|
81
|
-
const pseudoInvert = {
|
|
82
|
-
hover: "hoverStyle",
|
|
83
|
-
focus: "focusStyle",
|
|
84
|
-
press: "pressStyle"
|
|
85
|
-
};
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
concatClassName
|
|
89
|
-
});
|
|
1
|
+
"use strict";var x=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var I=(s,n)=>{for(var i in n)x(s,i,{get:n[i],enumerable:!0})},K=(s,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of O(n))!v.call(s,r)&&r!==i&&x(s,r,{get:()=>n[r],enumerable:!(t=N(n,r))||t.enumerable});return s};var S=s=>K(x({},"__esModule",{value:!0}),s);var j={};I(j,{concatClassName:()=>_});module.exports=S(j);function _(s){const n=arguments,i=[];let t="";const r=n.length;let l=null;for(let y=r;y>=0;y--){const c=n[y];if(!c)continue;if(!Array.isArray(c)&&typeof c!="string"){l=l||[],l.push(c);continue}const g=Array.isArray(c)?c:c.split(" "),A=g.length;for(let d=A-1;d>=0;d--){const e=g[d];if(!e||e===" ")continue;if(e[0]!=="_"){t=e+" "+t;continue}const u=e.indexOf("-");if(u<1){t=e+" "+t;continue}const C=e[u+1]==="_",m=e.slice(1,e.lastIndexOf("-")),a=C?e.slice(u+2,u+7):null,h=a?m+a:m;if(i.indexOf(h)>-1)continue;i.push(h);const f=m;f&&l&&l.some(o=>{if(a){const p=b[a];return o&&o[p]&&f in o[p]&&o[p]!==null}return o&&f in o&&o[f]!==null})||(t=e+" "+t)}}return t}const b={hover:"hoverStyle",focus:"focusStyle",press:"pressStyle"};0&&(module.exports={concatClassName});
|
|
90
2
|
//# sourceMappingURL=concatClassName.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/concatClassName.ts"],
|
|
4
4
|
"sourcesContent": ["// perf sensitive so doing some weird stuff\n\n/**\n * next - take objects:\n *\n * { _shorthand: 'postfix' }\n *\n */\n\nexport function concatClassName(...args: any[]): any\nexport function concatClassName(_cn: Record<string, any> | null | undefined): string {\n const args = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = args.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = args[x]\n\n if (!cns) continue\n if (!Array.isArray(cns) && typeof cns !== 'string') {\n // is prop object\n propObjects = propObjects || []\n propObjects.push(cns)\n continue\n }\n\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n\n if (!name || name === ' ') continue\n if (name[0] !== '_') {\n // not snack style (todo slightly stronger heuristic)\n final = name + ' ' + final\n continue\n }\n\n const splitIndex = name.indexOf('-')\n if (splitIndex < 1) {\n final = name + ' ' + final\n // if (shouldDebug) console.log('debug exclude:', name, final)\n continue\n }\n\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n // commenting out three things to make pseudos override properly\n // (leave in for a bit to see if other bugs pop up later):\n // 1. const isPseudoQuery = nextChar === '0'\n const styleKey = name.slice(1, name.lastIndexOf('-'))\n // 2. isMediaQuery || isPseudoQuery\n const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n // 3. && !isPseudoQuery\n\n if (usedPrefixes.indexOf(uid) > -1) {\n // if (shouldDebug) console.log('debug exclude:', usedPrefixes, name)\n continue\n }\n usedPrefixes.push(uid)\n\n // overrides for full safety\n const propName = styleKey\n if (propName && propObjects) {\n if (\n propObjects.some((po) => {\n if (mediaKey) {\n const propKey = pseudoInvert[mediaKey]\n return po && po[propKey] && propName in po[propKey] && po[propKey] !== null\n }\n const res = po && propName in po && po[propName] !== null\n return res\n })\n ) {\n // if (shouldDebug) console.log('debug exclude:', name)\n continue\n }\n }\n\n final = name + ' ' + final\n }\n }\n\n return final\n}\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAUO,SAASE,EAAgBE,EAAqD,CACnF,MAAMC,EAAO,UACPC,EAAyB,CAAC,EAChC,IAAIC,EAAQ,GAEZ,MAAMC,EAAMH,EAAK,OACjB,IAAII,EAAmB,KACvB,QAASC,EAAIF,EAAKE,GAAK,EAAGA,IAAK,CAC7B,MAAMC,EAAMN,EAAKK,CAAC,EAElB,GAAI,CAACC,EAAK,SACV,GAAI,CAAC,MAAM,QAAQA,CAAG,GAAK,OAAOA,GAAQ,SAAU,CAElDF,EAAcA,GAAe,CAAC,EAC9BA,EAAY,KAAKE,CAAG,EACpB,QACF,CAEA,MAAMC,EAAQ,MAAM,QAAQD,CAAG,EAAIA,EAAMA,EAAI,MAAM,GAAG,EAChDE,EAAWD,EAAM,OACvB,QAASE,EAAID,EAAW,EAAGC,GAAK,EAAGA,IAAK,CACtC,MAAMC,EAAOH,EAAME,CAAC,EAEpB,GAAI,CAACC,GAAQA,IAAS,IAAK,SAC3B,GAAIA,EAAK,CAAC,IAAM,IAAK,CAEnBR,EAAQQ,EAAO,IAAMR,EACrB,QACF,CAEA,MAAMS,EAAaD,EAAK,QAAQ,GAAG,EACnC,GAAIC,EAAa,EAAG,CAClBT,EAAQQ,EAAO,IAAMR,EAErB,QACF,CAKA,MAAMU,EAHWF,EAAKC,EAAa,CAAC,IAGF,IAK5BE,EAAWH,EAAK,MAAM,EAAGA,EAAK,YAAY,GAAG,CAAC,EAE9CI,EAAWF,EAAeF,EAAK,MAAMC,EAAa,EAAGA,EAAa,CAAC,EAAI,KACvEI,EAAMD,EAAWD,EAAWC,EAAWD,EAG7C,GAAIZ,EAAa,QAAQc,CAAG,EAAI,GAE9B,SAEFd,EAAa,KAAKc,CAAG,EAGrB,MAAMC,EAAWH,EACbG,GAAYZ,GAEZA,EAAY,KAAMa,GAAO,CACvB,GAAIH,EAAU,CACZ,MAAMI,EAAUC,EAAaL,CAAQ,EACrC,OAAOG,GAAMA,EAAGC,CAAO,GAAKF,KAAYC,EAAGC,CAAO,GAAKD,EAAGC,CAAO,IAAM,IACzE,CAEA,OADYD,GAAMD,KAAYC,GAAMA,EAAGD,CAAQ,IAAM,IAEvD,CAAC,IAOLd,EAAQQ,EAAO,IAAMR,EACvB,CACF,CAEA,OAAOA,CACT,CAEA,MAAMiB,EAAe,CACnB,MAAO,aACP,MAAO,aACP,MAAO,YACT",
|
|
6
|
+
"names": ["concatClassName_exports", "__export", "concatClassName", "__toCommonJS", "_cn", "args", "usedPrefixes", "final", "len", "propObjects", "x", "cns", "names", "numNames", "i", "name", "splitIndex", "isMediaQuery", "styleKey", "mediaKey", "uid", "propName", "po", "propKey", "pseudoInvert"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var src_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
__reExport(src_exports, require("./clamp"), module.exports);
|
|
19
|
-
__reExport(src_exports, require("./composeEventHandlers"), module.exports);
|
|
20
|
-
__reExport(src_exports, require("./concatClassName"), module.exports);
|
|
21
|
-
__reExport(src_exports, require("./validStyleProps"), module.exports);
|
|
22
|
-
__reExport(src_exports, require("./types"), module.exports);
|
|
23
|
-
__reExport(src_exports, require("@tamagui/simple-hash"), module.exports);
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,e,p,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of c(e))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>e[m],enumerable:!(x=b(e,m))||x.enumerable});return f},r=(f,e,p)=>(t(f,e,"default"),p&&t(p,e,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);r(o,require("./clamp"),module.exports);r(o,require("./composeEventHandlers"),module.exports);r(o,require("./concatClassName"),module.exports);r(o,require("./validStyleProps"),module.exports);r(o,require("./types"),module.exports);r(o,require("@tamagui/simple-hash"),module.exports);
|
|
24
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './clamp'\nexport * from './composeEventHandlers'\nexport * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from '@tamagui/simple-hash'\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,mBAAd,gBACAE,EAAAF,EAAc,kCADd,gBAEAE,EAAAF,EAAc,6BAFd,gBAGAE,EAAAF,EAAc,6BAHd,gBAIAE,EAAAF,EAAc,mBAJd,gBAKAE,EAAAF,EAAc,gCALd",
|
|
6
|
+
"names": ["src_exports", "__toCommonJS", "__reExport"]
|
|
7
7
|
}
|
package/dist/cjs/types.js
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var types_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(types_exports);
|
|
1
|
+
"use strict";var p=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var c=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of o(e))!y.call(t,r)&&r!==s&&p(t,r,{get:()=>e[r],enumerable:!(i=l(e,r))||i.enumerable});return t};var n=t=>c(p({},"__esModule",{value:!0}),t);var u={};module.exports=n(u);
|
|
17
2
|
//# sourceMappingURL=types.js.map
|
package/dist/cjs/types.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types.ts"],
|
|
4
4
|
"sourcesContent": ["export type StyleObject = {\n property: string\n pseudo?: 'hover' | 'focus' | 'active'\n value: string\n identifier: string\n rules: string[]\n}\n\nexport type MediaStyleObject = Omit<StyleObject, 'value'>\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["types_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,215 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var validStyleProps_exports = {};
|
|
20
|
-
__export(validStyleProps_exports, {
|
|
21
|
-
stylePropsAll: () => stylePropsAll,
|
|
22
|
-
stylePropsFont: () => stylePropsFont,
|
|
23
|
-
stylePropsText: () => stylePropsText,
|
|
24
|
-
stylePropsTextOnly: () => stylePropsTextOnly,
|
|
25
|
-
stylePropsTransform: () => stylePropsTransform,
|
|
26
|
-
stylePropsView: () => stylePropsView,
|
|
27
|
-
validPseudoKeys: () => validPseudoKeys,
|
|
28
|
-
validStyles: () => validStyles,
|
|
29
|
-
validStylesOnBaseProps: () => validStylesOnBaseProps
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(validStyleProps_exports);
|
|
32
|
-
const stylePropsTransform = Object.freeze({
|
|
33
|
-
x: true,
|
|
34
|
-
y: true,
|
|
35
|
-
scale: true,
|
|
36
|
-
perspective: true,
|
|
37
|
-
scaleX: true,
|
|
38
|
-
scaleY: true,
|
|
39
|
-
skewX: true,
|
|
40
|
-
skewY: true,
|
|
41
|
-
matrix: true,
|
|
42
|
-
rotate: true,
|
|
43
|
-
rotateY: true,
|
|
44
|
-
rotateX: true,
|
|
45
|
-
rotateZ: true
|
|
46
|
-
});
|
|
47
|
-
const validStylesOnBaseProps = Object.freeze({
|
|
48
|
-
placeholderTextColor: true
|
|
49
|
-
});
|
|
50
|
-
const stylePropsView = Object.freeze({
|
|
51
|
-
backfaceVisibility: true,
|
|
52
|
-
backgroundColor: true,
|
|
53
|
-
borderBottomColor: true,
|
|
54
|
-
borderBottomEndRadius: true,
|
|
55
|
-
borderBottomLeftRadius: true,
|
|
56
|
-
borderBottomRightRadius: true,
|
|
57
|
-
borderBottomStartRadius: true,
|
|
58
|
-
borderBottomWidth: true,
|
|
59
|
-
borderColor: true,
|
|
60
|
-
borderEndColor: true,
|
|
61
|
-
borderLeftColor: true,
|
|
62
|
-
borderLeftWidth: true,
|
|
63
|
-
borderRadius: true,
|
|
64
|
-
borderRightColor: true,
|
|
65
|
-
borderRightWidth: true,
|
|
66
|
-
borderStartColor: true,
|
|
67
|
-
borderStyle: true,
|
|
68
|
-
borderTopColor: true,
|
|
69
|
-
borderTopEndRadius: true,
|
|
70
|
-
borderTopLeftRadius: true,
|
|
71
|
-
borderTopRightRadius: true,
|
|
72
|
-
borderTopStartRadius: true,
|
|
73
|
-
borderTopWidth: true,
|
|
74
|
-
borderWidth: true,
|
|
75
|
-
opacity: true,
|
|
76
|
-
transform: true,
|
|
77
|
-
alignContent: true,
|
|
78
|
-
alignItems: true,
|
|
79
|
-
alignSelf: true,
|
|
80
|
-
aspectRatio: true,
|
|
81
|
-
borderEndWidth: true,
|
|
82
|
-
borderStartWidth: true,
|
|
83
|
-
bottom: true,
|
|
84
|
-
display: true,
|
|
85
|
-
end: true,
|
|
86
|
-
flex: true,
|
|
87
|
-
flexBasis: true,
|
|
88
|
-
flexDirection: true,
|
|
89
|
-
flexGrow: true,
|
|
90
|
-
flexShrink: true,
|
|
91
|
-
flexWrap: true,
|
|
92
|
-
gap: true,
|
|
93
|
-
columnGap: true,
|
|
94
|
-
rowGap: true,
|
|
95
|
-
height: true,
|
|
96
|
-
justifyContent: true,
|
|
97
|
-
left: true,
|
|
98
|
-
margin: true,
|
|
99
|
-
marginBottom: true,
|
|
100
|
-
marginEnd: true,
|
|
101
|
-
marginHorizontal: true,
|
|
102
|
-
marginLeft: true,
|
|
103
|
-
marginRight: true,
|
|
104
|
-
marginStart: true,
|
|
105
|
-
marginTop: true,
|
|
106
|
-
marginVertical: true,
|
|
107
|
-
maxHeight: true,
|
|
108
|
-
maxWidth: true,
|
|
109
|
-
minHeight: true,
|
|
110
|
-
minWidth: true,
|
|
111
|
-
overflow: true,
|
|
112
|
-
padding: true,
|
|
113
|
-
paddingBottom: true,
|
|
114
|
-
paddingEnd: true,
|
|
115
|
-
paddingHorizontal: true,
|
|
116
|
-
paddingLeft: true,
|
|
117
|
-
paddingRight: true,
|
|
118
|
-
paddingStart: true,
|
|
119
|
-
paddingTop: true,
|
|
120
|
-
paddingVertical: true,
|
|
121
|
-
position: true,
|
|
122
|
-
right: true,
|
|
123
|
-
start: true,
|
|
124
|
-
top: true,
|
|
125
|
-
width: true,
|
|
126
|
-
zIndex: true,
|
|
127
|
-
direction: true,
|
|
128
|
-
shadowColor: true,
|
|
129
|
-
shadowOffset: true,
|
|
130
|
-
shadowOpacity: true,
|
|
131
|
-
shadowRadius: true,
|
|
132
|
-
...validStylesOnBaseProps,
|
|
133
|
-
...stylePropsTransform,
|
|
134
|
-
// allow a few web only ones
|
|
135
|
-
...process.env.TAMAGUI_TARGET === "web" && {
|
|
136
|
-
// RN doesn't support specific border styles per-edge
|
|
137
|
-
borderBottomStyle: true,
|
|
138
|
-
borderTopStyle: true,
|
|
139
|
-
borderLeftStyle: true,
|
|
140
|
-
borderRightStyle: true,
|
|
141
|
-
overflowX: true,
|
|
142
|
-
overflowY: true,
|
|
143
|
-
userSelect: true,
|
|
144
|
-
cursor: true,
|
|
145
|
-
contain: true,
|
|
146
|
-
pointerEvents: true,
|
|
147
|
-
boxSizing: true,
|
|
148
|
-
boxShadow: true,
|
|
149
|
-
outlineColor: true,
|
|
150
|
-
outlineStyle: true,
|
|
151
|
-
outlineOffset: true,
|
|
152
|
-
outlineWidth: true
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
const stylePropsFont = Object.freeze({
|
|
156
|
-
fontFamily: true,
|
|
157
|
-
fontSize: true,
|
|
158
|
-
fontStyle: true,
|
|
159
|
-
fontWeight: true,
|
|
160
|
-
letterSpacing: true,
|
|
161
|
-
lineHeight: true,
|
|
162
|
-
textTransform: true
|
|
163
|
-
});
|
|
164
|
-
const stylePropsTextOnly = Object.freeze({
|
|
165
|
-
color: true,
|
|
166
|
-
...stylePropsFont,
|
|
167
|
-
textAlign: true,
|
|
168
|
-
textDecorationLine: true,
|
|
169
|
-
textDecorationStyle: true,
|
|
170
|
-
textDecorationColor: true,
|
|
171
|
-
textShadowColor: true,
|
|
172
|
-
textShadowOffset: true,
|
|
173
|
-
textShadowRadius: true,
|
|
174
|
-
// allow some web only ones
|
|
175
|
-
...process.env.TAMAGUI_TARGET === "web" && {
|
|
176
|
-
whiteSpace: true,
|
|
177
|
-
wordWrap: true,
|
|
178
|
-
textOverflow: true,
|
|
179
|
-
textDecorationDistance: true,
|
|
180
|
-
userSelect: true,
|
|
181
|
-
selectable: true,
|
|
182
|
-
cursor: true,
|
|
183
|
-
WebkitLineClamp: true,
|
|
184
|
-
WebkitBoxOrient: true
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
const stylePropsText = Object.freeze({
|
|
188
|
-
...stylePropsView,
|
|
189
|
-
...stylePropsTextOnly
|
|
190
|
-
});
|
|
191
|
-
const stylePropsAll = stylePropsText;
|
|
192
|
-
const validPseudoKeys = Object.freeze({
|
|
193
|
-
enterStyle: true,
|
|
194
|
-
exitStyle: true,
|
|
195
|
-
hoverStyle: true,
|
|
196
|
-
pressStyle: true,
|
|
197
|
-
focusStyle: true
|
|
198
|
-
});
|
|
199
|
-
const validStyles = Object.freeze({
|
|
200
|
-
...validPseudoKeys,
|
|
201
|
-
...stylePropsView
|
|
202
|
-
});
|
|
203
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
204
|
-
0 && (module.exports = {
|
|
205
|
-
stylePropsAll,
|
|
206
|
-
stylePropsFont,
|
|
207
|
-
stylePropsText,
|
|
208
|
-
stylePropsTextOnly,
|
|
209
|
-
stylePropsTransform,
|
|
210
|
-
stylePropsView,
|
|
211
|
-
validPseudoKeys,
|
|
212
|
-
validStyles,
|
|
213
|
-
validStylesOnBaseProps
|
|
214
|
-
});
|
|
1
|
+
"use strict";var u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var o in e)u(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of f(e))!g.call(t,r)&&r!==o&&u(t,r,{get:()=>e[r],enumerable:!(a=b(e,r))||a.enumerable});return t};var S=t=>x(u({},"__esModule",{value:!0}),t);var w={};h(w,{stylePropsAll:()=>m,stylePropsFont:()=>l,stylePropsText:()=>p,stylePropsTextOnly:()=>s,stylePropsTransform:()=>d,stylePropsView:()=>i,validPseudoKeys:()=>c,validStyles:()=>y,validStylesOnBaseProps:()=>n});module.exports=S(w);const d=Object.freeze({x:!0,y:!0,scale:!0,perspective:!0,scaleX:!0,scaleY:!0,skewX:!0,skewY:!0,matrix:!0,rotate:!0,rotateY:!0,rotateX:!0,rotateZ:!0}),n=Object.freeze({placeholderTextColor:!0}),i=Object.freeze({backfaceVisibility:!0,backgroundColor:!0,borderBottomColor:!0,borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderBottomWidth:!0,borderColor:!0,borderEndColor:!0,borderLeftColor:!0,borderLeftWidth:!0,borderRadius:!0,borderRightColor:!0,borderRightWidth:!0,borderStartColor:!0,borderStyle:!0,borderTopColor:!0,borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,borderTopWidth:!0,borderWidth:!0,opacity:!0,transform:!0,alignContent:!0,alignItems:!0,alignSelf:!0,aspectRatio:!0,borderEndWidth:!0,borderStartWidth:!0,bottom:!0,display:!0,end:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexShrink:!0,flexWrap:!0,gap:!0,columnGap:!0,rowGap:!0,height:!0,justifyContent:!0,left:!0,margin:!0,marginBottom:!0,marginEnd:!0,marginHorizontal:!0,marginLeft:!0,marginRight:!0,marginStart:!0,marginTop:!0,marginVertical:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,overflow:!0,padding:!0,paddingBottom:!0,paddingEnd:!0,paddingHorizontal:!0,paddingLeft:!0,paddingRight:!0,paddingStart:!0,paddingTop:!0,paddingVertical:!0,position:!0,right:!0,start:!0,top:!0,width:!0,zIndex:!0,direction:!0,shadowColor:!0,shadowOffset:!0,shadowOpacity:!0,shadowRadius:!0,...n,...d,...process.env.TAMAGUI_TARGET==="web"&&{borderBottomStyle:!0,borderTopStyle:!0,borderLeftStyle:!0,borderRightStyle:!0,overflowX:!0,overflowY:!0,userSelect:!0,cursor:!0,contain:!0,pointerEvents:!0,boxSizing:!0,boxShadow:!0,outlineColor:!0,outlineStyle:!0,outlineOffset:!0,outlineWidth:!0}}),l=Object.freeze({fontFamily:!0,fontSize:!0,fontStyle:!0,fontWeight:!0,letterSpacing:!0,lineHeight:!0,textTransform:!0}),s=Object.freeze({color:!0,...l,textAlign:!0,textDecorationLine:!0,textDecorationStyle:!0,textDecorationColor:!0,textShadowColor:!0,textShadowOffset:!0,textShadowRadius:!0,...process.env.TAMAGUI_TARGET==="web"&&{whiteSpace:!0,wordWrap:!0,textOverflow:!0,textDecorationDistance:!0,userSelect:!0,selectable:!0,cursor:!0,WebkitLineClamp:!0,WebkitBoxOrient:!0}}),p=Object.freeze({...i,...s}),m=p,c=Object.freeze({enterStyle:!0,exitStyle:!0,hoverStyle:!0,pressStyle:!0,focusStyle:!0}),y=Object.freeze({...c,...i});0&&(module.exports={stylePropsAll,stylePropsFont,stylePropsText,stylePropsTextOnly,stylePropsTransform,stylePropsView,validPseudoKeys,validStyles,validStylesOnBaseProps});
|
|
215
2
|
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"],
|
|
4
4
|
"sourcesContent": ["// flat transform props\nexport const stylePropsTransform = Object.freeze({\n x: true,\n y: true,\n scale: true,\n perspective: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n})\n\nexport const validStylesOnBaseProps = Object.freeze({\n placeholderTextColor: true,\n})\n\nexport const stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n gap: true,\n columnGap: true,\n rowGap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n ...validStylesOnBaseProps,\n ...stylePropsTransform,\n\n // allow a few web only ones\n\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n // RN doesn't support specific border styles per-edge\n borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: true,\n\n overflowX: true,\n overflowY: true,\n userSelect: true,\n cursor: true,\n contain: true,\n pointerEvents: true,\n boxSizing: true,\n boxShadow: true,\n outlineColor: true,\n outlineStyle: true,\n outlineOffset: true,\n outlineWidth: true,\n }),\n})\n\nexport const stylePropsFont = Object.freeze({\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textTransform: true,\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n ...stylePropsFont,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n\n // allow some web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n textDecorationDistance: true,\n userSelect: true,\n selectable: true,\n cursor: true,\n WebkitLineClamp: true,\n WebkitBoxOrient: true,\n }),\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validPseudoKeys = Object.freeze({\n enterStyle: true,\n exitStyle: true,\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n})\n\nexport const validStyles = Object.freeze({\n ...validPseudoKeys,\n ...stylePropsView,\n})\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["validStyleProps_exports", "__export", "stylePropsAll", "stylePropsFont", "stylePropsText", "stylePropsTextOnly", "stylePropsTransform", "stylePropsView", "validPseudoKeys", "validStyles", "validStylesOnBaseProps", "__toCommonJS"]
|
|
7
7
|
}
|
package/dist/esm/clamp.js
CHANGED
package/dist/esm/clamp.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/clamp.ts"],
|
|
4
4
|
"sourcesContent": ["export function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value))\n}\n"],
|
|
5
|
-
"mappings": "AAAO,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAO,SAASA,EAAMC,EAAe,CAACC,EAAKC,CAAG,EAA6B,CACzE,OAAO,KAAK,IAAIA,EAAK,KAAK,IAAID,EAAKD,CAAK,CAAC,CAC3C",
|
|
6
|
+
"names": ["clamp", "value", "min", "max"]
|
|
7
7
|
}
|
package/dist/esm/clamp.mjs
CHANGED
package/dist/esm/clamp.mjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/clamp.ts"],
|
|
4
4
|
"sourcesContent": ["export function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value))\n}\n"],
|
|
5
|
-
"mappings": "AAAO,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAO,SAASA,EAAMC,EAAe,CAACC,EAAKC,CAAG,EAA6B,CACzE,OAAO,KAAK,IAAIA,EAAK,KAAK,IAAID,EAAKD,CAAK,CAAC,CAC3C",
|
|
6
|
+
"names": ["clamp", "value", "min", "max"]
|
|
7
7
|
}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (!og || !next) {
|
|
3
|
-
return next || og;
|
|
4
|
-
}
|
|
5
|
-
return function composedEventHandler(event) {
|
|
6
|
-
og == null ? void 0 : og(event);
|
|
7
|
-
if (!event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
8
|
-
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
9
|
-
return next == null ? void 0 : next(event);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
composeEventHandlers
|
|
15
|
-
};
|
|
1
|
+
function E(n,r,{checkDefaultPrevented:t=!0}={}){return!n||!r?r||n:function(e){if(n==null||n(e),!e||!(t&&"defaultPrevented"in e)||"defaultPrevented"in e&&!e.defaultPrevented)return r==null?void 0:r(e)}}export{E as composeEventHandlers};
|
|
16
2
|
//# sourceMappingURL=composeEventHandlers.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
4
|
"sourcesContent": ["type Events = Object\n\nexport type EventHandler<E extends Events> = (event: E) => void\n\nexport function composeEventHandlers<E extends Events>(\n og?: EventHandler<E>,\n next?: EventHandler<E>,\n { checkDefaultPrevented = true } = {}\n) {\n if (!og || !next) {\n return next || og\n }\n return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !event ||\n !(checkDefaultPrevented && 'defaultPrevented' in event) ||\n // @ts-ignore\n ('defaultPrevented' in event && !event.defaultPrevented)\n ) {\n return next?.(event)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": "AAIO,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAIO,SAASA,EACdC,EACAC,EACA,CAAE,sBAAAC,EAAwB,EAAK,EAAI,CAAC,EACpC,CACA,MAAI,CAACF,GAAM,CAACC,EACHA,GAAQD,EAEV,SAA8BG,EAAU,CAE7C,GADAH,GAAA,MAAAA,EAAKG,GAEH,CAACA,GACD,EAAED,GAAyB,qBAAsBC,IAEhD,qBAAsBA,GAAS,CAACA,EAAM,iBAEvC,OAAOF,GAAA,YAAAA,EAAOE,EAElB,CACF",
|
|
6
|
+
"names": ["composeEventHandlers", "og", "next", "checkDefaultPrevented", "event"]
|
|
7
7
|
}
|