@symbo.ls/scratch 3.14.0 → 3.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/utils/sprite.js +29 -12
- package/dist/cjs/defaultConfig/animation.js +0 -24
- package/dist/cjs/defaultConfig/cases.js +0 -24
- package/dist/cjs/defaultConfig/class.js +0 -24
- package/dist/cjs/defaultConfig/color.js +0 -31
- package/dist/cjs/defaultConfig/document.js +0 -24
- package/dist/cjs/defaultConfig/font-family.js +0 -38
- package/dist/cjs/defaultConfig/font.js +0 -33
- package/dist/cjs/defaultConfig/grid.js +0 -25
- package/dist/cjs/defaultConfig/icons.js +0 -26
- package/dist/cjs/defaultConfig/index.js +0 -46
- package/dist/cjs/defaultConfig/media.js +0 -29
- package/dist/cjs/defaultConfig/responsive.js +0 -50
- package/dist/cjs/defaultConfig/sequence.js +0 -49
- package/dist/cjs/defaultConfig/shadow.js +0 -24
- package/dist/cjs/defaultConfig/spacing.js +0 -38
- package/dist/cjs/defaultConfig/svg.js +0 -26
- package/dist/cjs/defaultConfig/templates.js +0 -24
- package/dist/cjs/defaultConfig/theme.js +0 -36
- package/dist/cjs/defaultConfig/timing.js +0 -37
- package/dist/cjs/defaultConfig/typography.js +0 -41
- package/dist/cjs/defaultConfig/unit.js +0 -26
- package/dist/cjs/factory.js +0 -145
- package/dist/cjs/index.js +0 -45
- package/dist/cjs/set.js +0 -286
- package/dist/cjs/system/color.js +0 -268
- package/dist/cjs/system/document.js +0 -36
- package/dist/cjs/system/font.js +0 -71
- package/dist/cjs/system/index.js +0 -27
- package/dist/cjs/system/reset.js +0 -114
- package/dist/cjs/system/shadow.js +0 -108
- package/dist/cjs/system/spacing.js +0 -134
- package/dist/cjs/system/svg.js +0 -133
- package/dist/cjs/system/theme.js +0 -496
- package/dist/cjs/system/timing.js +0 -48
- package/dist/cjs/system/typography.js +0 -108
- package/dist/cjs/tests/index.js +0 -28
- package/dist/cjs/transforms/index.js +0 -219
- package/dist/cjs/utils/color.js +0 -206
- package/dist/cjs/utils/font.js +0 -114
- package/dist/cjs/utils/index.js +0 -24
- package/dist/cjs/utils/sequence.js +0 -342
- package/dist/cjs/utils/sprite.js +0 -92
- package/dist/cjs/utils/theme.js +0 -29
- package/dist/cjs/utils/unit.js +0 -79
- package/dist/cjs/utils/var.js +0 -116
- package/dist/esm/defaultConfig/animation.js +0 -4
- package/dist/esm/defaultConfig/cases.js +0 -4
- package/dist/esm/defaultConfig/class.js +0 -4
- package/dist/esm/defaultConfig/color.js +0 -11
- package/dist/esm/defaultConfig/document.js +0 -4
- package/dist/esm/defaultConfig/font-family.js +0 -18
- package/dist/esm/defaultConfig/font.js +0 -13
- package/dist/esm/defaultConfig/grid.js +0 -5
- package/dist/esm/defaultConfig/icons.js +0 -6
- package/dist/esm/defaultConfig/index.js +0 -25
- package/dist/esm/defaultConfig/media.js +0 -9
- package/dist/esm/defaultConfig/responsive.js +0 -30
- package/dist/esm/defaultConfig/sequence.js +0 -29
- package/dist/esm/defaultConfig/shadow.js +0 -4
- package/dist/esm/defaultConfig/spacing.js +0 -18
- package/dist/esm/defaultConfig/svg.js +0 -6
- package/dist/esm/defaultConfig/templates.js +0 -4
- package/dist/esm/defaultConfig/theme.js +0 -16
- package/dist/esm/defaultConfig/timing.js +0 -17
- package/dist/esm/defaultConfig/typography.js +0 -21
- package/dist/esm/defaultConfig/unit.js +0 -6
- package/dist/esm/factory.js +0 -120
- package/dist/esm/index.js +0 -14
- package/dist/esm/set.js +0 -280
- package/dist/esm/system/color.js +0 -253
- package/dist/esm/system/document.js +0 -16
- package/dist/esm/system/font.js +0 -58
- package/dist/esm/system/index.js +0 -10
- package/dist/esm/system/reset.js +0 -94
- package/dist/esm/system/shadow.js +0 -92
- package/dist/esm/system/spacing.js +0 -121
- package/dist/esm/system/svg.js +0 -113
- package/dist/esm/system/theme.js +0 -481
- package/dist/esm/system/timing.js +0 -32
- package/dist/esm/system/typography.js +0 -94
- package/dist/esm/tests/index.js +0 -8
- package/dist/esm/transforms/index.js +0 -216
- package/dist/esm/utils/color.js +0 -192
- package/dist/esm/utils/font.js +0 -94
- package/dist/esm/utils/index.js +0 -7
- package/dist/esm/utils/sequence.js +0 -322
- package/dist/esm/utils/sprite.js +0 -72
- package/dist/esm/utils/theme.js +0 -9
- package/dist/esm/utils/unit.js +0 -59
- package/dist/esm/utils/var.js +0 -96
- package/dist/iife/index.js +0 -3630
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scratch framework
|
|
2
2
|
|
|
3
|
-
Design system factory for Symbols. Receives a configuration and outputs resolved design tokens (colors, themes, fonts, spacing, media queries). In
|
|
3
|
+
Design system factory for Symbols. Receives a configuration and outputs resolved design tokens (colors, themes, fonts, spacing, media queries). In v3.14, Scratch feeds into the atomic CSS engine (`@symbo.ls/css`) for class generation.
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/js/%40rackai%2Fscratch)
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@symbo.ls/scratch",
|
|
3
3
|
"description": "Φ / CSS framework and methodology.",
|
|
4
4
|
"author": "symbo.ls",
|
|
5
|
-
"version": "3.14.
|
|
5
|
+
"version": "3.14.2",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
8
|
"*.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublish": "npm run build && npm run copy:package:cjs"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@symbo.ls/utils": "^3.14.
|
|
34
|
+
"@symbo.ls/utils": "^3.14.2",
|
|
35
35
|
"color-contrast-checker": "^1.5.0"
|
|
36
36
|
},
|
|
37
37
|
"gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
|
package/src/utils/sprite.js
CHANGED
|
@@ -20,10 +20,10 @@ export const generateSprite = (icons) => {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const parseRootAttributes = (htmlString) => {
|
|
23
|
-
const val = htmlString.default || htmlString
|
|
23
|
+
const val = htmlString && (htmlString.default || htmlString)
|
|
24
24
|
if (!isString(val)) {
|
|
25
25
|
if (isDev) console.warn('parseRootAttributes:', val, 'is not a string')
|
|
26
|
-
return
|
|
26
|
+
return {} // empty attrs — caller destructures `width`/`height`, must not crash
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const match = val.match(/<svg\s+(.*?)>/)
|
|
@@ -35,6 +35,7 @@ const parseRootAttributes = (htmlString) => {
|
|
|
35
35
|
const attrs = attrString.match(
|
|
36
36
|
/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm
|
|
37
37
|
)
|
|
38
|
+
if (!attrs) return {} // attr regex sometimes returns null on minimal SVG; same safety
|
|
38
39
|
return attrs.reduce((acc, attr) => {
|
|
39
40
|
const [key, value] = attr.split('=')
|
|
40
41
|
acc[key] = value.replace(/['"]/g, '')
|
|
@@ -42,18 +43,34 @@ const parseRootAttributes = (htmlString) => {
|
|
|
42
43
|
}, {})
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
// Rewrite every internal id="…" + url(#…) reference inside an SVG body
|
|
47
|
+
// with a deterministic suffix derived from the symbol key + the original
|
|
48
|
+
// id. Same input SVG + same key → same output, every render.
|
|
49
|
+
//
|
|
50
|
+
// Previous behavior had three bugs that compounded:
|
|
51
|
+
// 1. `idRegex` had no `g` flag, so `.replace(idRegex, …)` only swapped
|
|
52
|
+
// the FIRST `id="…"` match. SVGs with multiple ids (filters,
|
|
53
|
+
// gradients, masks, clipPaths) lost references.
|
|
54
|
+
// 2. `Math.random()` was the per-iteration suffix, so the same SVG got
|
|
55
|
+
// different ids on every call → SSR-rendered DOM never matched the
|
|
56
|
+
// hydrate pass and one symbol's filter could fail to match its url().
|
|
57
|
+
// 3. Each iteration reset `replacedCode = code` (instead of chaining),
|
|
58
|
+
// so even though the loop ran N times it only ever produced one
|
|
59
|
+
// single-id swap.
|
|
45
60
|
const replaceIdsAndUrls = (code, key) => {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
const ids = []
|
|
62
|
+
code.replace(/id="([^"]*)"/g, (_, id) => { ids.push(id); return _ })
|
|
63
|
+
if (!ids.length) return code
|
|
64
|
+
|
|
49
65
|
let replacedCode = code
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
for (const origId of ids) {
|
|
67
|
+
const escaped = origId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
68
|
+
const newId = `${key}-${origId}`
|
|
69
|
+
replacedCode = replacedCode
|
|
70
|
+
.replace(new RegExp(`id="${escaped}"`, 'g'), `id="${newId}"`)
|
|
71
|
+
.replace(new RegExp(`url\\(#${escaped}\\)`, 'g'), `url(#${newId})`)
|
|
72
|
+
.replace(new RegExp(`xlink:href="#${escaped}"`, 'g'), `xlink:href="#${newId}"`)
|
|
73
|
+
.replace(new RegExp(`href="#${escaped}"`, 'g'), `href="#${newId}"`)
|
|
57
74
|
}
|
|
58
75
|
return replacedCode
|
|
59
76
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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 animation_exports = {};
|
|
20
|
-
__export(animation_exports, {
|
|
21
|
-
animation: () => animation
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(animation_exports);
|
|
24
|
-
const animation = {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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 cases_exports = {};
|
|
20
|
-
__export(cases_exports, {
|
|
21
|
-
cases: () => cases
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(cases_exports);
|
|
24
|
-
const cases = {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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 class_exports = {};
|
|
20
|
-
__export(class_exports, {
|
|
21
|
-
class: () => defaultProps
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(class_exports);
|
|
24
|
-
const defaultProps = {};
|
|
@@ -1,31 +0,0 @@
|
|
|
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 color_exports = {};
|
|
20
|
-
__export(color_exports, {
|
|
21
|
-
color: () => color,
|
|
22
|
-
gradient: () => gradient
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(color_exports);
|
|
25
|
-
var proto = {
|
|
26
|
-
// eslint-disable-line
|
|
27
|
-
name: "",
|
|
28
|
-
value: ""
|
|
29
|
-
};
|
|
30
|
-
const color = {};
|
|
31
|
-
const gradient = {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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 document_exports = {};
|
|
20
|
-
__export(document_exports, {
|
|
21
|
-
document: () => document
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(document_exports);
|
|
24
|
-
const document = {};
|
|
@@ -1,38 +0,0 @@
|
|
|
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 font_family_exports = {};
|
|
20
|
-
__export(font_family_exports, {
|
|
21
|
-
fontFace: () => fontFace,
|
|
22
|
-
fontFamily: () => fontFamily,
|
|
23
|
-
fontFamilyTypes: () => fontFamilyTypes
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(font_family_exports);
|
|
26
|
-
var defaultFont = {
|
|
27
|
-
// eslint-disable-line
|
|
28
|
-
name: "",
|
|
29
|
-
family: "",
|
|
30
|
-
type: ""
|
|
31
|
-
};
|
|
32
|
-
const fontFamily = {};
|
|
33
|
-
const fontFamilyTypes = {
|
|
34
|
-
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
35
|
-
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
36
|
-
monospace: "Courier New, monospace, --system-default"
|
|
37
|
-
};
|
|
38
|
-
const fontFace = {};
|
|
@@ -1,33 +0,0 @@
|
|
|
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 font_exports = {};
|
|
20
|
-
__export(font_exports, {
|
|
21
|
-
font: () => font
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(font_exports);
|
|
24
|
-
var defFont = {
|
|
25
|
-
// eslint-disable-line
|
|
26
|
-
name: "",
|
|
27
|
-
url: "",
|
|
28
|
-
fontStyle: "",
|
|
29
|
-
fontWeight: 500,
|
|
30
|
-
fontStretch: "normal",
|
|
31
|
-
fontOpticalSizing: "auto"
|
|
32
|
-
};
|
|
33
|
-
const font = {};
|
|
@@ -1,25 +0,0 @@
|
|
|
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 grid_exports = {};
|
|
20
|
-
__export(grid_exports, {
|
|
21
|
-
grid: () => grid
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(grid_exports);
|
|
24
|
-
const defaultProps = {};
|
|
25
|
-
const grid = defaultProps;
|
|
@@ -1,26 +0,0 @@
|
|
|
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 icons_exports = {};
|
|
20
|
-
__export(icons_exports, {
|
|
21
|
-
icons: () => icons,
|
|
22
|
-
semanticIcons: () => semanticIcons
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(icons_exports);
|
|
25
|
-
const icons = {};
|
|
26
|
-
const semanticIcons = {};
|
|
@@ -1,46 +0,0 @@
|
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var defaultConfig_exports = {};
|
|
21
|
-
__export(defaultConfig_exports, {
|
|
22
|
-
reset: () => reset,
|
|
23
|
-
vars: () => vars
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(defaultConfig_exports);
|
|
26
|
-
__reExport(defaultConfig_exports, require("./sequence.js"), module.exports);
|
|
27
|
-
__reExport(defaultConfig_exports, require("./unit.js"), module.exports);
|
|
28
|
-
__reExport(defaultConfig_exports, require("./typography.js"), module.exports);
|
|
29
|
-
__reExport(defaultConfig_exports, require("./font.js"), module.exports);
|
|
30
|
-
__reExport(defaultConfig_exports, require("./font-family.js"), module.exports);
|
|
31
|
-
__reExport(defaultConfig_exports, require("./media.js"), module.exports);
|
|
32
|
-
__reExport(defaultConfig_exports, require("./spacing.js"), module.exports);
|
|
33
|
-
__reExport(defaultConfig_exports, require("./color.js"), module.exports);
|
|
34
|
-
__reExport(defaultConfig_exports, require("./theme.js"), module.exports);
|
|
35
|
-
__reExport(defaultConfig_exports, require("./shadow.js"), module.exports);
|
|
36
|
-
__reExport(defaultConfig_exports, require("./icons.js"), module.exports);
|
|
37
|
-
__reExport(defaultConfig_exports, require("./timing.js"), module.exports);
|
|
38
|
-
__reExport(defaultConfig_exports, require("./document.js"), module.exports);
|
|
39
|
-
__reExport(defaultConfig_exports, require("./responsive.js"), module.exports);
|
|
40
|
-
__reExport(defaultConfig_exports, require("./animation.js"), module.exports);
|
|
41
|
-
__reExport(defaultConfig_exports, require("./svg.js"), module.exports);
|
|
42
|
-
__reExport(defaultConfig_exports, require("./templates.js"), module.exports);
|
|
43
|
-
__reExport(defaultConfig_exports, require("./grid.js"), module.exports);
|
|
44
|
-
__reExport(defaultConfig_exports, require("./class.js"), module.exports);
|
|
45
|
-
const reset = {};
|
|
46
|
-
const vars = {};
|
|
@@ -1,29 +0,0 @@
|
|
|
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 media_exports = {};
|
|
20
|
-
__export(media_exports, {
|
|
21
|
-
media: () => media
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(media_exports);
|
|
24
|
-
const media = {
|
|
25
|
-
tv: "(min-width: 2780px)",
|
|
26
|
-
light: "(prefers-color-scheme: light)",
|
|
27
|
-
dark: "(prefers-color-scheme: dark)",
|
|
28
|
-
print: "print"
|
|
29
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
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 responsive_exports = {};
|
|
20
|
-
__export(responsive_exports, {
|
|
21
|
-
breakpoints: () => breakpoints,
|
|
22
|
-
devices: () => devices
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(responsive_exports);
|
|
25
|
-
const breakpoints = {
|
|
26
|
-
screenL: 1920,
|
|
27
|
-
screenM: 1680,
|
|
28
|
-
screenS: 1440,
|
|
29
|
-
tabletL: 1366,
|
|
30
|
-
tabletM: 1280,
|
|
31
|
-
tabletS: 1024,
|
|
32
|
-
mobileL: 768,
|
|
33
|
-
mobileM: 560,
|
|
34
|
-
mobileS: 480,
|
|
35
|
-
mobileXS: 375
|
|
36
|
-
};
|
|
37
|
-
const devices = {
|
|
38
|
-
screenXXL: [2560, 1440],
|
|
39
|
-
screenXL: [2240, 1260],
|
|
40
|
-
screenL: [1920, 1024],
|
|
41
|
-
screenM: [1680, 1024],
|
|
42
|
-
screenS: [1440, 720],
|
|
43
|
-
tabletL: [1366, 926],
|
|
44
|
-
tabletM: [1280, 768],
|
|
45
|
-
tabletS: [1024, 768],
|
|
46
|
-
mobileL: [768, 375],
|
|
47
|
-
mobileM: [560, 768],
|
|
48
|
-
mobileS: [480, 768],
|
|
49
|
-
mobileXS: [375, 768]
|
|
50
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
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 sequence_exports = {};
|
|
20
|
-
__export(sequence_exports, {
|
|
21
|
-
sequence: () => sequence
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(sequence_exports);
|
|
24
|
-
const sequence = {
|
|
25
|
-
"minor-second": 1.067,
|
|
26
|
-
"major-second": 1.125,
|
|
27
|
-
"minor-third": 1.2,
|
|
28
|
-
"major-third": 1.25,
|
|
29
|
-
"perfect-fourth": 1.333,
|
|
30
|
-
"augmented-fourth": 1.414,
|
|
31
|
-
"perfect-fifth": 1.5,
|
|
32
|
-
"minor-sixth": 1.6,
|
|
33
|
-
phi: 1.618,
|
|
34
|
-
// golden-ratio
|
|
35
|
-
"major-sixth": 1.667,
|
|
36
|
-
"square-root-3": 1.732,
|
|
37
|
-
// theodorus
|
|
38
|
-
"minor-seventh": 1.778,
|
|
39
|
-
"major-seventh": 1.875,
|
|
40
|
-
octave: 2,
|
|
41
|
-
"square-root-5": 2.23,
|
|
42
|
-
// pythagoras
|
|
43
|
-
"major-tenth": 2.5,
|
|
44
|
-
"major-eleventh": 2.667,
|
|
45
|
-
"major-twelfth": 3,
|
|
46
|
-
pi: 3.14,
|
|
47
|
-
// archimedes
|
|
48
|
-
"double-octave": 4
|
|
49
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
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 shadow_exports = {};
|
|
20
|
-
__export(shadow_exports, {
|
|
21
|
-
shadow: () => shadow
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(shadow_exports);
|
|
24
|
-
const shadow = {};
|
|
@@ -1,38 +0,0 @@
|
|
|
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 spacing_exports = {};
|
|
20
|
-
__export(spacing_exports, {
|
|
21
|
-
spacing: () => spacing
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(spacing_exports);
|
|
24
|
-
var import_sequence = require("./sequence.js");
|
|
25
|
-
var import_typography = require("./typography.js");
|
|
26
|
-
const defaultProps = {
|
|
27
|
-
base: import_typography.typography.base,
|
|
28
|
-
type: "spacing",
|
|
29
|
-
ratio: import_sequence.sequence.phi,
|
|
30
|
-
range: [-5, 15],
|
|
31
|
-
subSequence: true,
|
|
32
|
-
mediaRegenerate: false,
|
|
33
|
-
unit: "em",
|
|
34
|
-
sequence: {},
|
|
35
|
-
scales: {},
|
|
36
|
-
vars: {}
|
|
37
|
-
};
|
|
38
|
-
const spacing = defaultProps;
|
|
@@ -1,26 +0,0 @@
|
|
|
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 svg_exports = {};
|
|
20
|
-
__export(svg_exports, {
|
|
21
|
-
svg: () => svg,
|
|
22
|
-
svgData: () => svgData
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(svg_exports);
|
|
25
|
-
const svg = {};
|
|
26
|
-
const svgData = {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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 templates_exports = {};
|
|
20
|
-
__export(templates_exports, {
|
|
21
|
-
templates: () => templates
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(templates_exports);
|
|
24
|
-
const templates = {};
|