finish twind "bundle"

This commit is contained in:
Seth Trowbridge 2024-05-14 15:34:18 -04:00
parent c8cb92e2d8
commit 9bc6ae00bc
9 changed files with 1348 additions and 20 deletions

1114
bundled/core.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

209
bundled/presets.d.ts vendored Normal file
View File

@ -0,0 +1,209 @@
import { MaybeArray, BaseTheme, CSSProperties, Preset } from 'https://esm.sh/v135/@twind/core@1.1.3/core.d.ts';
declare function presetAutoprefix(): Preset;
export { presetAutoprefix };
declare module 'https://esm.sh/v135/@twind/core@1.1.3/core.d.ts' {
interface CustomProperties {
'--tw-backdrop-blur'?: string;
'--tw-backdrop-brightness'?: string;
'--tw-backdrop-contrast'?: string;
'--tw-backdrop-grayscale'?: string;
'--tw-backdrop-hue-rotate'?: string;
'--tw-backdrop-invert'?: string;
'--tw-backdrop-opacity'?: string;
'--tw-backdrop-saturate'?: string;
'--tw-backdrop-sepia'?: string;
'--tw-bg-opacity'?: string | number;
'--tw-blur'?: string;
'--tw-border-opacity'?: string | number;
'--tw-border-spacing-x'?: string | number;
'--tw-border-spacing-y'?: string | number;
'--tw-brightness'?: string;
'--tw-contrast'?: string;
'--tw-divide-opacity'?: string | number;
'--tw-divide-x-reverse'?: string | number;
'--tw-divide-y-reverse'?: string | number;
'--tw-drop-shadow'?: string;
'--tw-gradient-from'?: string;
'--tw-gradient-stops'?: string;
'--tw-gradient-to'?: string;
'--tw-gradient-via'?: string;
'--tw-grayscale'?: string;
'--tw-hue-rotate'?: string;
'--tw-invert'?: string;
'--tw-numeric-figure'?: string;
'--tw-numeric-fraction'?: string;
'--tw-numeric-spacing'?: string;
'--tw-opacity'?: string | number;
'--tw-ordinal'?: string;
'--tw-placeholder-opacity'?: string;
'--tw-ring-color'?: string;
'--tw-ring-inset'?: string;
'--tw-ring-offset-color'?: string;
'--tw-ring-offset-shadow'?: string;
'--tw-ring-offset-width'?: string;
'--tw-ring-opacity'?: string | number;
'--tw-ring-shadow'?: string;
'--tw-rotate'?: string;
'--tw-saturate'?: string;
'--tw-scale-x'?: string;
'--tw-scale-y'?: string;
'--tw-sepia'?: string;
'--tw-shadow'?: string;
'--tw-shadow-color'?: string;
'--tw-shadow-colored'?: string;
'--tw-skew-x'?: string;
'--tw-skew-y'?: string;
'--tw-slashed-zero'?: string;
'--tw-scroll-snap-strictness'?: string;
'--tw-text-opacity'?: string;
'--tw-pan-x'?: string;
'--tw-pan-y'?: string;
'--tw-pinch-zoom'?: string;
'--tw-touch-action'?: string;
'--tw-transform'?: string;
'--tw-translate-x'?: string;
'--tw-translate-y'?: string;
}
}
declare type FontSizeValue = string | [size: string, lineHeight: string] | [size: string, options: {
lineHeight?: string;
letterSpacing?: string;
fontWeight?: string;
}];
declare type FontFamilyValue = MaybeArray<string> | [fontFamily: MaybeArray<string>, configuration: {
fontFeatureSettings?: string;
}];
interface Container {
screens?: BaseTheme['screens'];
center?: boolean;
padding?: string | Record<string, string>;
}
interface TailwindTheme extends BaseTheme {
columns: Record<string, string>;
spacing: Record<string, string>;
durations: Record<string, MaybeArray<string>>;
accentColor: BaseTheme['colors'];
animation: Record<string, MaybeArray<string>>;
aria: Record<string, string>;
aspectRatio: Record<string, string>;
backdropBlur: Record<string, string>;
backdropBrightness: Record<string, string>;
backdropContrast: Record<string, string>;
backdropGrayscale: Record<string, string>;
backdropHueRotate: Record<string, string>;
backdropInvert: Record<string, string>;
backdropOpacity: Record<string, string>;
backdropSaturate: Record<string, string>;
backdropSepia: Record<string, string>;
backgroundColor: BaseTheme['colors'];
backgroundImage: Record<string, MaybeArray<string>>;
backgroundOpacity: Record<string, string>;
backgroundPosition: Record<string, string>;
backgroundSize: Record<string, MaybeArray<string>>;
blur: Record<string, string>;
borderColor: BaseTheme['colors'];
borderOpacity: Record<string, string>;
borderRadius: Record<string, string>;
borderSpacing: Record<string, string>;
borderWidth: Record<string, string>;
boxShadow: Record<string, MaybeArray<string>>;
boxShadowColor: BaseTheme['colors'];
brightness: Record<string, string>;
caretColor: BaseTheme['colors'];
container: Container;
content: Record<string, string>;
contrast: Record<string, string>;
cursor: Record<string, MaybeArray<string>>;
data: Record<string, string>;
divideColor: BaseTheme['colors'];
divideOpacity: Record<string, string>;
divideWidth: Record<string, string>;
dropShadow: Record<string, MaybeArray<string>>;
fill: BaseTheme['colors'];
flex: Record<string, string>;
flexBasis: Record<string, string>;
flexGrow: Record<string, number | string>;
flexShrink: Record<string, number | string>;
fontFamily: Record<string, FontFamilyValue>;
fontSize: Record<string, FontSizeValue>;
fontWeight: Record<string, string>;
gap: Record<string, string>;
gradientColorStops: BaseTheme['colors'];
grayscale: Record<string, string>;
gridAutoColumns: Record<string, string>;
gridAutoRows: Record<string, string>;
gridColumn: Record<string, string>;
gridColumnEnd: Record<string, string>;
gridColumnStart: Record<string, string>;
gridRow: Record<string, string>;
gridRowEnd: Record<string, string>;
gridRowStart: Record<string, string>;
gridTemplateColumns: Record<string, string>;
gridTemplateRows: Record<string, string>;
height: Record<string, string>;
hueRotate: Record<string, string>;
inset: Record<string, string>;
invert: Record<string, string>;
keyframes: Record<string, Record<string, CSSProperties>>;
letterSpacing: Record<string, string>;
lineHeight: Record<string, string>;
listStyleType: Record<string, string>;
margin: Record<string, string>;
maxHeight: Record<string, string>;
maxWidth: Record<string, string>;
minHeight: Record<string, string>;
minWidth: Record<string, string>;
objectPosition: Record<string, string>;
opacity: Record<string, string>;
order: Record<string, string>;
outlineColor: BaseTheme['colors'];
outlineOffset: Record<string, string>;
outlineWidth: Record<string, string>;
padding: Record<string, string>;
placeholderColor: BaseTheme['colors'];
placeholderOpacity: Record<string, string>;
ringColor: BaseTheme['colors'];
ringOffsetColor: BaseTheme['colors'];
ringOffsetWidth: Record<string, string>;
ringOpacity: Record<string, string>;
ringWidth: Record<string, string>;
rotate: Record<string, string>;
saturate: Record<string, string>;
scale: Record<string, string>;
scrollMargin: Record<string, string>;
scrollPadding: Record<string, string>;
sepia: Record<string, string>;
skew: Record<string, string>;
space: Record<string, string>;
stroke: BaseTheme['colors'];
strokeWidth: Record<string, string>;
supports: Record<string, string>;
textColor: BaseTheme['colors'];
textDecorationColor: BaseTheme['colors'];
textDecorationThickness: Record<string, string>;
textIndent: Record<string, string>;
textOpacity: Record<string, string>;
textUnderlineOffset: Record<string, string>;
transformOrigin: Record<string, string>;
transitionDelay: Record<string, MaybeArray<string>>;
transitionDuration: Record<string, MaybeArray<string>>;
transitionProperty: Record<string, MaybeArray<string>>;
transitionTimingFunction: Record<string, MaybeArray<string>>;
translate: Record<string, string>;
width: Record<string, string>;
willChange: Record<string, string>;
zIndex: Record<string, string>;
}
interface TailwindPresetOptions {
/** Allows to disable to tailwind preflight (default: `false` eg include the tailwind preflight ) */
disablePreflight?: boolean | undefined;
}
declare function presetTailwind({ disablePreflight, }?: TailwindPresetOptions): Preset<TailwindTheme>;
export { Container, FontFamilyValue, FontSizeValue, TailwindPresetOptions, TailwindTheme, presetTailwind };

11
bundled/presets.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,11 @@
import * as Core from "./twind-core.mjs"; import * as TW from "./core.js";
import * as PreTailwind from "./twind-preset-tailwind.mjs"; import {presetAutoprefix, presetTailwind} from "./presets.js"
import * as PreAutoprefix from "./twind-preset-autoprefix.mjs";
const Configure =
{
theme: {},
presets: [presetAutoprefix(), presetTailwind()],
hash: false
} as TW.TwindUserConfig;
const app = Core.install({ console.log(TW.install(Configure));
presets:[PreTailwind.default(), PreAutoprefix.default()]
})
console.log(app);

View File

@ -1,6 +0,0 @@
/* esm.sh - esbuild bundle(@twind/preset-autoprefix@1.0.7) denonext production */
import{cssPropertyAlias as m,cssPropertyPrefixFlags as x,cssValuePrefixFlags as F}from"./twind-preset-autoprefix.mjs";var P=[["-webkit-",1],["-moz-",2],["-ms-",4]];function u(){return({stringify:r})=>({stringify(s,e,l){let f="",t=m(s);t&&(f+=r(t,e,l)+";");let i=x(s),o=F(s,e);for(let a of P)i&a[1]&&(f+=r(a[0]+s,e,l)+";"),o&a[1]&&(f+=r(s,a[0]+e,l)+";");return f+r(s,e,l)}})}export{u as default};
/* esm.sh - esbuild bundle(style-vendorizer@2.2.3) denonext production */
var t=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function e(r){return t.get(r)}function s(r){var i=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(r);return i?i[1]?1:i[2]?2:i[3]?3:5:0}function o(r,i){var a=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(r);return a?a[1]?/^sti/i.test(i)?1:0:a[2]?/^pat/i.test(i)?1:0:a[3]?/^image-/i.test(i)?1:0:a[4]?i[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(i)?4:0:0}export{e as cssPropertyAlias,s as cssPropertyPrefixFlags,o as cssValuePrefixFlags};

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"react/": "https://esm.sh/preact@10.20.2/compat/", "react/": "https://esm.sh/preact@10.20.2/compat/",
"@preact/signals": "https://esm.sh/@preact/signals@1.2.3?deps=preact@10.20.2", "@preact/signals": "https://esm.sh/@preact/signals@1.2.3?deps=preact@10.20.2",
"signals-original": "https://esm.sh/@preact/signals@1.2.3?deps=preact@10.20.2", "signals-original": "https://esm.sh/@preact/signals@1.2.3?deps=preact@10.20.2",
"@twind/": "https://esm.sh/v126/@twind/", "@twind/": "./bundled/",
">other/": "https://esm.sh/", ">other/": "https://esm.sh/",
">able/": "./", ">able/": "./",

View File

@ -1,13 +1,12 @@
import React from "react"; import React from "react";
import * as TW from "@twind/core"; import * as TW from "@twind/core.js";
import TWPreTail from "@twind/preset-tailwind"; import * as Pre from "@twind/presets.js";
import TWPreAuto from "@twind/preset-autoprefix";
import * as App from ">able/app.tsx"; import * as App from ">able/app.tsx";
const Configure = const Configure =
{ {
theme: {}, theme: {},
presets: [TWPreTail(), TWPreAuto()], presets: [Pre.presetAutoprefix(), Pre.presetTailwind()],
hash: false hash: false
} as TW.TwindUserConfig; } as TW.TwindUserConfig;