commit ee537a781bdad5500ec56b67b58fb6b02b1e56d0 Author: Seth Trowbridge Date: Sun Oct 19 16:22:47 2025 -0400 init diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..5b320c2 --- /dev/null +++ b/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "dev": "deno run --watch main.ts" + }, + "imports": { + "@std/assert": "jsr:@std/assert@1" + } +} diff --git a/main.ts b/main.ts new file mode 100644 index 0000000..eaccc1a --- /dev/null +++ b/main.ts @@ -0,0 +1,34 @@ +type EnumDefinition = Record; +type EnumBlock = Record; + +function Block(options:Fields):{[F in keyof Fields]:{[E in keyof Fields[F]]:Fields}} +{ + const list = []; + let fieldLookup = {}; + + const proxyOuter = new Proxy({}, {get(_target, propName){ + fieldLookup = options[propName]; + list.push(fieldLookup._); + return proxyInner + }}); + + const proxyInner = new Proxy({}, {get(_target, valName){ + list.push(`:${fieldLookup[valName]};`); + console.log(list); + return proxyOuter; + }}); + + return proxyOuter; +} + +const styles = Block({ + Pos:{_:"position", Abs:"absolute", Rel:"relative"}, + Display:{_:"display", Flex:"flex", Grid:"grid", None:"none", Block:"block", InlineBlock:"inline-block"} +}); + +export default styles + +function Sheet>(userClasses:UserClasses):{[Class in keyof UserClasses]:string} +{ + return new Proxy({}, {get(_target, className){}}); +} diff --git a/main_test.ts b/main_test.ts new file mode 100644 index 0000000..2a2c038 --- /dev/null +++ b/main_test.ts @@ -0,0 +1,10 @@ +import * as Test from "@std/assert"; + +Deno.test(function() + { + + Test.assertEquals(); + } +); + +