@procore/hammer-test-jest 0.0.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.
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ // ../../node_modules/tsup/assets/cjs_shims.js
32
+ var init_cjs_shims = __esm({
33
+ "../../node_modules/tsup/assets/cjs_shims.js"() {
34
+ "use strict";
35
+ }
36
+ });
37
+
38
+ // ../../node_modules/camelcase/index.js
39
+ var require_camelcase = __commonJS({
40
+ "../../node_modules/camelcase/index.js"(exports2, module2) {
41
+ "use strict";
42
+ init_cjs_shims();
43
+ var preserveCamelCase = (string) => {
44
+ let isLastCharLower = false;
45
+ let isLastCharUpper = false;
46
+ let isLastLastCharUpper = false;
47
+ for (let i = 0; i < string.length; i++) {
48
+ const character = string[i];
49
+ if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
50
+ string = string.slice(0, i) + "-" + string.slice(i);
51
+ isLastCharLower = false;
52
+ isLastLastCharUpper = isLastCharUpper;
53
+ isLastCharUpper = true;
54
+ i++;
55
+ } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
56
+ string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
57
+ isLastLastCharUpper = isLastCharUpper;
58
+ isLastCharUpper = false;
59
+ isLastCharLower = true;
60
+ } else {
61
+ isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;
62
+ isLastLastCharUpper = isLastCharUpper;
63
+ isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;
64
+ }
65
+ }
66
+ return string;
67
+ };
68
+ var camelCase = (input, options) => {
69
+ if (!(typeof input === "string" || Array.isArray(input))) {
70
+ throw new TypeError("Expected the input to be `string | string[]`");
71
+ }
72
+ options = Object.assign({
73
+ pascalCase: false
74
+ }, options);
75
+ const postProcess = (x) => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;
76
+ if (Array.isArray(input)) {
77
+ input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
78
+ } else {
79
+ input = input.trim();
80
+ }
81
+ if (input.length === 0) {
82
+ return "";
83
+ }
84
+ if (input.length === 1) {
85
+ return options.pascalCase ? input.toUpperCase() : input.toLowerCase();
86
+ }
87
+ const hasUpperCase = input !== input.toLowerCase();
88
+ if (hasUpperCase) {
89
+ input = preserveCamelCase(input);
90
+ }
91
+ input = input.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase());
92
+ return postProcess(input);
93
+ };
94
+ module2.exports = camelCase;
95
+ module2.exports.default = camelCase;
96
+ }
97
+ });
98
+
99
+ // src/transforms/reactSvg.ts
100
+ init_cjs_shims();
101
+ var import_path = __toESM(require("path"));
102
+ var import_camelcase = __toESM(require_camelcase());
103
+ module.exports = {
104
+ process(_src, filename) {
105
+ const assetFilename = JSON.stringify(import_path.default.basename(filename));
106
+ const pascalCaseFileName = (0, import_camelcase.default)(import_path.default.parse(filename).name, {
107
+ pascalCase: true
108
+ });
109
+ const componentName = `Svg${pascalCaseFileName}`;
110
+ return `
111
+ const React = require('react');
112
+ module.exports = {
113
+ __esModule: true,
114
+ default: ${assetFilename},
115
+ ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
116
+ return {
117
+ $$typeof: Symbol.for('react.element'),
118
+ type: 'svg',
119
+ ref: ref,
120
+ key: null,
121
+ props: Object.assign({}, props, {
122
+ children: ${assetFilename}
123
+ })
124
+ };
125
+ }),
126
+ };
127
+ `;
128
+ }
129
+ };
@@ -0,0 +1,133 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __esm = (fn, res) => function __init() {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ };
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+
30
+ // ../../node_modules/tsup/assets/esm_shims.js
31
+ var init_esm_shims = __esm({
32
+ "../../node_modules/tsup/assets/esm_shims.js"() {
33
+ "use strict";
34
+ }
35
+ });
36
+
37
+ // ../../node_modules/camelcase/index.js
38
+ var require_camelcase = __commonJS({
39
+ "../../node_modules/camelcase/index.js"(exports, module) {
40
+ "use strict";
41
+ init_esm_shims();
42
+ var preserveCamelCase = (string) => {
43
+ let isLastCharLower = false;
44
+ let isLastCharUpper = false;
45
+ let isLastLastCharUpper = false;
46
+ for (let i = 0; i < string.length; i++) {
47
+ const character = string[i];
48
+ if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
49
+ string = string.slice(0, i) + "-" + string.slice(i);
50
+ isLastCharLower = false;
51
+ isLastLastCharUpper = isLastCharUpper;
52
+ isLastCharUpper = true;
53
+ i++;
54
+ } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
55
+ string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
56
+ isLastLastCharUpper = isLastCharUpper;
57
+ isLastCharUpper = false;
58
+ isLastCharLower = true;
59
+ } else {
60
+ isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;
61
+ isLastLastCharUpper = isLastCharUpper;
62
+ isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;
63
+ }
64
+ }
65
+ return string;
66
+ };
67
+ var camelCase = (input, options) => {
68
+ if (!(typeof input === "string" || Array.isArray(input))) {
69
+ throw new TypeError("Expected the input to be `string | string[]`");
70
+ }
71
+ options = Object.assign({
72
+ pascalCase: false
73
+ }, options);
74
+ const postProcess = (x) => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;
75
+ if (Array.isArray(input)) {
76
+ input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
77
+ } else {
78
+ input = input.trim();
79
+ }
80
+ if (input.length === 0) {
81
+ return "";
82
+ }
83
+ if (input.length === 1) {
84
+ return options.pascalCase ? input.toUpperCase() : input.toLowerCase();
85
+ }
86
+ const hasUpperCase = input !== input.toLowerCase();
87
+ if (hasUpperCase) {
88
+ input = preserveCamelCase(input);
89
+ }
90
+ input = input.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase());
91
+ return postProcess(input);
92
+ };
93
+ module.exports = camelCase;
94
+ module.exports.default = camelCase;
95
+ }
96
+ });
97
+
98
+ // src/transforms/reactSvg.ts
99
+ import path from "path";
100
+ var require_reactSvg = __commonJS({
101
+ "src/transforms/reactSvg.ts"(exports, module) {
102
+ init_esm_shims();
103
+ var import_camelcase = __toESM(require_camelcase());
104
+ module.exports = {
105
+ process(_src, filename) {
106
+ const assetFilename = JSON.stringify(path.basename(filename));
107
+ const pascalCaseFileName = (0, import_camelcase.default)(path.parse(filename).name, {
108
+ pascalCase: true
109
+ });
110
+ const componentName = `Svg${pascalCaseFileName}`;
111
+ return `
112
+ const React = require('react');
113
+ module.exports = {
114
+ __esModule: true,
115
+ default: ${assetFilename},
116
+ ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
117
+ return {
118
+ $$typeof: Symbol.for('react.element'),
119
+ type: 'svg',
120
+ ref: ref,
121
+ key: null,
122
+ props: Object.assign({}, props, {
123
+ children: ${assetFilename}
124
+ })
125
+ };
126
+ }),
127
+ };
128
+ `;
129
+ }
130
+ };
131
+ }
132
+ });
133
+ export default require_reactSvg();
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }