From b81a96d91ad19a2afceb7072bec5c08dae5aa446 Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Tue, 14 May 2024 22:52:52 -0400 Subject: [PATCH] revert to esm.sh --- bundled/preact/compat.js | 2 +- bundled/twind/presets.js | 2 +- checker.tsx | 6 ++++-- deno.jsonc | 2 +- run-browser.tsx | 7 ++++--- run-serve.tsx | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bundled/preact/compat.js b/bundled/preact/compat.js index 8122fb0..16afcb6 100644 --- a/bundled/preact/compat.js +++ b/bundled/preact/compat.js @@ -3,7 +3,7 @@ import{Component as f,createElement as c,options as i,toChildArray as _,Fragment as d,render as m,hydrate as W,createContext as $,createRef as H,cloneElement as z} from"./preact.js"; -export {createElement as jsx, createElement as jsxs} from "./preact.js"; +export {createElement as jsx, createElement as jsxs, createElement as h} from "./preact.js"; import{Component as Ve,Fragment as We,createContext as $e,createElement as He,createRef as ze} from"./preact.js"; diff --git a/bundled/twind/presets.js b/bundled/twind/presets.js index 49af6c9..09e76d8 100644 --- a/bundled/twind/presets.js +++ b/bundled/twind/presets.js @@ -4,7 +4,7 @@ var w={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},co /* esm.sh - esbuild bundle(@twind/preset-autoprefix@1.0.7) denonext production */ -import{cssPropertyAlias,cssPropertyPrefixFlags,cssValuePrefixFlags}from"./presets.js";var P=[["-webkit-",1],["-moz-",2],["-ms-",4]];export function presetAutoprefix(){return({stringify:r})=>({stringify(s,e,l){let f="",t=cssPropertyAlias(s);t&&(f+=r(t,e,l)+";");let i=cssPropertyPrefixFlags(s),o=cssValuePrefixFlags(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)}})} +import{cssPropertyAlias,cssPropertyPrefixFlags,cssValuePrefixFlags}from"@twind/core";var P=[["-webkit-",1],["-moz-",2],["-ms-",4]];export function presetAutoprefix(){return({stringify:r})=>({stringify(s,e,l){let f="",t=cssPropertyAlias(s);t&&(f+=r(t,e,l)+";");let i=cssPropertyPrefixFlags(s),o=cssValuePrefixFlags(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)}})} /* esm.sh - esbuild bundle(style-vendorizer@2.2.3) denonext production */ diff --git a/checker.tsx b/checker.tsx index b52184c..155766e 100644 --- a/checker.tsx +++ b/checker.tsx @@ -169,8 +169,9 @@ export async function Check() importMap["react"] = `https://esm.sh/preact@10.20.2/compat`; importMap["react/"] = `https://esm.sh/preact@10.20.2/compat/`; + importMap["react/jsx-runtime"] = "https://esm.sh/stable/preact@10.20.2/es2022/jsx-runtime.js", importMap["@preact/signals"] = `https://esm.sh/@preact/signals@1.2.3?deps=preact@10.20.2`; - importMap["@twind/core"] = `https://esm.sh/v126/@twind/core@1.1.3/es2022/core.mjs`; + importMap["@twind/core"] = `https://esm.sh/v126/@twind/core@1.1.3`; importMap[">able/"] = `${RootHost}`; if(!importMap[">able/app.tsx"]) { @@ -199,7 +200,8 @@ export async function Check() const optionsRequired = { "lib": ["deno.window", "dom", "dom.iterable", "dom.asynciterable"], - "jsx": "react-jsx" + "jsx": "react-jsx", + "jsxImportSource": "react" } const optionsCurrent = config.json.compilerOptions as Record || {}; //const compLib:string[] = compOpts.lib as string[] || []; diff --git a/deno.jsonc b/deno.jsonc index 346a9d0..edc7bb0 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -5,7 +5,7 @@ "react-original": "https://esm.sh/preact@10.20.2/compat", "@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", - "@twind/": "./bundled/twind/", + "@twind/core": "https://esm.sh/@twind/core@1.1.3", ">able/": "./", ">able/app.tsx": "./app.tsx" diff --git a/run-browser.tsx b/run-browser.tsx index bb3889a..9d86858 100644 --- a/run-browser.tsx +++ b/run-browser.tsx @@ -1,12 +1,13 @@ import React from "react"; -import * as TW from "@twind/core.js"; -import * as Pre from "@twind/presets.js"; +import * as TW from "@twind/core"; +import PreTailwind from "https://esm.sh/v135/@twind/preset-tailwind@1.1.3/es2022/preset-tailwind.mjs"; +import PreAutoprefix from "https://esm.sh/v135/@twind/preset-autoprefix@1.0.7/es2022/preset-autoprefix.mjs"; import * as App from ">able/app.tsx"; const Configure = { theme: {}, - presets: [Pre.presetAutoprefix(), Pre.presetTailwind()], + presets: [PreAutoprefix(), PreTailwind()], hash: false } as TW.TwindUserConfig; diff --git a/run-serve.tsx b/run-serve.tsx index 50254be..111edb9 100644 --- a/run-serve.tsx +++ b/run-serve.tsx @@ -1,6 +1,6 @@ import * as MIME from "https://deno.land/std@0.180.0/media_types/mod.ts"; import * as SWCW from "https://esm.sh/@swc/wasm-web@1.3.62"; -import SSR from "http://localhost:4507/bundled/preact/to-string.js"; +import SSR from "https://esm.sh/preact-render-to-string@6.4.2?deps=preact@10.20.2"; import { HuntConfig, Root } from "./checker.tsx"; import CustomServe from ">able/api.tsx";