Compare commits

..

No commits in common. "b81a96d91ad19a2afceb7072bec5c08dae5aa446" and "b2b868d62f03a5281a567e5e31da5a514c13c837" have entirely different histories.

15 changed files with 1164 additions and 83 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
/* esm.sh - esbuild bundle(preact@10.20.2/hooks) es2022 production */
import{options as B}from"./preact.js";
var c,r,H,b,v=0,x=[],p=[],o=B,g=o.__b,C=o.__r,A=o.diffed,D=o.__c,F=o.unmount,k=o.__;function l(t,_){o.__h&&o.__h(r,t,v||_),v=0;var u=r.__H||(r.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({__V:p}),u.__[t]}function I(t){return v=1,R(U,t)}function R(t,_,u){var n=l(c++,2);if(n.t=t,!n.__c&&(n.__=[u?u(_):U(void 0,_),function(a){var f=n.__N?n.__N[0]:n.__[0],s=n.t(f,a);f!==s&&(n.__N=[s,n.__[1]],n.__c.setState({}))}],n.__c=r,!r.u)){var i=function(a,f,s){if(!n.__c.__H)return!0;var m=n.__c.__H.__.filter(function(e){return!!e.__c});if(m.every(function(e){return!e.__N}))return!h||h.call(this,a,f,s);var V=!1;return m.forEach(function(e){if(e.__N){var P=e.__[0];e.__=e.__N,e.__N=void 0,P!==e.__[0]&&(V=!0)}}),!(!V&&n.__c.props===a)&&(!h||h.call(this,a,f,s))};r.u=!0;var h=r.shouldComponentUpdate,N=r.componentWillUpdate;r.componentWillUpdate=function(a,f,s){if(this.__e){var m=h;h=void 0,i(a,f,s),h=m}N&&N.call(this,a,f,s)},r.shouldComponentUpdate=i}return n.__N||n.__}function z(t,_){var u=l(c++,3);!o.__s&&y(u.__H,_)&&(u.__=t,u.i=_,r.__H.__h.push(u))}function S(t,_){var u=l(c++,4);!o.__s&&y(u.__H,_)&&(u.__=t,u.i=_,r.__h.push(u))}function L(t){return v=5,T(function(){return{current:t}},[])}function M(t,_,u){v=6,S(function(){return typeof t=="function"?(t(_()),function(){return t(null)}):t?(t.current=_(),function(){return t.current=null}):void 0},u==null?u:u.concat(t))}function T(t,_){var u=l(c++,7);return y(u.__H,_)?(u.__V=t(),u.i=_,u.__h=t,u.__V):u.__}function G(t,_){return v=8,T(function(){return t},_)}function J(t){var _=r.context[t.__c],u=l(c++,9);return u.c=t,_?(u.__==null&&(u.__=!0,_.sub(r)),_.props.value):t.__}function K(t,_){o.useDebugValue&&o.useDebugValue(_?_(t):t)}function O(t){var _=l(c++,10),u=I();return _.__=t,r.componentDidCatch||(r.componentDidCatch=function(n,i){_.__&&_.__(n,i),u[1](n)}),[u[0],function(){u[1](void 0)}]}function Q(){var t=l(c++,11);if(!t.__){for(var _=r.__v;_!==null&&!_.__m&&_.__!==null;)_=_.__;var u=_.__m||(_.__m=[0,0]);t.__="P"+u[0]+"-"+u[1]++}return t.__}function W(){for(var t;t=x.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(d),t.__H.__h.forEach(E),t.__H.__h=[]}catch(_){t.__H.__h=[],o.__e(_,t.__v)}}o.__b=function(t){r=null,g&&g(t)},o.__=function(t,_){t&&_.__k&&_.__k.__m&&(t.__m=_.__k.__m),k&&k(t,_)},o.__r=function(t){C&&C(t),c=0;var _=(r=t.__c).__H;_&&(H===r?(_.__h=[],r.__h=[],_.__.forEach(function(u){u.__N&&(u.__=u.__N),u.__V=p,u.__N=u.i=void 0})):(_.__h.forEach(d),_.__h.forEach(E),_.__h=[],c=0)),H=r},o.diffed=function(t){A&&A(t);var _=t.__c;_&&_.__H&&(_.__H.__h.length&&(x.push(_)!==1&&b===o.requestAnimationFrame||((b=o.requestAnimationFrame)||j)(W)),_.__H.__.forEach(function(u){u.i&&(u.__H=u.i),u.__V!==p&&(u.__=u.__V),u.i=void 0,u.__V=p})),H=r=null},o.__c=function(t,_){_.some(function(u){try{u.__h.forEach(d),u.__h=u.__h.filter(function(n){return!n.__||E(n)})}catch(n){_.some(function(i){i.__h&&(i.__h=[])}),_=[],o.__e(n,u.__v)}}),D&&D(t,_)},o.unmount=function(t){F&&F(t);var _,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{d(n)}catch(i){_=i}}),u.__H=void 0,_&&o.__e(_,u.__v))};var q=typeof requestAnimationFrame=="function";function j(t){var _,u=function(){clearTimeout(n),q&&cancelAnimationFrame(_),setTimeout(t)},n=setTimeout(u,100);q&&(_=requestAnimationFrame(u))}function d(t){var _=r,u=t.__c;typeof u=="function"&&(t.__c=void 0,u()),r=_}function E(t){var _=r;t.__c=t.__(),r=_}function y(t,_){return!t||t.length!==_.length||_.some(function(u,n){return u!==t[n]})}function U(t,_){return typeof _=="function"?_(t):_}
export{G as useCallback,J as useContext,K as useDebugValue,z as useEffect,O as useErrorBoundary,Q as useId,M as useImperativeHandle,S as useLayoutEffect,T as useMemo,R as useReducer,L as useRef,I as useState};
//# sourceMappingURL=hooks.js.map

