@tamagui/helpers 1.0.1-beta.99 → 1.0.1-rc.0
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 -0
- package/dist/cjs/clamp.js.map +1 -1
- package/dist/cjs/composeEventHandlers.js +2 -1
- package/dist/cjs/composeEventHandlers.js.map +2 -2
- package/dist/cjs/concatClassName.js +4 -3
- package/dist/cjs/concatClassName.js.map +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/log.js +1 -0
- package/dist/cjs/log.js.map +1 -1
- package/dist/cjs/types.js +1 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/validStyleProps.js +45 -41
- package/dist/cjs/validStyleProps.js.map +2 -2
- package/dist/esm/clamp.js +0 -0
- package/dist/esm/clamp.js.map +1 -1
- package/dist/esm/composeEventHandlers.js +1 -1
- package/dist/esm/composeEventHandlers.js.map +2 -2
- package/dist/esm/concatClassName.js +3 -3
- package/dist/esm/concatClassName.js.map +2 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/log.js +0 -0
- package/dist/esm/log.js.map +0 -0
- package/dist/esm/types.js +0 -0
- package/dist/esm/types.js.map +0 -0
- package/dist/esm/validStyleProps.js +42 -42
- package/dist/esm/validStyleProps.js.map +2 -2
- package/dist/jsx/clamp.js +0 -0
- package/dist/jsx/clamp.js.map +1 -1
- package/dist/jsx/composeEventHandlers.js +3 -3
- package/dist/jsx/composeEventHandlers.js.map +2 -2
- package/dist/jsx/concatClassName.js +3 -3
- package/dist/jsx/concatClassName.js.map +2 -2
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.js.map +2 -2
- package/dist/jsx/log.js +0 -0
- package/dist/jsx/log.js.map +0 -0
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/types.js.map +0 -0
- package/dist/jsx/validStyleProps.js +9 -2
- package/dist/jsx/validStyleProps.js.map +2 -2
- package/package.json +14 -9
- package/src/composeEventHandlers.ts +10 -5
- package/src/concatClassName.ts +10 -5
- package/src/index.ts +1 -2
- package/src/validStyleProps.ts +7 -0
- package/types/clamp.d.ts +0 -0
- package/types/composeEventHandlers.d.ts +4 -4
- package/types/concatClassName.d.ts +6 -0
- package/types/index.d.ts +1 -2
- package/types/types.d.ts +0 -0
- package/types/validStyleProps.d.ts +13 -0
- package/dist/cjs/simpleHash.js +0 -36
- package/dist/cjs/simpleHash.js.map +0 -7
- package/dist/esm/simpleHash.js +0 -13
- package/dist/esm/simpleHash.js.map +0 -7
- package/dist/jsx/simpleHash.js +0 -13
- package/dist/jsx/simpleHash.js.map +0 -7
- package/src/log.ts +0 -4
- package/src/simpleHash.ts +0 -9
- package/types/composeEventHandlers.d.ts.map +0 -1
- package/types/log.d.ts +0 -2
- package/types/simpleHash.d.ts +0 -2
- package/types/simpleHash.d.ts.map +0 -1
package/dist/cjs/clamp.js
CHANGED
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -23,7 +24,7 @@ module.exports = __toCommonJS(composeEventHandlers_exports);
|
|
|
23
24
|
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
24
25
|
return function composedEventHandler(event) {
|
|
25
26
|
og == null ? void 0 : og(event);
|
|
26
|
-
if (!checkDefaultPrevented || !event.defaultPrevented) {
|
|
27
|
+
if (!checkDefaultPrevented || !("defaultPrevented" in event) || "defaultPrevented" in event && !event.defaultPrevented) {
|
|
27
28
|
return next == null ? void 0 : next(event);
|
|
28
29
|
}
|
|
29
30
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["type Events = any\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 return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !checkDefaultPrevented ||\n // @ts-ignore\n !('defaultPrevented' in event) ||\n // @ts-ignore\n ('defaultPrevented' in event && !event.defaultPrevented)\n ) {\n return next?.(event)\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,KAAK,IAAI,CAAC,GACpC;AACA,SAAO,SAAS,qBAAqB,OAAU;AAC7C,6BAAK;AACL,QACE,CAAC,yBAED,EAAE,sBAAsB,UAEvB,sBAAsB,SAAS,CAAC,MAAM,kBACvC;AACA,aAAO,6BAAO;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -21,13 +22,13 @@ __export(concatClassName_exports, {
|
|
|
21
22
|
});
|
|
22
23
|
module.exports = __toCommonJS(concatClassName_exports);
|
|
23
24
|
function concatClassName(_cn) {
|
|
24
|
-
const
|
|
25
|
+
const args = arguments;
|
|
25
26
|
const usedPrefixes = [];
|
|
26
27
|
let final = "";
|
|
27
|
-
const len =
|
|
28
|
+
const len = args.length;
|
|
28
29
|
let propObjects = null;
|
|
29
30
|
for (let x = len; x >= 0; x--) {
|
|
30
|
-
const cns =
|
|
31
|
+
const cns = args[x];
|
|
31
32
|
if (!cns)
|
|
32
33
|
continue;
|
|
33
34
|
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/concatClassName.ts"],
|
|
4
|
-
"sourcesContent": ["// perf sensitive so doing some weird stuff\n\
|
|
5
|
-
"mappings": "
|
|
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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,SAAS,gBAAgB,KAAqD;AACnF,QAAM,OAAO;AACb,QAAM,eAAyB,CAAC;AAChC,MAAI,QAAQ;AAEZ,QAAM,MAAM,KAAK;AACjB,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,KAAK;AAEjB,QAAI,CAAC;AAAK;AACV,QAAI,CAAC,MAAM,QAAQ,GAAG,KAAK,OAAO,QAAQ,UAAU;AAElD,oBAAc,eAAe,CAAC;AAC9B,kBAAY,KAAK,GAAG;AACpB;AAAA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
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -19,6 +20,5 @@ __reExport(src_exports, require("./composeEventHandlers"), module.exports);
|
|
|
19
20
|
__reExport(src_exports, require("./concatClassName"), module.exports);
|
|
20
21
|
__reExport(src_exports, require("./validStyleProps"), module.exports);
|
|
21
22
|
__reExport(src_exports, require("./types"), module.exports);
|
|
22
|
-
__reExport(src_exports, require("
|
|
23
|
-
__reExport(src_exports, require("./simpleHash"), module.exports);
|
|
23
|
+
__reExport(src_exports, require("@tamagui/simple-hash"), module.exports);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './clamp'\nexport * from './composeEventHandlers'\nexport * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from '
|
|
5
|
-
"mappings": "
|
|
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": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,oBAAd;AACA,wBAAc,mCADd;AAEA,wBAAc,8BAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,oBAJd;AAKA,wBAAc,iCALd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/log.js
CHANGED
package/dist/cjs/log.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/log.ts"],
|
|
4
4
|
"sourcesContent": ["export const log = (...args: any) => {\n console.log(...args)\n return args[0]\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,MAAM,IAAI,SAAc;AACnC,UAAQ,IAAI,GAAG,IAAI;AACnB,SAAO,KAAK;AACd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/types.js
CHANGED
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"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
6
|
var __export = (target, all) => {
|
|
20
7
|
for (var name in all)
|
|
21
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -37,7 +24,8 @@ __export(validStyleProps_exports, {
|
|
|
37
24
|
stylePropsTransform: () => stylePropsTransform,
|
|
38
25
|
stylePropsView: () => stylePropsView,
|
|
39
26
|
validPseudoKeys: () => validPseudoKeys,
|
|
40
|
-
validStyles: () => validStyles
|
|
27
|
+
validStyles: () => validStyles,
|
|
28
|
+
validStylesOnBaseProps: () => validStylesOnBaseProps
|
|
41
29
|
});
|
|
42
30
|
module.exports = __toCommonJS(validStyleProps_exports);
|
|
43
31
|
const stylePropsTransform = Object.freeze({
|
|
@@ -55,7 +43,10 @@ const stylePropsTransform = Object.freeze({
|
|
|
55
43
|
rotateX: true,
|
|
56
44
|
rotateZ: true
|
|
57
45
|
});
|
|
58
|
-
const
|
|
46
|
+
const validStylesOnBaseProps = Object.freeze({
|
|
47
|
+
placeholderTextColor: true
|
|
48
|
+
});
|
|
49
|
+
const stylePropsView = Object.freeze({
|
|
59
50
|
backfaceVisibility: true,
|
|
60
51
|
backgroundColor: true,
|
|
61
52
|
borderBottomColor: true,
|
|
@@ -137,18 +128,21 @@ const stylePropsView = Object.freeze(__spreadValues(__spreadValues({
|
|
|
137
128
|
shadowColor: true,
|
|
138
129
|
shadowOffset: true,
|
|
139
130
|
shadowOpacity: true,
|
|
140
|
-
shadowRadius: true
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
131
|
+
shadowRadius: true,
|
|
132
|
+
...validStylesOnBaseProps,
|
|
133
|
+
...stylePropsTransform,
|
|
134
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
135
|
+
overflowX: true,
|
|
136
|
+
overflowY: true,
|
|
137
|
+
userSelect: true,
|
|
138
|
+
cursor: true,
|
|
139
|
+
contain: true,
|
|
140
|
+
pointerEvents: true,
|
|
141
|
+
boxSizing: true,
|
|
142
|
+
boxShadow: true
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
const stylePropsTextOnly = Object.freeze({
|
|
152
146
|
color: true,
|
|
153
147
|
fontFamily: true,
|
|
154
148
|
fontSize: true,
|
|
@@ -163,17 +157,23 @@ const stylePropsTextOnly = Object.freeze(__spreadValues({
|
|
|
163
157
|
textShadowColor: true,
|
|
164
158
|
textShadowOffset: true,
|
|
165
159
|
textShadowRadius: true,
|
|
166
|
-
textTransform: true
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
160
|
+
textTransform: true,
|
|
161
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
162
|
+
whiteSpace: true,
|
|
163
|
+
wordWrap: true,
|
|
164
|
+
textOverflow: true,
|
|
165
|
+
textDecorationDistance: true,
|
|
166
|
+
userSelect: true,
|
|
167
|
+
selectable: true,
|
|
168
|
+
cursor: true,
|
|
169
|
+
WebkitLineClamp: true,
|
|
170
|
+
WebkitBoxOrient: true
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
const stylePropsText = Object.freeze({
|
|
174
|
+
...stylePropsView,
|
|
175
|
+
...stylePropsTextOnly
|
|
176
|
+
});
|
|
177
177
|
const stylePropsAll = stylePropsText;
|
|
178
178
|
const validPseudoKeys = Object.freeze({
|
|
179
179
|
enterStyle: true,
|
|
@@ -182,7 +182,10 @@ const validPseudoKeys = Object.freeze({
|
|
|
182
182
|
pressStyle: true,
|
|
183
183
|
focusStyle: true
|
|
184
184
|
});
|
|
185
|
-
const validStyles = Object.freeze(
|
|
185
|
+
const validStyles = Object.freeze({
|
|
186
|
+
...validPseudoKeys,
|
|
187
|
+
...stylePropsView
|
|
188
|
+
});
|
|
186
189
|
// Annotate the CommonJS export names for ESM import in node:
|
|
187
190
|
0 && (module.exports = {
|
|
188
191
|
stylePropsAll,
|
|
@@ -191,6 +194,7 @@ const validStyles = Object.freeze(__spreadValues(__spreadValues({}, validPseudoK
|
|
|
191
194
|
stylePropsTransform,
|
|
192
195
|
stylePropsView,
|
|
193
196
|
validPseudoKeys,
|
|
194
|
-
validStyles
|
|
197
|
+
validStyles,
|
|
198
|
+
validStylesOnBaseProps
|
|
195
199
|
});
|
|
196
200
|
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"],
|
|
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 stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...stylePropsTransform,\n\n // allow a few web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\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 }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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 }),\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": "
|
|
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 borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...(process.env.TAMAGUI_TARGET === 'web' && {\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 }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,CAAC;AA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,CAAC;AAEM,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd,CAAC;AAEM,MAAM,cAAc,OAAO,OAAO;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AACL,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/clamp.js
CHANGED
|
File without changes
|
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,
|
|
5
|
+
"mappings": "AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
2
2
|
return function composedEventHandler(event) {
|
|
3
3
|
og == null ? void 0 : og(event);
|
|
4
|
-
if (!checkDefaultPrevented || !event.defaultPrevented) {
|
|
4
|
+
if (!checkDefaultPrevented || !("defaultPrevented" in event) || "defaultPrevented" in event && !event.defaultPrevented) {
|
|
5
5
|
return next == null ? void 0 : next(event);
|
|
6
6
|
}
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["type Events = any\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 return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !checkDefaultPrevented ||\n // @ts-ignore\n !('defaultPrevented' in event) ||\n // @ts-ignore\n ('defaultPrevented' in event && !event.defaultPrevented)\n ) {\n return next?.(event)\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,KAAK,IAAI,CAAC,GACpC;AACA,SAAO,SAAS,qBAAqB,OAAU;AAC7C,6BAAK;AACL,QACE,CAAC,yBAED,EAAE,sBAAsB,UAEvB,sBAAsB,SAAS,CAAC,MAAM,kBACvC;AACA,aAAO,6BAAO;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function concatClassName(_cn) {
|
|
2
|
-
const
|
|
2
|
+
const args = arguments;
|
|
3
3
|
const usedPrefixes = [];
|
|
4
4
|
let final = "";
|
|
5
|
-
const len =
|
|
5
|
+
const len = args.length;
|
|
6
6
|
let propObjects = null;
|
|
7
7
|
for (let x = len; x >= 0; x--) {
|
|
8
|
-
const cns =
|
|
8
|
+
const cns = args[x];
|
|
9
9
|
if (!cns)
|
|
10
10
|
continue;
|
|
11
11
|
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/concatClassName.ts"],
|
|
4
|
-
"sourcesContent": ["// perf sensitive so doing some weird stuff\n\
|
|
5
|
-
"mappings": "
|
|
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": "AAUO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,UACzE;AACA,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,cAAc;AACrD,iBAAO;AAAA,QACT,CAAC,GACD;AAEA;AAAA,QACF;AAAA,MACF;AAEA,cAAQ,OAAO,MAAM;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -3,6 +3,5 @@ export * from "./composeEventHandlers";
|
|
|
3
3
|
export * from "./concatClassName";
|
|
4
4
|
export * from "./validStyleProps";
|
|
5
5
|
export * from "./types";
|
|
6
|
-
export * from "
|
|
7
|
-
export * from "./simpleHash";
|
|
6
|
+
export * from "@tamagui/simple-hash";
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './clamp'\nexport * from './composeEventHandlers'\nexport * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from '
|
|
5
|
-
"mappings": "AAAA;
|
|
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": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/log.js
CHANGED
|
File without changes
|
package/dist/esm/log.js.map
CHANGED
|
File without changes
|
package/dist/esm/types.js
CHANGED
|
File without changes
|
package/dist/esm/types.js.map
CHANGED
|
File without changes
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
1
|
const stylePropsTransform = Object.freeze({
|
|
18
2
|
x: true,
|
|
19
3
|
y: true,
|
|
@@ -29,7 +13,10 @@ const stylePropsTransform = Object.freeze({
|
|
|
29
13
|
rotateX: true,
|
|
30
14
|
rotateZ: true
|
|
31
15
|
});
|
|
32
|
-
const
|
|
16
|
+
const validStylesOnBaseProps = Object.freeze({
|
|
17
|
+
placeholderTextColor: true
|
|
18
|
+
});
|
|
19
|
+
const stylePropsView = Object.freeze({
|
|
33
20
|
backfaceVisibility: true,
|
|
34
21
|
backgroundColor: true,
|
|
35
22
|
borderBottomColor: true,
|
|
@@ -111,18 +98,21 @@ const stylePropsView = Object.freeze(__spreadValues(__spreadValues({
|
|
|
111
98
|
shadowColor: true,
|
|
112
99
|
shadowOffset: true,
|
|
113
100
|
shadowOpacity: true,
|
|
114
|
-
shadowRadius: true
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
101
|
+
shadowRadius: true,
|
|
102
|
+
...validStylesOnBaseProps,
|
|
103
|
+
...stylePropsTransform,
|
|
104
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
105
|
+
overflowX: true,
|
|
106
|
+
overflowY: true,
|
|
107
|
+
userSelect: true,
|
|
108
|
+
cursor: true,
|
|
109
|
+
contain: true,
|
|
110
|
+
pointerEvents: true,
|
|
111
|
+
boxSizing: true,
|
|
112
|
+
boxShadow: true
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const stylePropsTextOnly = Object.freeze({
|
|
126
116
|
color: true,
|
|
127
117
|
fontFamily: true,
|
|
128
118
|
fontSize: true,
|
|
@@ -137,17 +127,23 @@ const stylePropsTextOnly = Object.freeze(__spreadValues({
|
|
|
137
127
|
textShadowColor: true,
|
|
138
128
|
textShadowOffset: true,
|
|
139
129
|
textShadowRadius: true,
|
|
140
|
-
textTransform: true
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
130
|
+
textTransform: true,
|
|
131
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
132
|
+
whiteSpace: true,
|
|
133
|
+
wordWrap: true,
|
|
134
|
+
textOverflow: true,
|
|
135
|
+
textDecorationDistance: true,
|
|
136
|
+
userSelect: true,
|
|
137
|
+
selectable: true,
|
|
138
|
+
cursor: true,
|
|
139
|
+
WebkitLineClamp: true,
|
|
140
|
+
WebkitBoxOrient: true
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
const stylePropsText = Object.freeze({
|
|
144
|
+
...stylePropsView,
|
|
145
|
+
...stylePropsTextOnly
|
|
146
|
+
});
|
|
151
147
|
const stylePropsAll = stylePropsText;
|
|
152
148
|
const validPseudoKeys = Object.freeze({
|
|
153
149
|
enterStyle: true,
|
|
@@ -156,7 +152,10 @@ const validPseudoKeys = Object.freeze({
|
|
|
156
152
|
pressStyle: true,
|
|
157
153
|
focusStyle: true
|
|
158
154
|
});
|
|
159
|
-
const validStyles = Object.freeze(
|
|
155
|
+
const validStyles = Object.freeze({
|
|
156
|
+
...validPseudoKeys,
|
|
157
|
+
...stylePropsView
|
|
158
|
+
});
|
|
160
159
|
export {
|
|
161
160
|
stylePropsAll,
|
|
162
161
|
stylePropsText,
|
|
@@ -164,6 +163,7 @@ export {
|
|
|
164
163
|
stylePropsTransform,
|
|
165
164
|
stylePropsView,
|
|
166
165
|
validPseudoKeys,
|
|
167
|
-
validStyles
|
|
166
|
+
validStyles,
|
|
167
|
+
validStylesOnBaseProps
|
|
168
168
|
};
|
|
169
169
|
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"],
|
|
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 stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...stylePropsTransform,\n\n // allow a few web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\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 }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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 }),\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": "
|
|
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 borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...(process.env.TAMAGUI_TARGET === 'web' && {\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 }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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": "AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,CAAC;AAEM,MAAM,yBAA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AAM,gBAAgB;AAEtB,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd,CAAC;AAEM,MAAM,cAAc,OAAO,OAAO;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AACL,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/clamp.js
CHANGED
|
File without changes
|
package/dist/jsx/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,
|
|
5
|
+
"mappings": "AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
2
2
|
return function composedEventHandler(event) {
|
|
3
|
-
og
|
|
4
|
-
if (!checkDefaultPrevented || !event.defaultPrevented) {
|
|
5
|
-
return next
|
|
3
|
+
og?.(event);
|
|
4
|
+
if (!checkDefaultPrevented || !("defaultPrevented" in event) || "defaultPrevented" in event && !event.defaultPrevented) {
|
|
5
|
+
return next?.(event);
|
|
6
6
|
}
|
|
7
7
|
};
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["type Events = any\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 return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !checkDefaultPrevented ||\n // @ts-ignore\n !('defaultPrevented' in event) ||\n // @ts-ignore\n ('defaultPrevented' in event && !event.defaultPrevented)\n ) {\n return next?.(event)\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,KAAK,IAAI,CAAC,GACpC;AACA,SAAO,SAAS,qBAAqB,OAAU;AAC7C,SAAK,KAAK;AACV,QACE,CAAC,yBAED,EAAE,sBAAsB,UAEvB,sBAAsB,SAAS,CAAC,MAAM,kBACvC;AACA,aAAO,OAAO,KAAK;AAAA,IACrB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function concatClassName(_cn) {
|
|
2
|
-
const
|
|
2
|
+
const args = arguments;
|
|
3
3
|
const usedPrefixes = [];
|
|
4
4
|
let final = "";
|
|
5
|
-
const len =
|
|
5
|
+
const len = args.length;
|
|
6
6
|
let propObjects = null;
|
|
7
7
|
for (let x = len; x >= 0; x--) {
|
|
8
|
-
const cns =
|
|
8
|
+
const cns = args[x];
|
|
9
9
|
if (!cns)
|
|
10
10
|
continue;
|
|
11
11
|
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/concatClassName.ts"],
|
|
4
|
-
"sourcesContent": ["// perf sensitive so doing some weird stuff\n\
|
|
5
|
-
"mappings": "
|
|
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"],
|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YAAY,GAAG,aAAa;AAAA,UACzE;AACA,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,cAAc;AACrD,iBAAO;AAAA,QACT,CAAC,GACD;AAEA;AAAA,QACF;AAAA,MACF;AAEA,cAAQ,OAAO,MAAM;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/index.js
CHANGED
|
@@ -3,6 +3,5 @@ export * from "./composeEventHandlers";
|
|
|
3
3
|
export * from "./concatClassName";
|
|
4
4
|
export * from "./validStyleProps";
|
|
5
5
|
export * from "./types";
|
|
6
|
-
export * from "
|
|
7
|
-
export * from "./simpleHash";
|
|
6
|
+
export * from "@tamagui/simple-hash";
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
package/dist/jsx/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './clamp'\nexport * from './composeEventHandlers'\nexport * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from '
|
|
5
|
-
"mappings": "AAAA;
|
|
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": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/log.js
CHANGED
|
File without changes
|
package/dist/jsx/log.js.map
CHANGED
|
File without changes
|
package/dist/jsx/types.js
CHANGED
|
File without changes
|
package/dist/jsx/types.js.map
CHANGED
|
File without changes
|
|
@@ -13,6 +13,9 @@ const stylePropsTransform = Object.freeze({
|
|
|
13
13
|
rotateX: true,
|
|
14
14
|
rotateZ: true
|
|
15
15
|
});
|
|
16
|
+
const validStylesOnBaseProps = Object.freeze({
|
|
17
|
+
placeholderTextColor: true
|
|
18
|
+
});
|
|
16
19
|
const stylePropsView = Object.freeze({
|
|
17
20
|
backfaceVisibility: true,
|
|
18
21
|
backgroundColor: true,
|
|
@@ -96,6 +99,7 @@ const stylePropsView = Object.freeze({
|
|
|
96
99
|
shadowOffset: true,
|
|
97
100
|
shadowOpacity: true,
|
|
98
101
|
shadowRadius: true,
|
|
102
|
+
...validStylesOnBaseProps,
|
|
99
103
|
...stylePropsTransform,
|
|
100
104
|
...process.env.TAMAGUI_TARGET === "web" && {
|
|
101
105
|
overflowX: true,
|
|
@@ -131,7 +135,9 @@ const stylePropsTextOnly = Object.freeze({
|
|
|
131
135
|
textDecorationDistance: true,
|
|
132
136
|
userSelect: true,
|
|
133
137
|
selectable: true,
|
|
134
|
-
cursor: true
|
|
138
|
+
cursor: true,
|
|
139
|
+
WebkitLineClamp: true,
|
|
140
|
+
WebkitBoxOrient: true
|
|
135
141
|
}
|
|
136
142
|
});
|
|
137
143
|
const stylePropsText = Object.freeze({
|
|
@@ -157,6 +163,7 @@ export {
|
|
|
157
163
|
stylePropsTransform,
|
|
158
164
|
stylePropsView,
|
|
159
165
|
validPseudoKeys,
|
|
160
|
-
validStyles
|
|
166
|
+
validStyles,
|
|
167
|
+
validStylesOnBaseProps
|
|
161
168
|
};
|
|
162
169
|
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"],
|
|
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 stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...stylePropsTransform,\n\n // allow a few web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\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 }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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 }),\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": "AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,CAAC;AAEM,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA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,SAAS;AAAA,IAC1C,WAAW;AAAA,IACX,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,WAAW;AAAA,IACX,WAAW;AAAA,EACb;AACF,CAAC;AAEM,MAAM,qBAAqB,OAAO,OAAO;AAAA,EAC9C,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EAGf,GAAI,QAAQ,IAAI,mBAAmB,SAAS;AAAA,IAC1C,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,IACd,wBAAwB;AAAA,IACxB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,QAAQ;AAAA,
|
|
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 borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...(process.env.TAMAGUI_TARGET === 'web' && {\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 }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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": "AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,CAAC;AAEM,MAAM,yBAAyB,OAAO,OAAO;AAAA,EAClD,sBAAsB;AACxB,CAAC;AAEM,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,aAAa;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OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EAGf,GAAI,QAAQ,IAAI,mBAAmB,SAAS;AAAA,IAC1C,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,IACd,wBAAwB;AAAA,IACxB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EACnB;AACF,CAAC;AAEM,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,GAAG;AAAA,EACH,GAAG;AACL,CAAC;AAEM,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd,CAAC;AAEM,MAAM,cAAc,OAAO,OAAO;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AACL,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.0.1-
|
|
3
|
+
"version": "1.0.1-rc.0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
7
7
|
"module": "dist/esm",
|
|
8
|
-
"module:jsx": "dist/jsx",
|
|
9
8
|
"files": [
|
|
10
9
|
"src",
|
|
11
10
|
"types",
|
|
@@ -14,20 +13,26 @@
|
|
|
14
13
|
"scripts": {
|
|
15
14
|
"build": "tamagui-build",
|
|
16
15
|
"watch": "tamagui-build --watch",
|
|
16
|
+
"lint": "eslint src",
|
|
17
|
+
"lint:fix": "yarn lint --fix",
|
|
17
18
|
"clean": "tamagui-build clean",
|
|
18
19
|
"clean:build": "tamagui-build clean:build"
|
|
19
20
|
},
|
|
20
|
-
"
|
|
21
|
-
"@tamagui/
|
|
22
|
-
"react": "*",
|
|
23
|
-
"react-native": "*"
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@tamagui/simple-hash": "^1.0.1-rc.0"
|
|
24
23
|
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"react-native": "*"
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@tamagui/build": "^1.0.1-rc.0"
|
|
28
26
|
},
|
|
29
27
|
"publishConfig": {
|
|
30
28
|
"access": "public"
|
|
31
29
|
},
|
|
30
|
+
"exports": {
|
|
31
|
+
"./package.json": "./package.json",
|
|
32
|
+
".": {
|
|
33
|
+
"import": "./dist/esm/index.js",
|
|
34
|
+
"require": "./dist/cjs/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
32
37
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14"
|
|
33
38
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import { GestureResponderEvent } from 'react-native'
|
|
1
|
+
type Events = any
|
|
3
2
|
|
|
4
|
-
export type EventHandler<E extends
|
|
3
|
+
export type EventHandler<E extends Events> = (event: E) => void
|
|
5
4
|
|
|
6
|
-
export function composeEventHandlers<E extends
|
|
5
|
+
export function composeEventHandlers<E extends Events>(
|
|
7
6
|
og?: EventHandler<E>,
|
|
8
7
|
next?: EventHandler<E>,
|
|
9
8
|
{ checkDefaultPrevented = true } = {}
|
|
10
9
|
) {
|
|
11
10
|
return function composedEventHandler(event: E) {
|
|
12
11
|
og?.(event)
|
|
13
|
-
if (
|
|
12
|
+
if (
|
|
13
|
+
!checkDefaultPrevented ||
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
!('defaultPrevented' in event) ||
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
('defaultPrevented' in event && !event.defaultPrevented)
|
|
18
|
+
) {
|
|
14
19
|
return next?.(event)
|
|
15
20
|
}
|
|
16
21
|
}
|
package/src/concatClassName.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
// perf sensitive so doing some weird stuff
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* next - take objects:
|
|
5
|
+
*
|
|
6
|
+
* { _shorthand: 'postfix' }
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
4
9
|
|
|
5
10
|
export function concatClassName(...args: any[]): any
|
|
6
|
-
export function concatClassName(_cn:
|
|
7
|
-
const
|
|
11
|
+
export function concatClassName(_cn: Record<string, any> | null | undefined): string {
|
|
12
|
+
const args = arguments
|
|
8
13
|
const usedPrefixes: string[] = []
|
|
9
14
|
let final = ''
|
|
10
15
|
|
|
11
|
-
const len =
|
|
16
|
+
const len = args.length
|
|
12
17
|
let propObjects: any = null
|
|
13
18
|
for (let x = len; x >= 0; x--) {
|
|
14
|
-
const cns =
|
|
19
|
+
const cns = args[x]
|
|
15
20
|
|
|
16
21
|
if (!cns) continue
|
|
17
22
|
if (!Array.isArray(cns) && typeof cns !== 'string') {
|
package/src/index.ts
CHANGED
package/src/validStyleProps.ts
CHANGED
|
@@ -15,6 +15,10 @@ export const stylePropsTransform = Object.freeze({
|
|
|
15
15
|
rotateZ: true,
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
+
export const validStylesOnBaseProps = Object.freeze({
|
|
19
|
+
placeholderTextColor: true,
|
|
20
|
+
})
|
|
21
|
+
|
|
18
22
|
export const stylePropsView = Object.freeze({
|
|
19
23
|
backfaceVisibility: true,
|
|
20
24
|
backgroundColor: true,
|
|
@@ -98,6 +102,7 @@ export const stylePropsView = Object.freeze({
|
|
|
98
102
|
shadowOffset: true,
|
|
99
103
|
shadowOpacity: true,
|
|
100
104
|
shadowRadius: true,
|
|
105
|
+
...validStylesOnBaseProps,
|
|
101
106
|
...stylePropsTransform,
|
|
102
107
|
|
|
103
108
|
// allow a few web only ones
|
|
@@ -139,6 +144,8 @@ export const stylePropsTextOnly = Object.freeze({
|
|
|
139
144
|
userSelect: true,
|
|
140
145
|
selectable: true,
|
|
141
146
|
cursor: true,
|
|
147
|
+
WebkitLineClamp: true,
|
|
148
|
+
WebkitBoxOrient: true,
|
|
142
149
|
}),
|
|
143
150
|
})
|
|
144
151
|
|
package/types/clamp.d.ts
CHANGED
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
export declare function composeEventHandlers<E extends Event | GestureResponderEvent | FocusEvent>(og?: EventHandler<E>, next?: EventHandler<E>, { checkDefaultPrevented }?: {
|
|
1
|
+
declare type Events = any;
|
|
2
|
+
export declare type EventHandler<E extends Events> = (event: E) => void;
|
|
3
|
+
export declare function composeEventHandlers<E extends Events>(og?: EventHandler<E>, next?: EventHandler<E>, { checkDefaultPrevented }?: {
|
|
5
4
|
checkDefaultPrevented?: boolean | undefined;
|
|
6
5
|
}): (event: E) => void;
|
|
6
|
+
export {};
|
|
7
7
|
//# sourceMappingURL=composeEventHandlers.d.ts.map
|
package/types/index.d.ts
CHANGED
|
@@ -3,6 +3,5 @@ export * from './composeEventHandlers';
|
|
|
3
3
|
export * from './concatClassName';
|
|
4
4
|
export * from './validStyleProps';
|
|
5
5
|
export * from './types';
|
|
6
|
-
export * from '
|
|
7
|
-
export * from './simpleHash';
|
|
6
|
+
export * from '@tamagui/simple-hash';
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
package/types/types.d.ts
CHANGED
|
File without changes
|
|
@@ -13,6 +13,9 @@ export declare const stylePropsTransform: Readonly<{
|
|
|
13
13
|
rotateX: true;
|
|
14
14
|
rotateZ: true;
|
|
15
15
|
}>;
|
|
16
|
+
export declare const validStylesOnBaseProps: Readonly<{
|
|
17
|
+
placeholderTextColor: true;
|
|
18
|
+
}>;
|
|
16
19
|
export declare const stylePropsView: Readonly<{
|
|
17
20
|
overflowX?: true | undefined;
|
|
18
21
|
overflowY?: true | undefined;
|
|
@@ -35,6 +38,7 @@ export declare const stylePropsView: Readonly<{
|
|
|
35
38
|
rotateY: true;
|
|
36
39
|
rotateX: true;
|
|
37
40
|
rotateZ: true;
|
|
41
|
+
placeholderTextColor: true;
|
|
38
42
|
backfaceVisibility: true;
|
|
39
43
|
backgroundColor: true;
|
|
40
44
|
borderBottomColor: true;
|
|
@@ -126,6 +130,8 @@ export declare const stylePropsTextOnly: Readonly<{
|
|
|
126
130
|
userSelect?: true | undefined;
|
|
127
131
|
selectable?: true | undefined;
|
|
128
132
|
cursor?: true | undefined;
|
|
133
|
+
WebkitLineClamp?: true | undefined;
|
|
134
|
+
WebkitBoxOrient?: true | undefined;
|
|
129
135
|
color: true;
|
|
130
136
|
fontFamily: true;
|
|
131
137
|
fontSize: true;
|
|
@@ -150,6 +156,8 @@ export declare const stylePropsText: Readonly<{
|
|
|
150
156
|
userSelect?: true | undefined;
|
|
151
157
|
selectable?: true | undefined;
|
|
152
158
|
cursor?: true | undefined;
|
|
159
|
+
WebkitLineClamp?: true | undefined;
|
|
160
|
+
WebkitBoxOrient?: true | undefined;
|
|
153
161
|
color: true;
|
|
154
162
|
fontFamily: true;
|
|
155
163
|
fontSize: true;
|
|
@@ -184,6 +192,7 @@ export declare const stylePropsText: Readonly<{
|
|
|
184
192
|
rotateY: true;
|
|
185
193
|
rotateX: true;
|
|
186
194
|
rotateZ: true;
|
|
195
|
+
placeholderTextColor: true;
|
|
187
196
|
backfaceVisibility: true;
|
|
188
197
|
backgroundColor: true;
|
|
189
198
|
borderBottomColor: true;
|
|
@@ -275,6 +284,8 @@ export declare const stylePropsAll: Readonly<{
|
|
|
275
284
|
userSelect?: true | undefined;
|
|
276
285
|
selectable?: true | undefined;
|
|
277
286
|
cursor?: true | undefined;
|
|
287
|
+
WebkitLineClamp?: true | undefined;
|
|
288
|
+
WebkitBoxOrient?: true | undefined;
|
|
278
289
|
color: true;
|
|
279
290
|
fontFamily: true;
|
|
280
291
|
fontSize: true;
|
|
@@ -309,6 +320,7 @@ export declare const stylePropsAll: Readonly<{
|
|
|
309
320
|
rotateY: true;
|
|
310
321
|
rotateX: true;
|
|
311
322
|
rotateZ: true;
|
|
323
|
+
placeholderTextColor: true;
|
|
312
324
|
backfaceVisibility: true;
|
|
313
325
|
backgroundColor: true;
|
|
314
326
|
borderBottomColor: true;
|
|
@@ -421,6 +433,7 @@ export declare const validStyles: Readonly<{
|
|
|
421
433
|
rotateY: true;
|
|
422
434
|
rotateX: true;
|
|
423
435
|
rotateZ: true;
|
|
436
|
+
placeholderTextColor: true;
|
|
424
437
|
backfaceVisibility: true;
|
|
425
438
|
backgroundColor: true;
|
|
426
439
|
borderBottomColor: true;
|
package/dist/cjs/simpleHash.js
DELETED
|
@@ -1,36 +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)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var simpleHash_exports = {};
|
|
19
|
-
__export(simpleHash_exports, {
|
|
20
|
-
simpleHash: () => simpleHash
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(simpleHash_exports);
|
|
23
|
-
const simpleHash = (str) => {
|
|
24
|
-
let hash = 0;
|
|
25
|
-
for (let i = 0; i < str.length; i++) {
|
|
26
|
-
const char = str.charCodeAt(i);
|
|
27
|
-
hash = (hash << 5) - hash + char;
|
|
28
|
-
hash &= hash;
|
|
29
|
-
}
|
|
30
|
-
return new Uint32Array([hash])[0].toString(36);
|
|
31
|
-
};
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
simpleHash
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=simpleHash.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/simpleHash.ts"],
|
|
4
|
-
"sourcesContent": ["export const simpleHash = (str: string) => {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash &= hash // Convert to 32bit integer\n }\n return new Uint32Array([hash])[0].toString(36)\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,aAAa,CAAC,QAAgB;AACzC,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UAAM,OAAO,IAAI,WAAW,CAAC;AAC7B,WAAQ,SAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA,EACV;AACA,SAAO,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE;AAC/C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/simpleHash.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const simpleHash = (str) => {
|
|
2
|
-
let hash = 0;
|
|
3
|
-
for (let i = 0; i < str.length; i++) {
|
|
4
|
-
const char = str.charCodeAt(i);
|
|
5
|
-
hash = (hash << 5) - hash + char;
|
|
6
|
-
hash &= hash;
|
|
7
|
-
}
|
|
8
|
-
return new Uint32Array([hash])[0].toString(36);
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
simpleHash
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=simpleHash.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/simpleHash.ts"],
|
|
4
|
-
"sourcesContent": ["export const simpleHash = (str: string) => {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash &= hash // Convert to 32bit integer\n }\n return new Uint32Array([hash])[0].toString(36)\n}\n"],
|
|
5
|
-
"mappings": "AAAO,MAAM,aAAa,CAAC,QAAgB;AACzC,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UAAM,OAAO,IAAI,WAAW,CAAC;AAC7B,WAAQ,SAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA,EACV;AACA,SAAO,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE;AAC/C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/jsx/simpleHash.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const simpleHash = (str) => {
|
|
2
|
-
let hash = 0;
|
|
3
|
-
for (let i = 0; i < str.length; i++) {
|
|
4
|
-
const char = str.charCodeAt(i);
|
|
5
|
-
hash = (hash << 5) - hash + char;
|
|
6
|
-
hash &= hash;
|
|
7
|
-
}
|
|
8
|
-
return new Uint32Array([hash])[0].toString(36);
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
simpleHash
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=simpleHash.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/simpleHash.ts"],
|
|
4
|
-
"sourcesContent": ["export const simpleHash = (str: string) => {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash &= hash // Convert to 32bit integer\n }\n return new Uint32Array([hash])[0].toString(36)\n}\n"],
|
|
5
|
-
"mappings": "AAAO,MAAM,aAAa,CAAC,QAAgB;AACzC,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UAAM,OAAO,IAAI,WAAW,CAAC;AAC7B,WAAQ,SAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA,EACV;AACA,SAAO,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE;AAC/C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/log.ts
DELETED
package/src/simpleHash.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const simpleHash = (str: string) => {
|
|
2
|
-
let hash = 0
|
|
3
|
-
for (let i = 0; i < str.length; i++) {
|
|
4
|
-
const char = str.charCodeAt(i)
|
|
5
|
-
hash = (hash << 5) - hash + char
|
|
6
|
-
hash &= hash // Convert to 32bit integer
|
|
7
|
-
}
|
|
8
|
-
return new Uint32Array([hash])[0].toString(36)
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composeEventHandlers.d.ts","sourceRoot":"","sources":["../src/composeEventHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,oBAAY,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,qBAAqB,GAAG,UAAU,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;AAEnG,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,KAAK,GAAG,qBAAqB,GAAG,UAAU,EACvF,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EACpB,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,EAAE,qBAA4B,EAAE;;CAAK,WAEO,CAAC,UAM9C"}
|
package/types/log.d.ts
DELETED
package/types/simpleHash.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simpleHash.d.ts","sourceRoot":"","sources":["../src/simpleHash.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,WAQrC,CAAA"}
|