diff --git a/.vscode/launch.json b/.vscode/launch.json index 4f095a0..12221d3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -20,6 +20,22 @@ "smartStep": true, "skipFiles": ["/**", "**/node_modules/**"], "cwd": "${workspaceFolder}" + }, + + { + "type": "node", + "request": "launch", + "name": "Launch Sample Emitter", + "skipFiles": ["/**"], + "program": "${workspaceFolder}/samples/client-emitter/dist/src/index.js", + "outFiles": ["${workspaceFolder}/**/*.js"], + "smartStep": true, + "console": "internalConsole", + "outputCapture": "std", + "autoAttachChildProcesses": true, + "env": { + "FORCE_COLOR": "3" + }, } ] } diff --git a/packages/core/src/components/Slot.tsx b/packages/core/src/components/Slot.tsx deleted file mode 100644 index 7820f7e..0000000 --- a/packages/core/src/components/Slot.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { OutputSymbol } from "../binder.js"; -import { Children } from "../jsx-runtime.js"; -import { isRefkey, refkey, Refkey } from "../refkey.js"; - -export interface SlotProps { - id: string; - phase: "wrap" | "before" | "after"; - refkey?: Refkey; - symbol?: OutputSymbol; - children?: Children; -} - -export function Slot(props: SlotProps) { - const slotContent = getSlotContent(props); -} - -export function slot(id: string, refkey: Refkey | undefined, children: Children) { - return - {children} - -} - -interface GetSlotContentOptions { - id: string; - phase: "wrap" | "before" | "after"; - refkey?: Refkey; -} - -function getSlotContent(options: GetSlotContentOptions) { - const hooks = []; - for () -} - -type Hook = RenameHook; - -interface HookBase { - kind: string; -} - -interface RenameHook extends HookBase { - kind: "rename", - getName(oldName: string): string; -} - -const RefkeyHooks = new Map(); -const SymbolHooks = new Map(); -const SlotHooks = new Map(); - -export function rename( - target: Refkey | OutputSymbol | string, - name: string | ((oldName: string) => string) -) { - if (typeof name === "string") { - const fixedName = name; - name = () => fixedName; - } - - if (isRefkey(target)) { - RefkeyHooks.set(target, [{ - kind: "rename", - getName: name - }]); - } -} \ No newline at end of file diff --git a/packages/core/src/debug.ts b/packages/core/src/debug.ts index 617cffc..3b81276 100644 --- a/packages/core/src/debug.ts +++ b/packages/core/src/debug.ts @@ -18,12 +18,7 @@ const debug: DebugInterface = { component: { stack: debugStack, tree() { - for (let i = 0; i < 240; i += 10) { - for (let j = 0; j < 240; j += 10) { - process.stdout.write(chalk.bgRgb(i, j, 0)(" ")); - } - process.stdout.write("\n"); - } + console.log("tree"); }, watch() { console.log("watch");