View File

@ -0,0 +1,7 @@
/* esm.sh - esbuild bundle(preact@10.20.2/jsx-runtime) es2022 production */
import{options as c,Fragment as _}from"./compat.js";
import{Fragment as C}from"./compat.js";
var v=/["&<]/;function p(t){if(t.length===0||v.test(t)===!1)return t;for(var r=0,e=0,a="",o="";e<t.length;e++){switch(t.charCodeAt(e)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}e!==r&&(a+=t.slice(r,e)),a+=o,r=e+1}return e!==r&&(a+=t.slice(r,e)),a}var y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=0,x=Array.isArray;function g(t,r,e,a,o,i){var s,n,f={};for(n in r)n=="ref"?s=r[n]:f[n]=r[n];var u={type:t,props:f,key:e,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--d,__i:-1,__u:0,__source:o,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(n in s)f[n]===void 0&&(f[n]=s[n]);return c.vnode&&c.vnode(u),u}function h(t){var r=g(_,{tpl:t,exprs:[].slice.call(arguments,1)});return r.key=r.__v,r}var l={},m=/[A-Z]/g;function k(t,r){if(c.attr){var e=c.attr(t,r);if(typeof e=="string")return e}if(t==="ref"||t==="key")return"";if(t==="style"&&typeof r=="object"){var a="";for(var o in r){var i=r[o];if(i!=null&&i!==""){var s=o[0]=="-"?o:l[o]||(l[o]=o.replace(m,"-$&").toLowerCase()),n=";";typeof i!="number"||s.startsWith("--")||y.test(s)||(n="px;"),a=a+s+":"+i+n}}return t+'="'+a+'"'}return r==null||r===!1||typeof r=="function"||typeof r=="object"?"":r===!0?t:t+'="'+p(r)+'"'}function b(t){if(t==null||typeof t=="boolean"||typeof t=="function")return null;if(typeof t=="object"){if(t.constructor===void 0)return t;if(x(t)){for(var r=0;r<t.length;r++)t[r]=b(t[r]);return t}}return p(""+t)}
export{C as Fragment,g as jsx,k as jsxAttr,g as jsxDEV,b as jsxEscape,h as jsxTemplate,g as jsxs};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,9 @@
import * as TW from "./twind/core.js";
import {presetAutoprefix, presetTailwind} from "./twind/presets.js"
import * as BUNDLE from "./preact/compat.js";
const Configure =
{
theme: {},
@ -7,10 +11,4 @@ const Configure =
hash: false
} as TW.TwindUserConfig;
//console.log(TW.install(Configure));
import * as LOL from "react";
console.log(LOL.jsx)
console.log(TW.install(Configure));

1114
bundled/twind/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

View File

@ -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"@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)}})}
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)}})}
/* esm.sh - esbuild bundle(style-vendorizer@2.2.3) denonext production */

