@homebound/truss 1.128.1 → 1.130.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/build/config.d.ts +3 -3
- package/build/generate.js +10 -4
- package/build/generate.js.map +1 -1
- package/build/sections/tachyons/container.d.ts +2 -0
- package/build/sections/tachyons/container.js +36 -0
- package/build/sections/tachyons/container.js.map +1 -0
- package/build/sections/tachyons/index.d.ts +1 -0
- package/build/sections/tachyons/index.js +2 -0
- package/build/sections/tachyons/index.js.map +1 -1
- package/build/sections/tachyons-rn/index.d.ts +3 -0
- package/build/sections/tachyons-rn/index.js +8 -0
- package/build/sections/tachyons-rn/index.js.map +1 -0
- package/build/sections/tachyons-rn/spacing.d.ts +2 -0
- package/build/sections/tachyons-rn/spacing.js +60 -0
- package/build/sections/tachyons-rn/spacing.js.map +1 -0
- package/package.json +2 -2
package/build/config.d.ts
CHANGED
|
@@ -47,10 +47,10 @@ export interface Config {
|
|
|
47
47
|
/**
|
|
48
48
|
* Which default methods to include.
|
|
49
49
|
*
|
|
50
|
-
* Currently, we support either `tachyons` or `none`.
|
|
51
|
-
*
|
|
50
|
+
* Currently, we support either `tachyons`, `tachyons-rn`, or `none`.
|
|
51
|
+
* Could eventually support `tailwinds` / `tailwinds-rn` as additional options.
|
|
52
52
|
*/
|
|
53
|
-
defaultMethods?: "tachyons" | "none";
|
|
53
|
+
defaultMethods?: "tachyons" | "none" | "tachyons-rn";
|
|
54
54
|
/**
|
|
55
55
|
* A map of "section" to list of rules to create application-specific
|
|
56
56
|
* utility methods.
|
package/build/generate.js
CHANGED
|
@@ -84,6 +84,7 @@ var methods_1 = require("./methods");
|
|
|
84
84
|
var tachyons_1 = require("./sections/tachyons");
|
|
85
85
|
var utils_1 = require("./utils");
|
|
86
86
|
var change_case_1 = require("change-case");
|
|
87
|
+
var tachyons_rn_1 = require("./sections/tachyons-rn");
|
|
87
88
|
exports.defaultTypeAliases = {
|
|
88
89
|
Margin: ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"],
|
|
89
90
|
Padding: ["padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
|
|
@@ -108,7 +109,11 @@ exports.generate = generate;
|
|
|
108
109
|
function generateCssBuilder(config) {
|
|
109
110
|
var aliases = config.aliases, fonts = config.fonts, increment = config.increment, extras = config.extras, typeAliases = config.typeAliases, _a = config.breakpoints, breakpoints = _a === void 0 ? {} : _a, palette = config.palette, _b = config.defaultMethods, defaultMethods = _b === void 0 ? "tachyons" : _b, customSections = config.sections;
|
|
110
111
|
// Combine our out-of-the-box utility methods with any custom ones
|
|
111
|
-
var sections = __assign(__assign(__assign({}, (defaultMethods === "tachyons"
|
|
112
|
+
var sections = __assign(__assign(__assign({}, (defaultMethods === "tachyons"
|
|
113
|
+
? generateMethods(config, tachyons_1.defaultSections)
|
|
114
|
+
: defaultMethods === "tachyons-rn"
|
|
115
|
+
? generateMethods(config, tachyons_rn_1.reactNativeSections)
|
|
116
|
+
: {})), (customSections ? generateMethods(config, customSections) : {})), (aliases && { aliases: (0, methods_1.newAliasesMethods)(aliases) }));
|
|
112
117
|
var Properties = (0, ts_poet_1.imp)("Properties@csstype");
|
|
113
118
|
var lines = Object.entries(sections)
|
|
114
119
|
.map(function (_a) {
|
|
@@ -133,10 +138,11 @@ function generateCssBuilder(config) {
|
|
|
133
138
|
var _b = __read(_a, 2), name = _b[0], value = _b[1];
|
|
134
139
|
return (0, ts_poet_1.code)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n get if", "() {\n return this.newCss({ selector: ", " });\n }"], ["\n get if", "() {\n return this.newCss({ selector: ", " });\n }"])), (0, change_case_1.pascalCase)(name), (0, utils_1.quote)(value));
|
|
135
140
|
});
|
|
136
|
-
return (0, ts_poet_1.code)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's `truss-config.ts` to make configuration changes (fonts, increments, etc).\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ", " = ", "<string | 0, string>;\n\n", "\n\ntype Opts<T> = {\n rules: T,\n enabled: boolean,\n important: boolean,\n selector: string | undefined\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n private get rules(): T { return this.opts.rules };\n private get enabled(): boolean { return this.opts.enabled };\n private get selector(): string | undefined { return this.opts.selector };\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n\n ", "\n get $(): T { return maybeImportant(sortObject(this.rules), this.opts.important); }\n\n if(bp: Breakpoint): CssBuilder<T>;\n if(cond: boolean): CssBuilder<T>;\n if(attr: string, value: boolean | string): CssBuilder<T>;\n if(arg: boolean | Breakpoint | string, value?: boolean | string): CssBuilder<T> {\n if (value !== undefined) {\n return this.newCss({ selector: `[${arg}='${value}']` });\n } else if (typeof arg === \"boolean\") {\n return this.newCss({ enabled: arg });\n } else {\n return this.newCss({ selector: Breakpoints[arg as Breakpoint] });\n }\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n \n ", "\n\n get else() {\n if (this.selector !== undefined) {\n if (this.selector.includes(\"not\")) {\n throw new Error(\"else was already called\");\n } else {\n return this.newCss({ selector: this.selector.replace(\"@media\", \"@media not\") });\n }\n }\n return this.newCss({ enabled: !this.enabled });\n }\n\n get important() { return this.newCss({ important: true }); }\n\n /** Adds new properties, either a specific key/value or a Properties object, to the current css. */\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Adds new properties, either a specific key/value or a Properties object, to a nested selector. */\n addIn<P extends Properties>(selector: string, props: P | undefined): CssBuilder<T & P>;\n addIn<K extends keyof Properties>(selector: string, prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n addIn<K extends keyof Properties>(selector: string, propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n if (!this.enabled) return this;\n if (newRules === undefined) {\n return this;\n }\n const rules = { ...this.rules, [selector]: { ...(this.rules as any)[selector], ...newRules } };\n return this.newCss({ rules: rules as any });\n }\n}\n\n/** Emotion treats the same rules, ordered differently as different classes, but naively they can be the same. */\nfunction sortObject<T extends object>(obj: T): T {\n return Object.keys(obj)\n .sort()\n .reduce((acc, key) => {\n acc[key as keyof T] = obj[key as keyof T];\n return acc;\n }, ({} as any) as T) as T;\n}\n\n/** Conditionally adds `important!` to everything. */\nfunction maybeImportant<T extends object>(obj: T, important: boolean): T {\n if (important) {\n Object.keys(obj).forEach(key => {\n (obj as any)[key] = `${(obj as any)[key]} !important`;\n });\n }\n return obj;\n}\n\n/** Converts `inc` into pixels value with a `px` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : `${increment(inc)}px`;\n}\n\n/** Converts `inc` into pixels. */\nexport function increment(inc: number): number {\n return inc * ", ";\n}\n\n/** Convert `pixels` to a `px` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return `${pixels}px`;\n}\n\nexport enum Palette {\n ", "\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, important: false, selector: undefined });\n\n", "\n\n", "\n\n", "\n "], ["\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's \\`truss-config.ts\\` to make configuration changes (fonts, increments, etc).\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ", " = ", "<string | 0, string>;\n\n", "\n\ntype Opts<T> = {\n rules: T,\n enabled: boolean,\n important: boolean,\n selector: string | undefined\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n private get rules(): T { return this.opts.rules };\n private get enabled(): boolean { return this.opts.enabled };\n private get selector(): string | undefined { return this.opts.selector };\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n\n ", "\n get $(): T { return maybeImportant(sortObject(this.rules), this.opts.important); }\n\n if(bp: Breakpoint): CssBuilder<T>;\n if(cond: boolean): CssBuilder<T>;\n if(attr: string, value: boolean | string): CssBuilder<T>;\n if(arg: boolean | Breakpoint | string, value?: boolean | string): CssBuilder<T> {\n if (value !== undefined) {\n return this.newCss({ selector: \\`[\\${arg}='\\${value}']\\` });\n } else if (typeof arg === \"boolean\") {\n return this.newCss({ enabled: arg });\n } else {\n return this.newCss({ selector: Breakpoints[arg as Breakpoint] });\n }\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n \n ", "\n\n get else() {\n if (this.selector !== undefined) {\n if (this.selector.includes(\"not\")) {\n throw new Error(\"else was already called\");\n } else {\n return this.newCss({ selector: this.selector.replace(\"@media\", \"@media not\") });\n }\n }\n return this.newCss({ enabled: !this.enabled });\n }\n\n get important() { return this.newCss({ important: true }); }\n\n /** Adds new properties, either a specific key/value or a Properties object, to the current css. */\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Adds new properties, either a specific key/value or a Properties object, to a nested selector. */\n addIn<P extends Properties>(selector: string, props: P | undefined): CssBuilder<T & P>;\n addIn<K extends keyof Properties>(selector: string, prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n addIn<K extends keyof Properties>(selector: string, propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n if (!this.enabled) return this;\n if (newRules === undefined) {\n return this;\n }\n const rules = { ...this.rules, [selector]: { ...(this.rules as any)[selector], ...newRules } };\n return this.newCss({ rules: rules as any });\n }\n}\n\n/** Emotion treats the same rules, ordered differently as different classes, but naively they can be the same. */\nfunction sortObject<T extends object>(obj: T): T {\n return Object.keys(obj)\n .sort()\n .reduce((acc, key) => {\n acc[key as keyof T] = obj[key as keyof T];\n return acc;\n }, ({} as any) as T) as T;\n}\n\n/** Conditionally adds \\`important!\\` to everything. */\nfunction maybeImportant<T extends object>(obj: T, important: boolean): T {\n if (important) {\n Object.keys(obj).forEach(key => {\n (obj as any)[key] = \\`\\${(obj as any)[key]} !important\\`;\n });\n }\n return obj;\n}\n\n/** Converts \\`inc\\` into pixels value with a \\`px\\` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : \\`\\${increment(inc)}px\\`;\n}\n\n/** Converts \\`inc\\` into pixels. */\nexport function increment(inc: number): number {\n return inc * ", ";\n}\n\n/** Convert \\`pixels\\` to a \\`px\\` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return \\`\\${pixels}px\\`;\n}\n\nexport enum Palette {\n ", "\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, important: false, selector: undefined });\n\n", "\n\n", "\n\n", "\n "])), (0, ts_poet_1.def)("Properties"), Properties, typographyType, lines.join("\n ").replace(/ +\n/g, "\n"), breakpointIfs, increment, Object.entries(palette).map(function (_a) {
|
|
141
|
+
var containerQueriesCode = (0, ts_poet_1.code)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n /**\n * Utility to help write `@container` queries\n *\n * @param name - The name of the container.\n * @param lt - The maximum width of the container inclusive.\n * @param gt - The minimum width of the container exclusive.\n */\n type ContainerProps = { name?: string } & ({ lt: number } | { gt: number } | { lt: number; gt: number });\n export function Container(props: ContainerProps) {\n const { name = \"\" } = props;\n const lt = \"lt\" in props ? props.lt : undefined;\n const gt = \"gt\" in props ? props.gt : undefined;\n\n const ltQuery = lt !== undefined ? `(max-width: ${lt}px)` : \"\";\n const gtQuery = gt !== undefined ? `(min-width: ${gt + 1}px)` : \"\";\n const query = [ltQuery, gtQuery].filter(Boolean).join(\" and \");\n\n return `@container ${name} ${query}`;\n }"], ["\n /**\n * Utility to help write \\`@container\\` queries\n *\n * @param name - The name of the container.\n * @param lt - The maximum width of the container inclusive.\n * @param gt - The minimum width of the container exclusive.\n */\n type ContainerProps = { name?: string } & ({ lt: number } | { gt: number } | { lt: number; gt: number });\n export function Container(props: ContainerProps) {\n const { name = \"\" } = props;\n const lt = \"lt\" in props ? props.lt : undefined;\n const gt = \"gt\" in props ? props.gt : undefined;\n\n const ltQuery = lt !== undefined ? \\`(max-width: \\${lt}px)\\` : \"\";\n const gtQuery = gt !== undefined ? \\`(min-width: \\${gt + 1}px)\\` : \"\";\n const query = [ltQuery, gtQuery].filter(Boolean).join(\" and \");\n\n return \\`@container \\${name} \\${query}\\`;\n }"])));
|
|
142
|
+
return (0, ts_poet_1.code)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's `truss-config.ts` to make configuration changes (fonts, increments, etc).\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ", " = ", "<string | 0, string>;\n\n", "\n\ntype Opts<T> = {\n rules: T,\n enabled: boolean,\n important: boolean,\n selector: string | undefined\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n private get rules(): T { return this.opts.rules };\n private get enabled(): boolean { return this.opts.enabled };\n private get selector(): string | undefined { return this.opts.selector };\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n\n ", "\n \n get $(): T { return maybeImportant(sortObject(this.rules), this.opts.important); }\n\n if(bp: Breakpoint): CssBuilder<T>;\n if(cond: boolean): CssBuilder<T>;\n if(attr: string, value: boolean | string): CssBuilder<T>;\n if(arg: boolean | Breakpoint | string, value?: boolean | string): CssBuilder<T> {\n if (value !== undefined) {\n return this.newCss({ selector: `[${arg}='${value}']` });\n } else if (typeof arg === \"boolean\") {\n return this.newCss({ enabled: arg });\n } else {\n return this.newCss({ selector: Breakpoints[arg as Breakpoint] });\n }\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n \n ifContainer(props: ContainerProps) {\n return this.newCss({ selector: Container(props) });\n }\n \n ", "\n\n get else() {\n if (this.selector !== undefined) {\n if (this.selector.includes(\"not\")) {\n throw new Error(\"else was already called\");\n } else {\n return this.newCss({ selector: this.selector.replace(\"@media\", \"@media not\") });\n }\n }\n return this.newCss({ enabled: !this.enabled });\n }\n\n get important() { return this.newCss({ important: true }); }\n\n /** Adds new properties, either a specific key/value or a Properties object, to the current css. */\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Adds new properties, either a specific key/value or a Properties object, to a nested selector. */\n addIn<P extends Properties>(selector: string, props: P | undefined): CssBuilder<T & P>;\n addIn<K extends keyof Properties>(selector: string, prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n addIn<K extends keyof Properties>(selector: string, propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n if (!this.enabled) return this;\n if (newRules === undefined) {\n return this;\n }\n const rules = { ...this.rules, [selector]: { ...(this.rules as any)[selector], ...newRules } };\n return this.newCss({ rules: rules as any });\n }\n}\n\n/** Emotion treats the same rules, ordered differently as different classes, but naively they can be the same. */\nfunction sortObject<T extends object>(obj: T): T {\n return Object.keys(obj)\n .sort()\n .reduce((acc, key) => {\n acc[key as keyof T] = obj[key as keyof T];\n return acc;\n }, ({} as any) as T) as T;\n}\n\n/** Conditionally adds `important!` to everything. */\nfunction maybeImportant<T extends object>(obj: T, important: boolean): T {\n if (important) {\n Object.keys(obj).forEach(key => {\n (obj as any)[key] = `${(obj as any)[key]} !important`;\n });\n }\n return obj;\n}\n\n/** Converts `inc` into pixels value with a `px` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : `${increment(inc)}px`;\n}\n\n/** Converts `inc` into pixels. */\nexport function increment(inc: number): number {\n return inc * ", ";\n}\n\n/** Convert `pixels` to a `px` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return `${pixels}px`;\n}\n\nexport enum Palette {\n ", "\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, important: false, selector: undefined });\n\n", "\n\n", "\n\n", "\n\n", "\n "], ["\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's \\`truss-config.ts\\` to make configuration changes (fonts, increments, etc).\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ", " = ", "<string | 0, string>;\n\n", "\n\ntype Opts<T> = {\n rules: T,\n enabled: boolean,\n important: boolean,\n selector: string | undefined\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n private get rules(): T { return this.opts.rules };\n private get enabled(): boolean { return this.opts.enabled };\n private get selector(): string | undefined { return this.opts.selector };\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n\n ", "\n \n get $(): T { return maybeImportant(sortObject(this.rules), this.opts.important); }\n\n if(bp: Breakpoint): CssBuilder<T>;\n if(cond: boolean): CssBuilder<T>;\n if(attr: string, value: boolean | string): CssBuilder<T>;\n if(arg: boolean | Breakpoint | string, value?: boolean | string): CssBuilder<T> {\n if (value !== undefined) {\n return this.newCss({ selector: \\`[\\${arg}='\\${value}']\\` });\n } else if (typeof arg === \"boolean\") {\n return this.newCss({ enabled: arg });\n } else {\n return this.newCss({ selector: Breakpoints[arg as Breakpoint] });\n }\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n \n ifContainer(props: ContainerProps) {\n return this.newCss({ selector: Container(props) });\n }\n \n ", "\n\n get else() {\n if (this.selector !== undefined) {\n if (this.selector.includes(\"not\")) {\n throw new Error(\"else was already called\");\n } else {\n return this.newCss({ selector: this.selector.replace(\"@media\", \"@media not\") });\n }\n }\n return this.newCss({ enabled: !this.enabled });\n }\n\n get important() { return this.newCss({ important: true }); }\n\n /** Adds new properties, either a specific key/value or a Properties object, to the current css. */\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Adds new properties, either a specific key/value or a Properties object, to a nested selector. */\n addIn<P extends Properties>(selector: string, props: P | undefined): CssBuilder<T & P>;\n addIn<K extends keyof Properties>(selector: string, prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n addIn<K extends keyof Properties>(selector: string, propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n if (!this.enabled) return this;\n if (newRules === undefined) {\n return this;\n }\n const rules = { ...this.rules, [selector]: { ...(this.rules as any)[selector], ...newRules } };\n return this.newCss({ rules: rules as any });\n }\n}\n\n/** Emotion treats the same rules, ordered differently as different classes, but naively they can be the same. */\nfunction sortObject<T extends object>(obj: T): T {\n return Object.keys(obj)\n .sort()\n .reduce((acc, key) => {\n acc[key as keyof T] = obj[key as keyof T];\n return acc;\n }, ({} as any) as T) as T;\n}\n\n/** Conditionally adds \\`important!\\` to everything. */\nfunction maybeImportant<T extends object>(obj: T, important: boolean): T {\n if (important) {\n Object.keys(obj).forEach(key => {\n (obj as any)[key] = \\`\\${(obj as any)[key]} !important\\`;\n });\n }\n return obj;\n}\n\n/** Converts \\`inc\\` into pixels value with a \\`px\\` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : \\`\\${increment(inc)}px\\`;\n}\n\n/** Converts \\`inc\\` into pixels. */\nexport function increment(inc: number): number {\n return inc * ", ";\n}\n\n/** Convert \\`pixels\\` to a \\`px\\` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return \\`\\${pixels}px\\`;\n}\n\nexport enum Palette {\n ", "\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, important: false, selector: undefined });\n\n", "\n\n", "\n\n", "\n\n", "\n "])), (0, ts_poet_1.def)("Properties"), Properties, typographyType, lines.join("\n ").replace(/ +\n/g, "\n"), breakpointIfs, increment, Object.entries(palette).map(function (_a) {
|
|
137
143
|
var _b = __read(_a, 2), name = _b[0], value = _b[1];
|
|
138
144
|
return "".concat(name, " = \"").concat(value, "\",");
|
|
139
|
-
}), typeAliasCode, breakpointCode, extras || "");
|
|
145
|
+
}), typeAliasCode, breakpointCode, containerQueriesCode, extras || "");
|
|
140
146
|
}
|
|
141
147
|
/** Invokes all of the `MethodFns` to create actual `UtilityMethod`s. */
|
|
142
148
|
function generateMethods(config, methodFns) {
|
|
@@ -145,5 +151,5 @@ function generateMethods(config, methodFns) {
|
|
|
145
151
|
return [name, fn(config)];
|
|
146
152
|
}));
|
|
147
153
|
}
|
|
148
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
154
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
149
155
|
//# sourceMappingURL=generate.js.map
|
package/build/generate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yBAAoC;AACpC,mCAA+C;AAC/C,6CAAkD;AAElD,qCAAgD;AAChD,gDAAwD;AACxD,iCAAkC;AAClC,2CAAyC;
|
|
1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K,QAAI,CAAC;IACjC,CAAC,CAAC,EASF,aAAa,EAEb,cAAc,EAEd,oBAAoB,EAEpB,MAAM,IAAI,EAAE,EACV;AACJ,CAAC;AAED,wEAAwE;AACxE,SAAS,eAAe,CAAC,MAAc,EAAE,SAAmB;IAC1D,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,UAAC,EAAU;YAAV,KAAA,aAAU,EAAT,IAAI,QAAA,EAAE,EAAE,QAAA;QAAM,OAAA,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAAlB,CAAkB,CAAC,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
+
if (ar || !(i in from)) {
|
|
21
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
+
ar[i] = from[i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.container = void 0;
|
|
29
|
+
var methods_1 = require("../../methods");
|
|
30
|
+
var container = function () { return __spreadArray(__spreadArray([], __read((0, methods_1.newMethodsForProp)("containerType", {
|
|
31
|
+
cts: "size",
|
|
32
|
+
ctis: "inline-size",
|
|
33
|
+
ctn: "normal",
|
|
34
|
+
}, "ct")), false), __read((0, methods_1.newMethodsForProp)("containerName", {}, "cn")), false); };
|
|
35
|
+
exports.container = container;
|
|
36
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/sections/tachyons/container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2D;AAGpD,IAAM,SAAS,GAAoB,cAAM,8CAC3C,IAAA,2BAAiB,EAClB,eAAe,EACf;IACE,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,QAAQ;CACd,EACD,IAAI,CACL,kBACE,IAAA,2BAAiB,EAAC,eAAe,EAAE,EAAE,EAAE,IAAI,CAAC,WAVD,CAW/C,CAAC;AAXW,QAAA,SAAS,aAWpB"}
|
|
@@ -5,6 +5,7 @@ export declare const defaultSections: {
|
|
|
5
5
|
readonly borderStyle: import("../..").CreateMethodsFn;
|
|
6
6
|
readonly borderWidth: import("../..").CreateMethodsFn;
|
|
7
7
|
readonly boxShadow: import("../..").CreateMethodsFn;
|
|
8
|
+
readonly container: import("../..").CreateMethodsFn;
|
|
8
9
|
readonly coordinates: import("../..").CreateMethodsFn;
|
|
9
10
|
readonly cursor: import("../..").CreateMethodsFn;
|
|
10
11
|
readonly display: import("../..").CreateMethodsFn;
|
|
@@ -34,6 +34,7 @@ var whitespace_1 = require("./whitespace");
|
|
|
34
34
|
var widths_1 = require("./widths");
|
|
35
35
|
var wordBreak_1 = require("./wordBreak");
|
|
36
36
|
var zIndex_1 = require("./zIndex");
|
|
37
|
+
var container_1 = require("./container");
|
|
37
38
|
exports.defaultSections = {
|
|
38
39
|
border: border_1.border,
|
|
39
40
|
borderColor: borderColors_1.borderColor,
|
|
@@ -41,6 +42,7 @@ exports.defaultSections = {
|
|
|
41
42
|
borderStyle: borderStyles_1.borderStyle,
|
|
42
43
|
borderWidth: borderWidths_1.borderWidth,
|
|
43
44
|
boxShadow: boxShadow_1.boxShadow,
|
|
45
|
+
container: container_1.container,
|
|
44
46
|
coordinates: coordinates_1.coordinates,
|
|
45
47
|
cursor: cursor_1.cursor,
|
|
46
48
|
display: display_1.display,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sections/tachyons/index.ts"],"names":[],"mappings":";;;AAAA,mCAAsD;AACtD,+CAAiE;AACjE,+CAAkE;AAClE,+CAAiE;AACjE,+CAAiE;AACjE,yCAA4D;AAC5D,6CAAgE;AAChE,mCAAsD;AACtD,qCAAwD;AACxD,qCAAwD;AACxD,mCAAqD;AACrD,2CAA8D;AAC9D,+BAAkD;AAClD,qCAAuD;AACvD,yCAA4D;AAC5D,yCAA4D;AAC5D,uCAAyD;AACzD,uCAA0D;AAC1D,uCAA0D;AAC1D,iCAAoD;AACpD,qCAAwD;AACxD,yCAA4D;AAC5D,mDAAsE;AACtE,iDAAoE;AACpE,yCAA4D;AAC5D,2CAA8D;AAC9D,2CAA8D;AAC9D,iDAAoE;AACpE,2CAA8D;AAC9D,2CAA8D;AAC9D,mCAAqD;AACrD,yCAA4D;AAC5D,mCAAsD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sections/tachyons/index.ts"],"names":[],"mappings":";;;AAAA,mCAAsD;AACtD,+CAAiE;AACjE,+CAAkE;AAClE,+CAAiE;AACjE,+CAAiE;AACjE,yCAA4D;AAC5D,6CAAgE;AAChE,mCAAsD;AACtD,qCAAwD;AACxD,qCAAwD;AACxD,mCAAqD;AACrD,2CAA8D;AAC9D,+BAAkD;AAClD,qCAAuD;AACvD,yCAA4D;AAC5D,yCAA4D;AAC5D,uCAAyD;AACzD,uCAA0D;AAC1D,uCAA0D;AAC1D,iCAAoD;AACpD,qCAAwD;AACxD,yCAA4D;AAC5D,mDAAsE;AACtE,iDAAoE;AACpE,yCAA4D;AAC5D,2CAA8D;AAC9D,2CAA8D;AAC9D,iDAAoE;AACpE,2CAA8D;AAC9D,2CAA8D;AAC9D,mCAAqD;AACrD,yCAA4D;AAC5D,mCAAsD;AACtD,yCAA4D;AAE/C,QAAA,eAAe,GAAG;IAC7B,MAAM,iBAAA;IACN,WAAW,4BAAA;IACX,YAAY,6BAAA;IACZ,WAAW,4BAAA;IACX,WAAW,4BAAA;IACX,SAAS,uBAAA;IACT,SAAS,uBAAA;IACT,WAAW,2BAAA;IACX,MAAM,iBAAA;IACN,OAAO,mBAAA;IACP,OAAO,mBAAA;IACP,KAAK,gBAAA;IACL,UAAU,yBAAA;IACV,IAAI,aAAA;IACJ,MAAM,kBAAA;IACN,SAAS,uBAAA;IACT,SAAS,uBAAA;IACT,OAAO,oBAAA;IACP,QAAQ,qBAAA;IACR,QAAQ,qBAAA;IACR,KAAK,eAAA;IACL,OAAO,mBAAA;IACP,SAAS,uBAAA;IACT,cAAc,iCAAA;IACd,aAAa,+BAAA;IACb,SAAS,uBAAA;IACT,UAAU,yBAAA;IACV,UAAU,yBAAA;IACV,aAAa,+BAAA;IACb,UAAU,yBAAA;IACV,UAAU,yBAAA;IACV,KAAK,gBAAA;IACL,SAAS,uBAAA;IACT,MAAM,iBAAA;CACE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sections/tachyons-rn/index.ts"],"names":[],"mappings":";;;AAAA,qCAA2D;AAE9C,QAAA,mBAAmB,GAAG;IACjC,OAAO,mBAAA;CACC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
+
if (ar || !(i in from)) {
|
|
21
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
+
ar[i] = from[i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.spacing = void 0;
|
|
29
|
+
var methods_1 = require("../../methods");
|
|
30
|
+
var spacing = function (config) {
|
|
31
|
+
var marginDefs = [
|
|
32
|
+
["mt", "marginTop"],
|
|
33
|
+
["mr", "marginRight"],
|
|
34
|
+
["mb", "marginBottom"],
|
|
35
|
+
["ml", "marginLeft"],
|
|
36
|
+
["mx", ["marginLeft", "marginRight"]],
|
|
37
|
+
["my", ["marginTop", "marginBottom"]],
|
|
38
|
+
["m", ["marginTop", "marginBottom", "marginRight", "marginLeft"]],
|
|
39
|
+
];
|
|
40
|
+
var margins = __spreadArray([], __read(marginDefs.map(function (_a) {
|
|
41
|
+
var _b = __read(_a, 2), abbr = _b[0], conf = _b[1];
|
|
42
|
+
return (0, methods_1.newIncrementMethods)(config, abbr, conf, { auto: true });
|
|
43
|
+
}).flat()), false);
|
|
44
|
+
var paddingDefs = [
|
|
45
|
+
["pt", "paddingTop"],
|
|
46
|
+
["pr", "paddingRight"],
|
|
47
|
+
["pb", "paddingBottom"],
|
|
48
|
+
["pl", "paddingLeft"],
|
|
49
|
+
["px", ["paddingLeft", "paddingRight"]],
|
|
50
|
+
["py", ["paddingTop", "paddingBottom"]],
|
|
51
|
+
["p", ["paddingTop", "paddingBottom", "paddingRight", "paddingLeft"]],
|
|
52
|
+
];
|
|
53
|
+
var paddings = paddingDefs.map(function (_a) {
|
|
54
|
+
var _b = __read(_a, 2), abbr = _b[0], conf = _b[1];
|
|
55
|
+
return (0, methods_1.newIncrementMethods)(config, abbr, conf);
|
|
56
|
+
}).flat();
|
|
57
|
+
return __spreadArray(__spreadArray([], __read(margins), false), __read(paddings), false);
|
|
58
|
+
};
|
|
59
|
+
exports.spacing = spacing;
|
|
60
|
+
//# sourceMappingURL=spacing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../../src/sections/tachyons-rn/spacing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA6D;AAEtD,IAAM,OAAO,GAAoB,UAAC,MAAM;IAC7C,IAAM,UAAU,GAAgB;QAC9B,CAAC,IAAI,EAAE,WAAW,CAAC;QACnB,CAAC,IAAI,EAAE,aAAa,CAAC;QACrB,CAAC,IAAI,EAAE,cAAc,CAAC;QACtB,CAAC,IAAI,EAAE,YAAY,CAAC;QACpB,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QACrC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACrC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;KAClE,CAAC;IACF,IAAM,OAAO,4BAAO,UAAU,CAAC,GAAG,CAAC,UAAC,EAAY;YAAZ,KAAA,aAAY,EAAX,IAAI,QAAA,EAAE,IAAI,QAAA;QAAM,OAAA,IAAA,6BAAmB,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAAvD,CAAuD,CAAC,CAAC,IAAI,EAAE,SAAC,CAAC;IAEtH,IAAM,WAAW,GAAgB;QAC/B,CAAC,IAAI,EAAE,YAAY,CAAC;QACpB,CAAC,IAAI,EAAE,cAAc,CAAC;QACtB,CAAC,IAAI,EAAE,eAAe,CAAC;QACvB,CAAC,IAAI,EAAE,aAAa,CAAC;QACrB,CAAC,IAAI,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;QACvC,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QACvC,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;KACtE,CAAC;IACF,IAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,UAAC,EAAY;YAAZ,KAAA,aAAY,EAAX,IAAI,QAAA,EAAE,IAAI,QAAA;QAAM,OAAA,IAAA,6BAAmB,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC;IAAvC,CAAuC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEnG,8CAAW,OAAO,kBAAK,QAAQ,UAAE;AACnC,CAAC,CAAC;AAxBW,QAAA,OAAO,WAwBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homebound/truss",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.130.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"bin": "cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"change-case": "^4.1.2",
|
|
12
|
-
"csstype": "^3.1.
|
|
12
|
+
"csstype": "^3.1.2",
|
|
13
13
|
"ts-node": "^10.9.1",
|
|
14
14
|
"ts-poet": "^6.1.0"
|
|
15
15
|
},
|