View File

@ -169,9 +169,8 @@ 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`;
importMap["@twind/core"] = `https://esm.sh/v126/@twind/core@1.1.3/es2022/core.mjs`;
importMap[">able/"] = `${RootHost}`;
if(!importMap[">able/app.tsx"])
{
@ -200,8 +199,7 @@ export async function Check()
const optionsRequired =
{
"lib": ["deno.window", "dom", "dom.iterable", "dom.asynciterable"],
"jsx": "react-jsx",
"jsxImportSource": "react"
"jsx": "react-jsx"
}
const optionsCurrent = config.json.compilerOptions as Record<string, string|string[]> || {};
//const compLib:string[] = compOpts.lib as string[] || [];

View File

@ -1,26 +1,28 @@
{
"imports": {
"react": "https://esm.sh/preact@10.20.2/compat",
"react/jsx-runtime": "https://esm.sh/stable/preact@10.20.2/es2022/jsx-runtime.js",
"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/core": "https://esm.sh/@twind/core@1.1.3",
"imports": {
">able/": "./",
">able/app.tsx": "./app.tsx"
},
"tasks": {
"check": "deno run -A --no-lock ./cli.tsx check",
"local": "deno run -A --no-lock ./cli.tsx local",
"debug": "deno run -A --no-lock ./cli.tsx debug",
"serve": "deno run -A --no-lock ./cli.tsx serve",
"cloud": "deno run -A --no-lock ./cli.tsx cloud",
"install": "deno install -A -r -f -n able ./cli.tsx"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react",
"lib": ["deno.window", "dom", "dom.iterable", "dom.asynciterable"]
}
}
"react": "https://esm.sh/preact@10.20.2/compat",
"react-original": "https://esm.sh/preact@10.20.2/compat",
"react-original/": "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",
"signals-original": "https://esm.sh/@preact/signals@1.2.3?deps=preact@10.20.2",
"@twind/": "http://localhost:4507/bundled/twind/",
">able/": "./",
">able/app.tsx": "./app.tsx"
},
"tasks": {
"check": "deno run -A --no-lock ./cli.tsx check",
"local": "deno run -A --no-lock ./cli.tsx local",
"debug": "deno run -A --no-lock ./cli.tsx debug",
"serve": "deno run -A --no-lock ./cli.tsx serve",
"cloud": "deno run -A --no-lock ./cli.tsx cloud",
"install": "deno install -A -r -f -n able ./cli.tsx"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react",
"lib": ["deno.window", "dom", "dom.iterable", "dom.asynciterable"]
}
}

View File

@ -31,7 +31,7 @@ export const HMR =
RegisteredComponents: new Map() as Map<string, ()=>void>,
statesNew: new Map() as Map<string, StateCapture>,
statesOld: new Map() as Map<string, StateCapture>,
wireframe: false,
wireframe: true,
RegisterComponent(reactID:string, value:()=>void):void
{
this.RegisteredComponents.set(reactID, value);

View File

@ -1,13 +1,12 @@
import React from "react";
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 TW from "@twind/core.js";
import * as Pre from "@twind/presets.js";
import * as App from ">able/app.tsx";
const Configure =
{
theme: {},
presets: [PreAutoprefix(), PreTailwind()],
presets: [Pre.presetAutoprefix(), Pre.presetTailwind()],
hash: false
} as TW.TwindUserConfig;

View File

@ -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 "https://esm.sh/preact-render-to-string@6.4.2?deps=preact@10.20.2";
import SSR from "https://esm.sh/preact-render-to-string@6.4.2?external=react&alias=preact:react";
import { HuntConfig, Root } from "./checker.tsx";
import CustomServe from ">able/api.tsx";
@ -196,6 +196,7 @@ export default async()=>
const User = await import("./run-browser.tsx");
markup = SSR(<User.CustomApp/>);
const {css, html} = User.CustomTwindExtractor(markup);
console.log(css);
markup = html;
styles = css;
}