[
  {
    "path": ".github/workflows/main.yml",
    "content": "name: CI\non:\n  - push\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n      - uses: pnpm/action-setup@v4\n        with:\n          version: 8\n          run_install: true\n\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: \"pnpm\"\n\n      - name: Clean\n        run: pnpm recursive run clean\n        env:\n          CI: true\n\n      - name: Build\n        run: pnpm recursive run build\n        env:\n          CI: true\n\n      - name: Begin Tests\n        run: pnpm recursive run test\n        env:\n          CI: true\n"
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# next.js build output\n.next\n\n# nuxt.js build output\n.nuxt\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless\n\n# FuseBox cache\n.fusebox/\n\ndist\n.DS_Store"
  },
  {
    "path": ".npmrc",
    "content": "strict-peer-dependencies=false\nprefer-workspace-packages=true\nlink-workspace-packages=true"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"editor.defaultFormatter\": \"biomejs.biome\",\n  \"[typescript]\": {\n    \"editor.defaultFormatter\": \"biomejs.biome\"\n  },\n  \"[typescriptreact]\": {\n    \"editor.defaultFormatter\": \"biomejs.biome\"\n  },\n  \"[javascript]\": {\n    \"editor.defaultFormatter\": \"biomejs.biome\"\n  },\n  \"[json]\": {\n    \"editor.defaultFormatter\": \"biomejs.biome\"\n  }\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2025 Alexis Munsayac\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "\n# `solid-labels`\n\n[![NPM](https://img.shields.io/npm/v/solid-labels.svg)](https://www.npmjs.com/package/solid-labels) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n\n<p align=\"center\">\n  <img\n    src=\"https://github.com/LXSMNSYC/solid-labels/blob/main/images/ctf.png?raw=true\"\n    alt=\"Example\"\n    style=\"width: 80%; height: auto;\"\n  />\n</p>\n\n## Install\n\n```bash\nnpm install solid-labels\n```\n\n```bash\nyarn add solid-labels\n```\n\n```bash\npnpm add solid-labels\n```\n\n## Features\n\n- 🏷 Labels: Turn labels into SolidJS utility calls!\n- 💬 Comments: Turn comments into SolidJS utility calls, too!\n- ⏱ Compile-time Functions: Use functions that are evaluated during compile-time!\n- 📦 Auto Imports: No need to import SolidJS utilities, explicitly!\n- 🤝 JS and TS Friendly!\n\n## Usage\n\n- [Labels](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/labels.md)\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-labels/tree/main/examples/labels)\n- [Comments](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/comments.md)\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-labels/tree/main/examples/comments)\n- [Compile-Time Functions](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/ctf.md)\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-labels/tree/main/examples/ctf)\n- [Solid Namespace](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/namespace.md)\n\n### Typescript\n\n`<any file>.d.ts`\n\n```ts\n/// <reference types=\"solid-labels\" />\n```\n\n### Babel\n\n`.babelrc`\n\n```json\n{\n  \"plugins\": [\n    [\"solid-labels/babel\", { \"dev\": false }]\n  ]\n}\n```\n\n[!INFO]: You don't have to use this if you're using Vite or Rollup plugins\n\n## Integrations\n\n- [Vite](https://github.com/lxsmnsyc/solid-labels/tree/main/packages/vite)\n- [Rollup](https://github.com/lxsmnsyc/solid-labels/tree/main/packages/rollup)\n- [Unplugin](https://github.com/lxsmnsyc/solid-labels/tree/main/packages/unplugin)\n\n### Disabling features\n\nYou can disable some features by passing `disabled` option to the plugin options.\n\n```js\n{\n  disabled: {\n    labels: {\n      signal: true,\n    },\n    pragma: {\n      '@signal': true,\n    },\n    ctf: {\n      $signal: true,\n    },\n  }\n}\n```\n\n## Limitations\n\n- Detecting shadowed identifier for `signal` and `memo`.\n\n## Sponsors\n\n![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)\n\n## License\n\nMIT © [lxsmnsyc](https://github.com/lxsmnsyc)\n"
  },
  {
    "path": "biome.json",
    "content": "{\n  \"$schema\": \"https://unpkg.com/@biomejs/biome/configuration_schema.json\",\n  \"files\": {\n    \"ignore\": [\"node_modules/**/*\"]\n  },\n  \"vcs\": {\n    \"useIgnoreFile\": true\n  },\n  \"linter\": {\n    \"enabled\": true,\n    \"ignore\": [\"node_modules/**/*\"],\n    \"rules\": {\n      \"recommended\": true,\n      \"a11y\": {\n        \"noAriaHiddenOnFocusable\": \"off\",\n        \"useIframeTitle\": \"warn\",\n        \"useKeyWithClickEvents\": \"warn\",\n        \"useKeyWithMouseEvents\": \"warn\"\n      },\n      \"complexity\": {\n        \"noForEach\": \"error\",\n        \"noVoid\": \"off\",\n        \"useOptionalChain\": \"warn\",\n        \"useSimplifiedLogicExpression\": \"error\"\n      },\n      \"correctness\": {\n        \"noConstantMathMinMaxClamp\": \"error\",\n        \"noInvalidNewBuiltin\": \"error\",\n        \"noNewSymbol\": \"error\",\n        \"noNodejsModules\": \"off\",\n        \"noUndeclaredDependencies\": \"off\",\n        \"noUndeclaredVariables\": \"error\",\n        \"noUnusedFunctionParameters\": \"error\",\n        \"noUnusedImports\": \"error\",\n        \"noUnusedPrivateClassMembers\": \"error\",\n        \"noUnusedVariables\": \"error\",\n        \"useArrayLiterals\": \"error\"\n      },\n      \"performance\": {\n        \"noAccumulatingSpread\": \"error\",\n        \"useTopLevelRegex\": \"error\"\n      },\n      \"security\": {\n        \"noGlobalEval\": \"off\"\n      },\n      \"style\": {\n        \"noArguments\": \"error\",\n        \"noImplicitBoolean\": \"error\",\n        \"noInferrableTypes\": \"error\",\n        \"noNamespace\": \"error\",\n        \"noNegationElse\": \"error\",\n        \"noRestrictedGlobals\": \"error\",\n        \"noShoutyConstants\": \"error\",\n        \"noUnusedTemplateLiteral\": \"error\",\n        \"noUselessElse\": \"error\",\n        \"noVar\": \"error\",\n        \"noYodaExpression\": \"error\",\n        \"useAsConstAssertion\": \"error\",\n        \"useBlockStatements\": \"error\",\n        \"useCollapsedElseIf\": \"error\",\n        \"useConsistentArrayType\": \"error\",\n        \"useConsistentBuiltinInstantiation\": \"error\",\n        \"useConst\": \"error\",\n        \"useDefaultParameterLast\": \"error\",\n        \"useEnumInitializers\": \"error\",\n        \"useExponentiationOperator\": \"error\",\n        \"useExportType\": \"error\",\n        \"useFragmentSyntax\": \"error\",\n        \"useForOf\": \"warn\",\n        \"useImportType\": \"error\",\n        \"useLiteralEnumMembers\": \"error\",\n        \"useNodejsImportProtocol\": \"warn\",\n        \"useNumberNamespace\": \"error\",\n        \"useNumericLiterals\": \"error\",\n        \"useSelfClosingElements\": \"error\",\n        \"useShorthandArrayType\": \"error\",\n        \"useShorthandAssign\": \"error\",\n        \"useShorthandFunctionType\": \"warn\",\n        \"useSingleCaseStatement\": \"error\",\n        \"useSingleVarDeclarator\": \"error\",\n        \"useTemplate\": \"off\",\n        \"useWhile\": \"error\"\n      },\n      \"suspicious\": {\n        \"noConsoleLog\": \"warn\",\n        \"noConstEnum\": \"off\",\n        \"noDebugger\": \"off\",\n        \"noEmptyBlockStatements\": \"error\",\n        \"noExplicitAny\": \"warn\",\n        \"noImplicitAnyLet\": \"off\",\n        \"noMisrefactoredShorthandAssign\": \"off\",\n        \"noSelfCompare\": \"off\",\n        \"noSparseArray\": \"off\",\n        \"noThenProperty\": \"warn\",\n        \"useAwait\": \"error\",\n        \"useErrorMessage\": \"error\"\n      }\n    }\n  },\n  \"formatter\": {\n    \"enabled\": true,\n    \"ignore\": [\"node_modules/**/*\"],\n    \"formatWithErrors\": false,\n    \"indentWidth\": 2,\n    \"indentStyle\": \"space\",\n    \"lineEnding\": \"lf\",\n    \"lineWidth\": 80\n  },\n  \"organizeImports\": {\n    \"enabled\": true,\n    \"ignore\": [\"node_modules/**/*\"]\n  },\n  \"javascript\": {\n    \"formatter\": {\n      \"enabled\": true,\n      \"arrowParentheses\": \"asNeeded\",\n      \"bracketSameLine\": false,\n      \"bracketSpacing\": true,\n      \"indentWidth\": 2,\n      \"indentStyle\": \"space\",\n      \"jsxQuoteStyle\": \"double\",\n      \"lineEnding\": \"lf\",\n      \"lineWidth\": 80,\n      \"quoteProperties\": \"asNeeded\",\n      \"quoteStyle\": \"single\",\n      \"semicolons\": \"always\",\n      \"trailingCommas\": \"all\"\n    },\n    \"globals\": [],\n    \"parser\": {\n      \"unsafeParameterDecoratorsEnabled\": true\n    }\n  },\n  \"json\": {\n    \"formatter\": {\n      \"enabled\": true,\n      \"indentWidth\": 2,\n      \"indentStyle\": \"space\",\n      \"lineEnding\": \"lf\",\n      \"lineWidth\": 80\n    },\n    \"parser\": {\n      \"allowComments\": false,\n      \"allowTrailingCommas\": false\n    }\n  }\n}\n"
  },
  {
    "path": "docs/comments.md",
    "content": "# Comments\n\n## Utilities\n\n### `@signal`\n\nTransforms into `createSignal`:\n\n```js\nfunction Counter() {\n  // @signal\n  let x = 0;\n\n  function increment() {\n    x += 1;\n  }\n\n  return () => x;\n}\n```\n\nbecomes\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  const [_x, _setx] = _createSignal(0);\n\n  function increment() {\n    _setx(_current => _current += 1);\n  }\n\n  return () => _x();\n}\n```\n\nChained variable declaration is also supported.\n\n```js\n// @signal\nlet x = 0, y = 0, z = 0;\n```\n\n### `@memo`\n\nTransforms into `createMemo`:\n\n```js\nfunction Counter() {\n  // @signal\n  let x = 0;\n  // @memo\n  const message = `Count: ${x}`;\n\n  return () => message;\n}\n```\n\nbecomes\n\n```js\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  //\n  let [_x, _setx] = _createSignal(0, {\n    name: \"x\"\n  }); //\n\n\n  const _message = _createMemo(() => `Count: ${_x()}`, undefined, {\n    name: \"message\"\n  });\n\n  return () => _message();\n}\n```\n\nChained variable declaration is also supported.\n\n```js\n// @memo\nconst y = x + 10, z = y / 10;\n```\n\n### `@effect`, `@computed` and `@renderEffect`\n\nTransforms into `createEffect`, `createComputed` and `createRenderEffect`, respectively.\n\n```js\nfunction Counter() {\n  // @signal\n  let x = 0;\n\n  /* @effect */ {\n    console.log('Count', x);\n  }\n  /* @computed */ {\n    console.log('Count', x);\n  }\n  /* @renderEffect */ {\n    console.log('Count', x);\n  }\n}\n```\n\ninto\n\n```js\nimport { createRenderEffect as _createRenderEffect } from \"solid-js\";\nimport { createComputed as _createComputed } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  const [_x, _setx] = _createSignal(0);\n\n  _createEffect(() => {\n    console.log('Count', _x());\n  });\n\n  _createComputed(() => {\n    console.log('Count', _x());\n  });\n\n  _createRenderEffect(() => {\n    console.log('Count', _x());\n  });\n}\n```\n\nYou may use an arrow function instead of a block statement to accepts the previously returned value.\n\n`@effect`, `@computed` and `@renderEffect` can also be named:\n\n```js\n// @signal\nlet x = 0;\n\n/* @effect Effect Log */ {\n  console.log('Count', x);\n}\n/* @computed Computed Log */ {\n  console.log('Count', x);\n}\n/* @renderEffect Render Effect Log */ {\n  console.log('Count', x);\n}\n```\n\n```js\nimport { createRenderEffect as _createRenderEffect } from \"solid-js\";\nimport { createComputed as _createComputed } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\n//\nlet [_x, _setx] = _createSignal(0);\n/**/\n\n\n_createEffect(() => {\n  console.log('Count', _x());\n}, undefined, {\n  name: \"Effect Log\"\n});\n/**/\n\n\n_createComputed(() => {\n  console.log('Count', _x());\n}, undefined, {\n  name: \"Computed Log\"\n});\n/**/\n\n\n_createRenderEffect(() => {\n  console.log('Count', _x());\n}, undefined, {\n  name: \"Render Effect Log\"\n});\n```\n\n### `@mount`, `@cleanup` and `@error`\n\nTransforms into `onMount`, `onCleanup` and `onError`.\n\n```js\nfunction Counter() {\n  /* @mount */ {\n    console.log('Mounted!');\n  }\n  /* @cleanup */ {\n    console.log('Cleaned!');\n  }\n  /* @error */ {\n    console.log('Something went wrong.');\n  }\n}\n```\n\ninto\n\n```js\nimport { onError as _onError } from \"solid-js\";    \nimport { onCleanup as _onCleanup } from \"solid-js\";\nimport { onMount as _onMount } from \"solid-js\";    \n\nfunction Counter() {\n  _onMount(() => {\n    console.log('Mounted!');\n  });\n\n  _onCleanup(() => {\n    console.log('Cleaned!');\n  });\n\n  _onError(() => {\n    console.log('Something went wrong.');\n  });\n}\n```\n\nYou may also use an arrow function. For `onError`, an arrow function with a parameter may be used to receive the error object.\n\n### `@untrack` and `@batch`\n\nTransforms into `untrack` and `batch`.\n\n```js\nfunction Counter() {\n  /* @batch */ {\n    console.log('This is batched!');\n  }\n  /* @untrack */ {\n    console.log('This is untracked!');\n  }\n}\n```\n\ninto\n\n```js\nimport { untrack as _untrack } from \"solid-js\";\nimport { batch as _batch } from \"solid-js\";\n\nfunction Counter() {\n  _batch(() => {\n    console.log('This is batched!');\n  });\n\n  _untrack(() => {\n    console.log('This is untracked!');\n  });\n}\n```\n\n### `@root`\n\nTransforms into `createRoot`\n\n```js\n/* @root */ {\n  element = renderComponent(MyComponent);\n}\n```\n\ninto\n\n```js\nimport { createRoot as _createRoot } from \"solid-js\";\n\n_createRoot(() => {\n  element = renderComponent(MyComponent);\n});\n```\n\nYou can also pass an arrow function instead of a block to receive the `dispose` callback.\n\n### `@children`\n\nCompiles to `children`.\n\n```js\n// @children\nconst nodes = props.children;\n```\n\n```js\nimport { children as _children } from \"solid-js\";\n\n//\nconst _nodes = _children(() => props.children);\n```\n\n### `@deferred`\n\nCompiles to `createDeferred`.\n\n```js\n// @signal\nlet searchInput = '';\n// @deferred\nlet deferredSearchInput = searchInput;\n\neffect: {\n  fetchResults(deferredSearchInput);\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createDeferred as _createDeferred } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\n//\nlet [_searchInput, _setsearchInput] = _createSignal('', {\n  name: \"searchInput\"\n}); //\n\n\nlet _deferredSearchInput = _createDeferred(() => _searchInput(), {\n  name: \"deferredSearchInput\"\n});\n\n_createEffect(() => {\n  fetchResults(_deferredSearchInput());\n});\n```\n\n### `@transition`\n\nCompiles to `startTransition`. Arrow function can be provided instead of blocks.\n\n```js\n// @signal\nlet data;\n\n/* @transition */ {\n  data = fetchData();\n}\n```\n\n```js\nimport { startTransition as _startTransition } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\n//\nlet [_data, _setdata] = _createSignal(undefined, {\n  name: \"data\"\n});\n/**/\n\n\n_startTransition(() => {\n  _setdata(() => fetchData());\n});\n```\n\n### `@destructure`\n\nDestructures an object while retaining reactivity. This partially compiles to `splitProps` if a rest expression is detected.\n\n`@destructure` also supports nested destructures.\n\nDoes not support default assignment.\n\n```js\n// @destructure\nlet { a: { b, c }, b: { d, e }, ...f } = x;\n\neffect: {\n  console.log(b, c);\n}\neffect: {\n  console.log(d, e);\n}\neffect: {\n  console.log(f);\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { splitProps as _splitProps } from \"solid-js\";\n//\nconst _prop = () => x.a,\n  _prop2 = () => _prop().b,\n  _prop3 = () => _prop().c,\n  _other2 = _splitProps(_prop(), [\"b\", \"c\"])[1],\n  _prop4 = () => x.b,\n  _prop5 = () => _prop4().d,\n  _prop6 = () => _prop4().e,\n  _other3 = _splitProps(_prop4(), [\"d\", \"e\"])[1],\n  _other = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log(_prop2(), _prop3());\n});\n_createEffect(() => {\n  console.log(_prop5(), _prop6());\n});\n_createEffect(() => {\n  console.log(_other);\n});\n```\n\n## Tooling\n\n### ESLint\n\n```json\n{\n  \"rules\": {\n    \"no-lone-blocks\": \"off\"\n  },\n}\n```\n"
  },
  {
    "path": "docs/ctf.md",
    "content": "# Compile-Time Functions\n\n## Reactivity\n\n### `$signal`\n\n```ts\nfunction $signal<T>(): T | undefined;\nfunction $signal<T>(\n  value: T,\n  options?: {\n    equals?: false | ((prev: T, next: T) => boolean);\n    name?: string;\n    internal?: boolean,\n  }\n): T;\n```\n\nCompiles into `createSignal`.\n\n```js\nlet count = $signal(0);\n```\n\nbecomes\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n```\n\n`$signal` is only allowed to be used on variable declarations, otherwise it raises a compile-time error.\n\n### `$memo`\n\n```ts\nfunction $memo<T>(\n  value: T,\n  options?: { equals?: false | ((prev: T, next: T) => boolean); name?: string }\n): T;\nfunction $memo<T>(\n  value: T,\n  options?: { equals?: false | ((prev: T, next: T) => boolean); name?: string }\n): T;\n```\n\nCompiles into `createMemo`.\n\n```js\nlet count = $signal(0);\nconst message = $memo(`Count: ${count}`);\n```\n\nbecomes\n\n```js\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst _message = _createMemo(() => `Count: ${_count()}`, undefined, {\n  name: \"message\"\n});\n```\n\n`$memo` is only allowed to be used on variable declarations, otherwise it raises a compile-time error.\n\n### `$`\n\n```ts\nfunction $<T>(value: T): T;\n```\n\nCompiles into `createMemo` when used in variable declarations, otherwise it compiles to `createEffect` when used in single-line statements. If used for other expressions, it raises a compile-time error.\n\n```js\nlet count = $signal(0);\nconst message = $(`Count: ${count}`);\n\n$(console.log(message));\n```\n\ncompiles into\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst _message = _createMemo(() => `Count: ${_count()}`, undefined, {\n  name: \"message\"\n});\n\n_createEffect(() => console.log(_message()));\n```\n\n### `$untrack` and `$batch`\n\n```ts\nfunction $untrack<T>(value: T): T;\nfunction $batch<T>(value: T): T;\n```\n\nCompiles into `untrack` and `batch`, respectively. Unlike `untrack` and `batch`, `$untrack` and `$batch` doesn't have to provide an arrow function.\n\n```js\nlet count = $signal(0);\n\neffect: {\n  console.log($untrack(count));\n\n  $batch(updateData(count));\n}\n```\n\ncompiles into\n\n```js\nimport { batch as _batch } from \"solid-js\";\nimport { untrack as _untrack } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\n_createEffect(() => {\n  console.log(_untrack(() => _count()));\n\n  _batch(() => updateData(_count()));\n});\n```\n\n### `$effect`, `$computed` and `$renderEffect`\n\n```ts\nfunction $effect<T>(fn: (v?: T) => T | undefined): void;\nfunction $effect<T>(fn: (v: T) => T, value: T, options?: { name?: string }): void;\n\nfunction $computed<T>(fn: (v?: T) => T | undefined): void;\nfunction $computed<T>(fn: (v: T) => T, value: T, options?: { name?: string }): void;\n\nfunction $renderEffect<T>(fn: (v?: T) => T | undefined): void;\nfunction $renderEffect<T>(fn: (v: T) => T, value: T, options?: { name?: string }): void;\n```\n\nCompiles to `createEffect`, `createComputed` and `createRenderEffect`, respectively.\n\n```js\nlet x = $signal(0);\n\n$effect(() => {\n  console.log('Count', x);\n});\n$computed(() => {\n  console.log('Count', x);\n});\n$renderEffect(() => {\n  console.log('Count', x);\n});\n```\n\n```js\nimport { createRenderEffect as _createRenderEffect } from \"solid-js\";\nimport { createComputed as _createComputed } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_x, _setx] = _createSignal(0, {\n  name: \"x\"\n});\n\n_createEffect(() => {\n  console.log('Count', _x());\n});\n\n_createComputed(() => {\n  console.log('Count', _x());\n});\n\n_createRenderEffect(() => {\n  console.log('Count', _x());\n});\n```\n\n### `$root`\n\n```ts\nfunction $root<T>(value: T): T;\nfunction $root<T>(cb: (dispose: () => void) => T): T;\n```\n\nCompiles to `createRoot`. Can be called inline. Arrow function is automatically injected if not provided.\n\n```js\nconst cleanup = $root((dispose) => {\n  renderApp();\n  return dispose;\n});\n\n$root(renderApp());\n```\n\n```js\nimport { createRoot as _createRoot } from \"solid-js\";\n\nconst cleanup = _createRoot(dispose => {\n  renderApp();\n  return dispose;\n});\n\n_createRoot(() => renderApp());\n```\n\n### `$selector`\n\n```ts\nfunction $selector<T, U>(\n  source: T,\n  fn?: (a: U, b: T) => boolean,\n  options?: { name?: string }\n): (key: U) => boolean;\n```\n\nCompiles to `createSelector`. Automatically injects arrow function to `source`.\n\n```js\nlet selectedID = $signal();\n\nlet isSelected = $selector(selectedID);\n\neffect: {\n  if (isSelected(userID)) {\n    selectUser(userID);\n  }\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSelector as _createSelector } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_selectedID, _setselectedID] = _createSignal(undefined, {\n  name: \"selectedID\"\n});\n\nlet isSelected = _createSelector(() => _selectedID());\n\n_createEffect(() => {\n  if (isSelected(userID)) {\n    selectUser(userID);\n  }\n});\n```\n\n### `$on`\n\n```ts\nfunction $on<T, U>(\n  deps: T,\n  fn: (input: T, prevInput: T, prevValue?: U) => U,\n  options?: { defer?: boolean }\n): (prevValue?: U) => U;\n```\n\nCompiles to `on`. Arrow function is automatically injected to `deps`.\n\n```js\nlet selectedID = $signal();\n\neffect: $on(selectedID, (value) => {\n  if (userID === value) {\n    selectUser(userID);\n  }\n})\n```\n\n```js\nimport { on as _on } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_selectedID, _setselectedID] = _createSignal(undefined, {\n  name: \"selectedID\"\n});\n\n_createEffect(_on(() => _selectedID(), value => {\n  if (userID === value) {\n    selectUser(userID);\n  }\n}));\n```\n\n### `$deferred`\n\n```ts\nfunction $deferred<T>(\n  source: T,\n  options?: {\n    equals?: false | ((prev: T, next: T) => boolean);\n    name?: string;\n    timeoutMs?: number;\n  },\n): T;\n```\n\nCompiles to `createDeferred`. Automatically injects arrow function to `source`. Automatically treats variable reads as accessor calls like `$memo`. Can only be called in variable declarations.\n\n```js\nlet searchInput = $signal('');\nlet deferredSearchInput = $deferred(searchInput);\n\neffect: {\n  fetchResults(deferredSearchInput);\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createDeferred as _createDeferred } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_searchInput, _setsearchInput] = _createSignal('', {\n  name: \"searchInput\"\n});\n\nlet _deferredSearchInput = _createDeferred(() => _searchInput(), {\n  name: \"deferredSearchInput\"\n});\n\n_createEffect(() => {\n  fetchResults(_deferredSearchInput());\n});\n```\n\n### `$resource`\n\nThis compile as an auto-import alias for `createResource`.\n\n### `$reaction`\n\nThis CTF is a compile-time alias for the `createReaction` utility that was added in 1.3.\n\n## Lifecycles\n\nThe following CTFs are compile-time aliases:\n\n- `$cleanup` -> `onCleanup`\n- `$mount` -> `onMount`\n- `$error` -> `onError`\n\n## Observables\n\n### `$observable`\n\n```ts\nfunction $observable<T>(value: T): Observable<T>;\n```\n\nCompiles to `observable`. Automatically injects arrow function to `value`.\n\n```js\nlet count = $signal(0);\nconst counter$ = $observable(count);\n```\n\n```js\nimport { observable as _observable } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst counter$ = _observable(() => _count());\n```\n\n### `$from`\n\n```ts\nfunction $from<T>(observable: Observable<T>): T;\nfunction $from<T>(produce: ((setter: Setter<T>) => () => void)): T;\n```\n\nCompiles to `from`. Automatically treats variable reads as accessor calls like `$memo`.\n\n```js\nlet count = $signal(0);\nconst counter$ = $observable(count);\nconst counter = $from(counter$);\n\neffect: {\n  console.log('Count:', counter);\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { from as _from } from \"solid-js\";\nimport { observable as _observable } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst counter$ = _observable(() => _count());\n\nconst _counter = _from(counter$);\n\n_createEffect(() => {\n  console.log('Count:', _counter());\n});\n```\n\n## Objects\n\n### `$destructure`\n\n```ts\nfunction $destructure<T>(value: T): T;\n```\n\nDestructures an object while retaining reactivity. This partially compiles to `splitProps` if a rest expression is detected.\n\n`$destructure` also supports nested destructures.\n\nDoes not support default assignment.\n\n```js\nlet { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\neffect: {\n  console.log(b, c);\n}\neffect: {\n  console.log(d, e);\n}\neffect: {\n  console.log(f);\n}\n```\n\n```js\nimport { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet _prop = () => x.a,\n  _prop2 = () => _prop().b,\n  _prop3 = () => _prop().c,\n  _other2 = _splitProps(_prop(), [\"b\", \"c\"])[1],\n  _prop4 = () => x.b,\n  _def = defaultD,\n  _prop5 = () => {\n    const _value = _prop4().d;\n    return _value === undefined ? _def : _value;\n  },\n  _def2 = defaultE,\n  _prop6 = () => {\n    const _value2 = _prop4().e;\n    return _value2 === undefined ? _def2 : _value2;\n  },\n  _other3 = _splitProps(_prop4(), [\"d\", \"e\"])[1],\n  _other = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log(_prop2(), _prop3());\n});\n_createEffect(() => {\n  console.log(_prop5(), _prop6());\n});\n_createEffect(() => {\n  console.log(_other);\n});\n```\n\n### `$merge`\n\n```ts\nfunction $merge<T extends any[]>(...args: T): MergeProps<T>;\n```\n\nMerges one or more objects while retaining reactivity. Compiles to `mergeProps`.\n\n```js\nconst mergedObject = $merge(a, b, c, d);\n```\n\n```js\nimport { mergeProps as _mergeProps } from \"solid-js\";\n\nconst mergedObject = _mergeProps(a, b, c, d);\n```\n\n### `$component`\n\nA compile-time function used to wrap components and implicitly allow prop destructuring, much like `$destructure`.\n\n```js\n$component(({ [x]: { y, ...z } = { y: 10 }, ...a }) => (\n  <>\n    {y}\n    {z}\n    {a}\n  </>\n))\n```\n\n```js\nimport { mergeProps as _mergeProps } from \"solid-js\";\nimport { splitProps as _splitProps } from \"solid-js\";\n_props => {\n  const _def = {\n      y: 10\n    },\n    _prop = () => {\n      const _value = _props[x];\n      return _value === undefined ? _def : _value;\n    },\n    _prop2 = () => _prop().y,\n    _other2 = _splitProps(_mergeProps(_prop(), _def), [\"y\"])[1],\n    _other = _splitProps(_props, [x])[1];\n  return <>\n    {_prop2()}\n    {_other2}\n    {_other}\n  </>;\n};\n```\n\n## Arrays\n\n### `$mapArray`\n\n```ts\nfunction $mapArray<T, U>(\n  arr: readonly T[] | undefined | null | false,\n  mapFn: (v: T, i: Accessor<number>) => U,\n  options?: {\n    fallback?: Accessor<any>;\n  },\n): U[];\n```\n\nCompiles to `mapArray`. Automatically treats variable reads as accessor calls like `$memo`. Automatically injects arrow function to `arr`.\n\n```js\nlet list = $signal([]);\nconst squaredList = $mapArray(list, (value) => value ** 2);\n\neffect: {\n  console.log('1st value', squaredList[0]);\n}\n\nlist = ['Hello'];\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { mapArray as _mapArray } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_list, _setlist] = _createSignal([], {\n  name: \"list\"\n});\n\nconst _squaredList = _mapArray(() => _list(), value => value ** 2);\n\n_createEffect(() => {\n  console.log('1st value', _squaredList()[0]);\n});\n\n_setlist(() => ['Hello']);\n```\n\n### `$indexArray`\n\n```ts\nfunction $indexArray<T, U>(\n  arr: readonly T[] | undefined | null | false,\n  mapFn: (v: Accessor<T>, i: number) => U,\n  options?: {\n    fallback?: Accessor<any>;\n  },\n): U[];\n```\n\nCompiles to `mapArray`. Automatically treats variable reads as accessor calls like `$memo`. Automatically injects arrow function to `arr`.\n\n```js\nlet list = $signal([]);\nconst squaredList = $indexArray(list, (value) => value() ** 2);\n\neffect: {\n  console.log('1st value', squaredList[0]);\n}\n\nlist = ['Hello'];\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { indexArray as _indexArray } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_list, _setlist] = _createSignal([], {\n  name: \"list\"\n});\n\nconst _squaredList = _indexArray(() => _list(), value => value() ** 2);\n\n_createEffect(() => {\n  console.log('1st value', _squaredList()[0]);\n});\n\n_setlist(() => ['Hello']);\n```\n\n## Component APIs\n\n### `$uid`\n\n```ts\nfunction $uid(): string;\n```\n\nCompiles to `createUniqueId` (Only available for Solid 1.1.0+)\n\n```js\nconst elementID = $uid();\n```\n\n```ts\nimport { createUniqueId as _createUniqueId } from \"solid-js\";\n\nconst elementID = _createUniqueId();\n```\n\n### `$lazy`\n\n```ts\nfunction $lazy<T extends Component<any>>(fn: Promise<{ default: T }>): T & {\n  preload: () => void;\n};\n```\n\nCompiles into `lazy`. Arrow function is automatically injected.\n\n```js\nconst LazyComponent = $lazy(import('./LazyComponent'));\n```\n\n```js\nimport { lazy as _lazy } from \"solid-js\";\n\nconst LazyComponent = _lazy(() => import('./LazyComponent'));\n```\n\n### `$children`\n\n```ts\nfunction $children(value: JSX.Element): JSX.Element;\n```\n\nCompiles to `children`. Arrow function is automatically injected.\n\n```js\nconst nodes = $children(props.children);\n```\n\n```js\nimport { children as _children } from \"solid-js\";\n\nconst _nodes = _children(() => props.children);\n```\n\n### Context\n\n```ts\nfunction $createContext<T>(): Context<T | undefined>;\nfunction $createContext<T>(defaultValue: T): Context<T>;\nfunction $useContext<T>(context: Context<T>): T;\n```\n\nCompiles to `createContext` and `useContext`.\n\n```js\nconst CounterContext = $createContext(0);\n\nconst value = $useContext(CounterContext);\n```\n\n```js\nimport { useContext as _useContext } from \"solid-js\";\nimport { createContext as _createContext } from \"solid-js\";\n\nconst CounterContext = _createContext(0);\n\nconst value = _useContext(CounterContext);\n```\n\n### Transition\n\n```ts\nfunction $startTransition(fn: () => unknown): Promise<void>\nfunction $useTransition(): Transition\n```\n\n### Owner\n\n```ts\nfunction $owner(): Owner | null\nfunction $runWithOwner<T>(o: Owner, fn: () => T): T\n```\n\nCompiles to `useTransition` and `startTransition`.\n\n## Refs and Derefs\n\nRef and Deref allows opting in and out of the labels syntax. This is useful for scenarios where we want to return the actual signal tuple instead of the signal value or when we have a third-party utility that we want to opt-into\n\n```ts\nfunction $derefSignal<T>(value: [Accessor<T>, Setter<T>]): T;\nfunction $refSignal<T>(value: T): [Accessor<T>, Setter<T>];\nfunction $derefMemo<T>(value: Accessor<T>): T;\nfunction $refMemo<T>(value: T): Accessor<T>;\n```\n\n### `$refSignal`\n\n`$refSignal` returns the signal tuple of a given signal variable.\n\n```js\nlet count = $signal(0);\nconst [value, setValue] = $refSignal(count);\n```\n\ncompiles into\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst [value, setValue] = [_count, _setcount];\n```\n\n`$refSignal` also works with `signal:` label and `@signal` comment.\n\n### `$refMemo`\n\n`$refMemo` returns the accessor of the given memo variable. This is similar to `() => memoVariable`.\n\n```js\nlet count = $signal(0);\nconst message = $memo(`Count: ${count}`);\nconst getMessage = $refMemo(message);\n\ngetMessage();\n```\n\ncompiles into\n\n```js\nimport { createMemo as _createMemo } from \"solid-js\";    \nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst _message = _createMemo(() => `Count: ${_count()}`, undefined, {\n  name: \"message\"\n});\n\nconst getMessage = _message;\ngetMessage();\n```\n\n`$refMemo` also works  with `memo:` label and `@memo` comment.\n\n### `$get` and `$set`\n\n```ts\nfunction $get<T>(value: T): Accessor<T>;\nfunction $set<T>(value: T): Setter<T>;\n```\n\n`$get` returns the accessor for a given signal or memo variable.\n\n```js\nlet count = $signal(0);\nconst message = $memo(`Count: ${count}`);\nconst getMessage = $get(message);\nconst getCount = $get(count);\n\ngetMessage();\ngetCount();\n```\n\ncompiles into\n\n```js\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst _message = _createMemo(() => `Count: ${_count()}`, undefined, {\n  name: \"message\"\n});\n\nconst getMessage = _message;\nconst getCount = _count;\ngetMessage();\ngetCount();\n```\n\n`$get` works with `signal:` and `memo:` labels as well as `@signal` and `@memo` comments.\n\n### `$set`\n\n`$set` returns the setter of the given signal variable.\n\n```js\nlet count = $signal(0);\nconst setCount = $set(count);\n\nsetCount(10);\n```\n\ncompiles into\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_count, _setcount] = _createSignal(0, {\n  name: \"count\"\n});\n\nconst setCount = _setcount;\nsetCount(10);\n```\n\n`$set` also works with `signal:` label and `@signal` comment.\n\n### `$derefSignal`\n\n`$derefSignal` converts any kind of signal tuple into a signal variable.\n\n```js\nlet count = $derefSignal(useCounter());\n\ncount += 10;\n```\n\ncompiles into\n\n```js\nlet [_count, _setcount] = useCounter();\n\n_setcount(_current => _current += 10);\n```\n\nYou can provide any kind of get/set tuples.\n\n```js\nlet value = $derefSignal([getValue, setValue]);\n\nvalue = newValue;\n\neffect: {\n  console.log(value);\n}\n```\n\n```js\nlet [_value, _setvalue] = [getValue, setValue];\n\n_setvalue(() => newValue);\n\n_createEffect(() => {\n  console.log(_value());\n});\n```\n\n### `$derefMemo`\n\n`$derefMemo` converts any kind of accessor into a memo variable.\n\n```js\nconst count = $derefMemo(useCounterValue());\n\neffect: {\n  console.log('Count:', count);\n}\n```\n\ncompiles into\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\n\nconst _count = useCounterValue();\n\n_createEffect(() => {\n  console.log('Count:', _count());\n});\n```\n\n## Reactive properties\n\n### `$getter`\n\nAssigns the given memo or signal ref to the property, transforming it into a getter property. Reading the property allows the assigned ref to be tracked.\n\n```js\nlet count = $signal(0);\n\nconst obj = {\n  count: $getter(count),\n};\n```\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\nconst _proto = {\n  get count() {\n    return this.__$get$count();\n  }\n};\nlet [_count, _setcount] = _createSignal(0);\nconst obj = {\n  __proto__: _proto,\n  __$get$count: _count\n};\n```\n\n### `$setter`\n\nAssigns the given signal ref to the property, transforming it into a setter property. Setting the property allows the assigned ref to be reactively updated.\n\n```js\nlet count = $signal(0);\n\nconst obj = {\n  count: $setter(count),\n};\n```\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\nconst _proto = {\n  set count(_param) {\n    this.__$set$count(() => _param);\n  }\n};\nlet [_count, _setcount] = _createSignal(0);\nconst obj = {\n  __proto__: _proto,\n  __$set$count: _setcount\n};\n```\n\n### `$property`\n\nA combination of `$getter` and `$setter`. For memo refs, this only outputs the getter property.\n\n```js\nlet count = $signal(0);\nconst message = $memo(`Count: ${count}`);\n\nconst obj = {\n  count: $property(count),\n  message: $property(message),\n};\n```\n\n```js\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\nconst _proto = {\n  get count() {\n    return this.__$get$count();\n  },\n  set count(_param) {\n    this.__$set$count(() => _param);\n  },\n  get message() {\n    return this.__$get$message();\n  }\n};\nlet [_count, _setcount] = _createSignal(0);\nconst _message = _createMemo(() => `Count: ${_count()}`);\nconst obj = {\n  __proto__: _proto,\n  __$get$count: _count,\n  __$set$count: _setcount,\n  __$get$message: _message\n};\n```\n\n## Store\n\nThese CTFs are based from `solid-js/store` exports.\n\n- `$store` -> `createStore`\n- `$mutable` -> `createMutable`\n- `$reconcile` -> `reconcile`\n- `$produce` -> `produce`\n- `$unwrap` -> `unwrap`\n\n## Components\n\nThese CTFs are auto-imported components from `solid-js` and `solid-js/web`. You can still use their original identifiers since those are already supported by `babel-preset-solid`.\n\n## Tooling\n\nOn any `d.ts` file, add a reference markup\n\n```ts\n/// <reference types=\"solid-labels\" />\n```\n\nAll CTFs are declared globally so there's no need to import.\n"
  },
  {
    "path": "docs/labels.md",
    "content": "# Labels\n\n## Utilities\n\n### `signal`\n\nTransforms into `createSignal`:\n\n```js\nfunction Counter() {\n  signal: x = 0;\n\n  function increment() {\n    x += 1;\n  }\n\n  return () => x;\n}\n```\n\nbecomes\n\n```js\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  const [_x, _setx] = _createSignal(0);\n\n  function increment() {\n    _setx(_current => _current += 1);\n  }\n\n  return () => _x();\n}\n```\n\nChained variable declaration is also supported.\n\n```js\nsignal: var x = 0, y = 0, z = 0;\n```\n\n### `memo`\n\nTransforms into `createMemo`:\n\n```js\nfunction Counter() {\n  signal: x = 0;\n  memo: message = `Count: ${x}`;\n\n  return () => message;\n}\n```\n\nbecomes\n\n```js\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  const [_x, _setx] = _createSignal(0, {\n    name: \"x\"\n  });\n\n  const _message = _createMemo(() => `Count: ${_x()}`, undefined, {\n    name: \"message\"\n  });\n\n  return () => _message();\n}\n```\n\nChained variable declaration is also supported.\n\n```js\nmemo: var y = x + 10, z = y / 10;\n```\n\n### `effect`, `computed` and `renderEffect`\n\nTransforms into `createEffect`, `createComputed` and `createRenderEffect`, respectively.\n\n```js\nfunction Counter() {\n  signal: x = 0;\n\n  effect: {\n    console.log('Count', x);\n  }\n  computed: {\n    console.log('Count', x);\n  }\n  renderEffect: {\n    console.log('Count', x);\n  }\n}\n```\n\ninto\n\n```js\nimport { createRenderEffect as _createRenderEffect } from \"solid-js\";\nimport { createComputed as _createComputed } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  const [_x, _setx] = _createSignal(0);\n\n  _createEffect(() => {\n    console.log('Count', _x());\n  });\n\n  _createComputed(() => {\n    console.log('Count', _x());\n  });\n\n  _createRenderEffect(() => {\n    console.log('Count', _x());\n  });\n}\n```\n\nYou may use an arrow function instead of a block statement to accept the previously returned value. If an expression (e.g. identifier, function call for `label: expr;`) is supplied, it compiles to `hook(expr)`.\n\nThey can also be named by adding another labeled statement:\n\n```js\nfunction Counter() {\n  signal: x = 0;\n\n  effect: effectLog: {\n    console.log('Count', x);\n  }\n  computed: computedLog: {\n    console.log('Count', x);\n  }\n  renderEffect: renderEffectLog: {\n    console.log('Count', x);\n  }\n}\n```\n\n```js\nimport { createRenderEffect as _createRenderEffect } from \"solid-js\";\nimport { createComputed as _createComputed } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nfunction Counter() {\n  const [_x, _setx] = _createSignal(0);\n\n  _createEffect(() => {\n    console.log('Count', _x());\n  }, undefined, {\n    name: \"effectLog\"\n  });\n\n  _createComputed(() => {\n    console.log('Count', _x());\n  }, undefined, {\n    name: \"computedLog\"\n  });\n\n  _createRenderEffect(() => {\n    console.log('Count', _x());\n  }, undefined, {\n    name: \"renderEffectLog\"\n  });\n}\n```\n\n### `$`\n\nSimilar to `memo` and `effect`, `$` compiles to `createMemo` for variable declaration, while `createEffect(() => expr)` for other kinds of expressions (including block statements). `$` is ideal for single-line effects.\n\n```js\nlet x = $signal(0);\n\n$: var y = x + 10;\n$: x = compute();\n$: {\n  console.log(x);\n}\n```\n\ncompiles into\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createMemo as _createMemo } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nlet [_x, _setx] = _createSignal(0, {\n  name: \"x\"\n});\n\nconst _y = _createMemo(() => _x() + 10, undefined, {\n  name: \"y\"\n});\n\n_createEffect(() => _setx(() => compute()));\n\n_createEffect(() => {\n  console.log(_x());\n});\n```\n\n### `mount`, `cleanup` and `error`\n\nTransforms into `onMount`, `onCleanup` and `onError`.\n\n```js\nfunction Counter() {\n  mount: {\n    console.log('Mounted!');\n  }\n  cleanup: {\n    console.log('Cleaned!');\n  }\n  error: {\n    console.log('Something went wrong.');\n  }\n}\n```\n\ninto\n\n```js\nimport { onError as _onError } from \"solid-js\";    \nimport { onCleanup as _onCleanup } from \"solid-js\";\nimport { onMount as _onMount } from \"solid-js\";    \n\nfunction Counter() {\n  _onMount(() => {\n    console.log('Mounted!');\n  });\n\n  _onCleanup(() => {\n    console.log('Cleaned!');\n  });\n\n  _onError(() => {\n    console.log('Something went wrong.');\n  });\n}\n```\n\nYou may also use an arrow function. For `onError`, an arrow function with a parameter may be used to receive the error object. If an expression (e.g. identifier, function call for `label: expr;`) is supplied, it compiles to `hook(expr)`.\n\n### `untrack` and `batch`\n\nTransforms into `untrack` and `batch`.\n\n```js\nfunction Counter() {\n  batch: {\n    console.log('This is batched!');\n  }\n  untrack: {\n    console.log('This is untracked!');\n  }\n}\n```\n\ninto\n\n```js\nimport { untrack as _untrack } from \"solid-js\";\nimport { batch as _batch } from \"solid-js\";\n\nfunction Counter() {\n  _batch(() => {\n    console.log('This is batched!');\n  });\n\n  _untrack(() => {\n    console.log('This is untracked!');\n  });\n}\n```\n\nYou may also use an arrow function. If an expression (e.g. identifier, function call for `label: expr;`) is supplied, it compiles to `hook(expr)`.\n\n### `root`\n\nTransforms into `createRoot`\n\n```js\nroot: {\n  element = renderComponent(MyComponent);\n}\n```\n\ninto\n\n```js\nimport { createRoot as _createRoot } from \"solid-js\";\n\n_createRoot(() => {\n  element = renderComponent(MyComponent);\n});\n```\n\nYou can also pass an arrow function instead of a block to receive the `dispose` callback. If an expression (e.g. identifier, function call for `label: expr;`) is supplied, it compiles to `hook(expr)`.\n\n### `children`\n\nCompiles to `children`.\n\n```js\nchildren: var nodes = props.children;\n```\n\n```js\nimport { children as _children } from \"solid-js\";\n\nconst _nodes = _children(() => props.children);\n```\n\n### `deferred`\n\nCompiles to `createDeferred`.\n\n```js\nsignal: var searchInput = '';\ndeferred: var deferredSearchInput = searchInput;\n\neffect: {\n  fetchResults(deferredSearchInput);\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createDeferred as _createDeferred } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nconst [_searchInput, _setsearchInput] = _createSignal('', {\n  name: \"searchInput\"\n});\n\nconst _deferredSearchInput = _createDeferred(() => _searchInput(), {\n  name: \"deferredSearchInput\"\n});\n\n_createEffect(() => {\n  fetchResults(_deferredSearchInput());\n});\n```\n\n### `transition`\n\nCompiles to `startTransition`. Arrow function can be provided instead of blocks.\n\n```js\nsignal: var data;\n\ntransition: {\n  data = fetchData();\n}\n```\n\n```js\nimport { startTransition as _startTransition } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\n\nconst [_data, _setdata] = _createSignal(undefined, {\n  name: \"data\"\n});\n\n_startTransition(() => {\n  _setdata(() => fetchData());\n});\n```\n\n### `destructure`\n\nDestructures an object while retaining reactivity. This partially compiles to `splitProps` if a rest expression is detected.\n\n`destructure` also supports nested destructures.\n\nDoes not support default assignment.\n\n```js\ndestructure: var { a: { b, c }, b: { d, e }, ...f } = x;\n\neffect: {\n  console.log(b, c);\n}\neffect: {\n  console.log(d, e);\n}\neffect: {\n  console.log(f);\n}\n```\n\n```js\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { splitProps as _splitProps } from \"solid-js\";\nconst _prop = () => x.a,\n  _prop2 = () => _prop().b,\n  _prop3 = () => _prop().c,\n  _other2 = _splitProps(_prop(), [\"b\", \"c\"])[1],\n  _prop4 = () => x.b,\n  _prop5 = () => _prop4().d,\n  _prop6 = () => _prop4().e,\n  _other3 = _splitProps(_prop4(), [\"d\", \"e\"])[1],\n  _other = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log(_prop2(), _prop3());\n});\n_createEffect(() => {\n  console.log(_prop5(), _prop6());\n});\n_createEffect(() => {\n  console.log(_other);\n});\n```\n\n## Tooling\n\n### TypeScript\n\n`tsconfig.json`\n\n```json\n{\n  \"compilerOptions\": {\n    \"allowUnusedLabels\": true,\n  }\n}\n```\n\nFor `signal` and `memo` sugar, you'll need to use `@ts-ignore` to suppress warnings for TS1344 when using strict mode.\n\n### ESLint\n\n```json\n{\n  \"rules\": {\n    \"no-var\": \"off\",\n    \"no-restricted-syntax\": \"off\",\n    \"no-labels\": \"off\",\n    \"vars-on-top\": \"off\",\n    \"no-unused-labels\": \"off\"\n  },\n}\n```\n"
  },
  {
    "path": "docs/namespace.md",
    "content": "# Namespace\n\n## `<solid:for>`\n\nAlias for [`<For>`](https://www.solidjs.com/docs/latest#%3Cfor%3E)\n\n```jsx\n<solid:for each={state.list} fallback={<div>Loading...</div>}>\n  {(item) => <div>{item}</div>}\n</solid:for>\n```\n\n```jsx\nimport { For as _For } from \"solid-js\";\n<_For each={state.list} fallback={<div>Loading...</div>}>\n  {item => <div>{item}</div>}\n</_For>;\n```\n\n## `<solid:index>`\n\nAlias for [`<Index>`](https://www.solidjs.com/docs/latest#%3Cindex%3E)\n\n```jsx\n<solid:index each={state.list} fallback={<div>Loading...</div>}>\n  {(item) => <div>{item()}</div>}\n</solid:index>\n```\n\n```jsx\nimport { Index as _Index } from \"solid-js\";\n<_Index each={state.list} fallback={<div>Loading...</div>}>\n  {item => <div>{item()}</div>}\n</_Index>;\n```\n\n## `<solid:switch>` and `<solid:match>`\n\nAlias for [`<Switch>` and `<Match>`](https://www.solidjs.com/docs/latest#%3Cswitch%3E%2F%3Cmatch%3E)\n\n```jsx\n<solid:switch fallback={<div>Not Found</div>}>\n  <solid:match when={state.route === \"home\"}>\n    <Home />\n  </solid:match>\n  <solid:match when={state.route === \"settings\"}>\n    <Settings />\n  </solid:match>\n</solid:switch>\n```\n\n```jsx\nimport { Match as _Match } from \"solid-js\";\nimport { Switch as _Switch } from \"solid-js\";\n<_Switch fallback={<div>Not Found</div>}>\n  <_Match when={state.route === \"home\"}>\n    <Home />\n  </_Match>\n  <_Match when={state.route === \"settings\"}>\n    <Settings />\n  </_Match>\n</_Switch>;\n```\n\n## `<solid:show>`\n\nAlias for [`<Show>`](https://www.solidjs.com/docs/latest#%3Cshow%3E)\n\n```jsx\n<solid:show when={state.user} fallback={<div>Loading...</div>}>\n  {(user) => <div>{user.firstName}</div>}\n</solid:show>\n```\n\n```jsx\nimport { Show as _Show } from \"solid-js\";\n<_Show when={state.user} fallback={<div>Loading...</div>}>\n  {user => <div>{user.firstName}</div>}\n</_Show>;\n```\n\n## `<solid:error-boundary>`\n\nAlias for [`<ErrorBoundary>`](https://www.solidjs.com/docs/latest#%3Cerrorboundary%3E)\n\n```jsx\n<solid:error-boundary\n  fallback={(err, reset) => <div onClick={reset}>Error: {err.toString()}</div>}\n>\n  <MyComp />\n</solid:error-boundary>\n```\n\n```jsx\nimport { ErrorBoundary as _ErrorBoundary } from \"solid-js\";\n<_ErrorBoundary fallback={(err, reset) => <div onClick={reset}>Error: {err.toString()}</div>}>\n  <MyComp />\n</_ErrorBoundary>;\n```\n\n## `<solid:suspense>`\n\nAlias for [`<Suspense>`](https://www.solidjs.com/docs/latest#%3Csuspense%3E)\n\n```jsx\n<solid:suspense fallback={<div>Loading...</div>}>\n  <AsyncComponent />\n</solid:suspense>\n```\n\n```jsx\nimport { Suspense as _Suspense } from \"solid-js\";\n<_Suspense fallback={<div>Loading...</div>}>\n  <AsyncComponent />\n</_Suspense>;\n```\n\n## `<solid:suspense-list>`\n\nAlias for [`<SuspenseList>`](https://www.solidjs.com/docs/latest#%3Csuspenselist%3E-(experimental))\n\n```jsx\n<solid:suspense-list revealOrder=\"forwards\" tail=\"collapsed\">\n  <ProfileDetails user={resource.user} />\n  <solid:suspense fallback={<h2>Loading posts...</h2>}>\n    <ProfileTimeline posts={resource.posts} />\n  </solid:suspense>\n  <solid:suspense fallback={<h2>Loading fun facts...</h2>}>\n    <ProfileTrivia trivia={resource.trivia} />\n  </solid:suspense>\n</solid:suspense-list>\n```\n\n```jsx\nimport { Suspense as _Suspense } from \"solid-js\";\nimport { SuspenseList as _SuspenseList } from \"solid-js\";\n<_SuspenseList revealOrder=\"forwards\" tail=\"collapsed\">\n  <ProfileDetails user={resource.user} />\n  <_Suspense fallback={<h2>Loading posts...</h2>}>\n    <ProfileTimeline posts={resource.posts} />\n  </_Suspense>\n  <_Suspense fallback={<h2>Loading fun facts...</h2>}>\n    <ProfileTrivia trivia={resource.trivia} />\n  </_Suspense>\n</_SuspenseList>;\n```\n\n## `<solid:dynamic>`\n\nAlias for [`<Dynamic>`](https://www.solidjs.com/docs/latest#%3Cdynamic%3E)\n\n```jsx\n<solid:dynamic component={state.component} someProp={state.something} />\n```\n\n```jsx\nimport { Dynamic as _Dynamic } from \"solid-js/web\";\n<_Dynamic component={state.component} someProp={state.something} />;\n```\n\n## `<solid:portal>`\n\nAlias for [`<Portal>`](https://www.solidjs.com/docs/latest#%3Cportal%3E)\n\n```jsx\n<solid:portal mount={document.getElementById(\"modal\")}>\n  <div>My Content</div>\n</solid:portal>\n```\n\n```jsx\nimport { Portal as _Portal } from \"solid-js/web\";\n<_Portal mount={document.getElementById(\"modal\")}>\n  <div>My Content</div>\n</_Portal>;\n```\n\n## `<solid:assets>`\n\nAlias for `<Assets>`\n\n```jsx\n<solid:assets>\n  <link rel=\"stylesheet\" href=\"/styles.css\" />\n</solid:assets>\n```\n\n```jsx\nimport { Assets as _Assets } from \"solid-js/web\";\n<_Assets>\n  <link rel=\"stylesheet\" href=\"/styles.css\" />\n</_Assets>;\n```\n\n## `<solid:hydration-script>`\n\nAlias for `<HydrationScript>`\n\n```jsx\nconst App = () => {\n  return (\n    <html lang=\"en\">\n      <head>\n        <title>🔥 Solid SSR 🔥</title>\n        <meta charset=\"UTF-8\" />\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n        <link rel=\"stylesheet\" href=\"/styles.css\" />\n        <solid:hydration-script />\n      </head>\n      <body>{/*... rest of App*/}</body>\n    </html>\n  );\n}\n```\n\n```jsx\nimport { HydrationScript as _HydrationScript } from \"solid-js/web\";\n\nconst App = () => {\n  return <html lang=\"en\">\n      <head>\n        <title>🔥 Solid SSR 🔥</title>\n        <meta charset=\"UTF-8\" />\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n        <link rel=\"stylesheet\" href=\"/styles.css\" />\n        <_HydrationScript />\n      </head>\n      <body>{\n        /*... rest of App*/\n      }</body>\n    </html>;\n};\n```\n\n## `<solid:no-hydration>`\n\nAlias for `<NoHydration>`\n\n```jsx\n<solid:no-hydration>\n  <ImNotHydrated />\n</solid:no-hydration>\n```\n\n```jsx\nimport { NoHydration as _NoHydration } from \"solid-js/web\";\n<_NoHydration>\n  <ImNotHydrated />\n</_NoHydration>;\n```\n"
  },
  {
    "path": "examples/comments/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local"
  },
  {
    "path": "examples/comments/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"UTF-8\" />\n  <link rel=\"icon\" type=\"image/svg+xml\" href=\"favicon.svg\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Vite App</title>\n</head>\n\n<body>\n  <div id=\"app\"></div>\n  <script type=\"module\" src=\"/src/main.tsx\"></script>\n</body>\n\n</html>"
  },
  {
    "path": "examples/comments/package.json",
    "content": "{\n  \"name\": \"vite-example-comments\",\n  \"type\": \"module\",\n  \"version\": \"0.17.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\"\n  },\n  \"devDependencies\": {\n    \"solid-labels\": \"0.17.0\",\n    \"typescript\": \"^5.8.2\",\n    \"vite\": \"^6.1.1\",\n    \"vite-plugin-solid\": \"^2.11.2\",\n    \"vite-plugin-solid-labels\": \"0.17.0\"\n  },\n  \"private\": true,\n  \"publishConfig\": {\n    \"access\": \"restricted\"\n  },\n  \"dependencies\": {\n    \"solid-js\": \"^1.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/comments/src/App.tsx",
    "content": "import type { JSX } from 'solid-js/jsx-runtime';\n\nexport default function App(): JSX.Element {\n  /* @signal */\n  let count = 0;\n\n  /* @memo */\n  const message = `Count: ${count}`;\n\n  /* @effect */ {\n    console.log(message);\n  }\n\n  function increment(): void {\n    count += 1;\n  }\n\n  return (\n    <button type=\"button\" onClick={increment}>\n      {message}\n    </button>\n  );\n}\n"
  },
  {
    "path": "examples/comments/src/main.tsx",
    "content": "import { render } from 'solid-js/web';\nimport App from './App';\n\nconst app = document.getElementById('app');\n\nif (app) {\n  render(() => <App />, app);\n}\n"
  },
  {
    "path": "examples/comments/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"moduleResolution\": \"Node\",\n    \"strict\": true,\n    \"sourceMap\": true,\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"noEmit\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"allowUnusedLabels\": true,\n    \"noImplicitReturns\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n    \"types\": [\n      \"vite/client\",\n      \"solid-labels\"\n    ]\n  },\n  \"include\": [\"./src\"]\n}\n"
  },
  {
    "path": "examples/comments/vite.config.js",
    "content": "import { defineConfig } from 'vite';\nimport solidPlugin from 'vite-plugin-solid';\nimport solidLabels from 'vite-plugin-solid-labels';\n\nexport default defineConfig({\n  plugins: [\n    solidPlugin({}),\n    solidLabels({\n      filter: {\n        include: 'src/**/*.{ts,js,tsx,jsx}',\n        exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',\n      },\n    }),\n  ],\n});\n"
  },
  {
    "path": "examples/ctf/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local"
  },
  {
    "path": "examples/ctf/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"UTF-8\" />\n  <link rel=\"icon\" type=\"image/svg+xml\" href=\"favicon.svg\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Vite App</title>\n</head>\n\n<body>\n  <div id=\"app\"></div>\n  <script type=\"module\" src=\"/src/main.tsx\"></script>\n</body>\n\n</html>"
  },
  {
    "path": "examples/ctf/package.json",
    "content": "{\n  \"name\": \"vite-example-ctf\",\n  \"type\": \"module\",\n  \"version\": \"0.17.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\"\n  },\n  \"devDependencies\": {\n    \"solid-labels\": \"0.17.0\",\n    \"typescript\": \"^5.8.2\",\n    \"vite\": \"^6.1.1\",\n    \"vite-plugin-solid\": \"^2.11.2\",\n    \"vite-plugin-solid-labels\": \"0.17.0\"\n  },\n  \"private\": true,\n  \"publishConfig\": {\n    \"access\": \"restricted\"\n  },\n  \"dependencies\": {\n    \"solid-js\": \"^1.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/ctf/src/App.tsx",
    "content": "import type { Accessor, JSX, Setter } from 'solid-js';\n\nfunction useCounter(): [Accessor<number>, Setter<number>] {\n  const count = $signal(0);\n\n  $effect(() => {\n    console.log('Current count:', count);\n  });\n\n  return $refSignal(count);\n}\n\nexport default function App(): JSX.Element {\n  let count = $derefSignal(useCounter());\n\n  const message = $memo(`Count: ${count}`);\n\n  $effect(() => {\n    console.log(message);\n  });\n\n  function increment(): void {\n    count += 1;\n  }\n\n  return (\n    <>\n      <button type=\"button\" onClick={increment}>\n        {message}\n      </button>\n      <Show when={count % 2 === 0} fallback={<h1>Odd</h1>}>\n        <h1>Even</h1>\n      </Show>\n    </>\n  );\n}\n"
  },
  {
    "path": "examples/ctf/src/main.tsx",
    "content": "import { render } from 'solid-js/web';\nimport App from './App';\n\nconst app = document.getElementById('app');\n\nif (app) {\n  render(() => <App />, app);\n}\n"
  },
  {
    "path": "examples/ctf/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"moduleResolution\": \"Node\",\n    \"strict\": true,\n    \"sourceMap\": true,\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"noEmit\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"allowUnusedLabels\": true,\n    \"noImplicitReturns\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n    \"types\": [\n      \"vite/client\",\n      \"solid-labels\"\n    ]\n  },\n  \"include\": [\"./src\"]\n}\n"
  },
  {
    "path": "examples/ctf/vite.config.js",
    "content": "import { defineConfig } from 'vite';\nimport solidPlugin from 'vite-plugin-solid';\nimport solidLabels from 'vite-plugin-solid-labels';\n\nexport default defineConfig({\n  plugins: [\n    solidPlugin({}),\n    solidLabels({\n      filter: {\n        include: 'src/**/*.{ts,js,tsx,jsx}',\n        exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',\n      },\n    }),\n  ],\n});\n"
  },
  {
    "path": "examples/labels/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local"
  },
  {
    "path": "examples/labels/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"favicon.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/labels/package.json",
    "content": "{\n  \"name\": \"vite-example-labels\",\n  \"type\": \"module\",\n  \"version\": \"0.17.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\"\n  },\n  \"devDependencies\": {\n    \"solid-labels\": \"0.17.0\",\n    \"typescript\": \"^5.8.2\",\n    \"vite\": \"^6.1.1\",\n    \"vite-plugin-solid\": \"^2.11.2\",\n    \"vite-plugin-solid-labels\": \"0.17.0\"\n  },\n  \"private\": true,\n  \"publishConfig\": {\n    \"access\": \"restricted\"\n  },\n  \"dependencies\": {\n    \"solid-js\": \"^1.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/labels/src/App.tsx",
    "content": "import type { JSX } from 'solid-js/jsx-runtime';\n\nexport default function App(): JSX.Element {\n  signal: var count = 0;\n  memo: var message = `Count: ${count}`;\n\n  effect: {\n    console.log(message);\n  }\n\n  function increment(): void {\n    count += 1;\n  }\n\n  return (\n    <button type=\"button\" onClick={increment}>\n      {message}\n    </button>\n  );\n}\n"
  },
  {
    "path": "examples/labels/src/main.tsx",
    "content": "import { render } from 'solid-js/web';\nimport App from './App';\n\nconst app = document.getElementById('app');\n\nif (app) {\n  render(() => <App />, app);\n}\n"
  },
  {
    "path": "examples/labels/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"moduleResolution\": \"Node\",\n    \"strict\": true,\n    \"sourceMap\": true,\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"noEmit\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"allowUnusedLabels\": true,\n    \"noImplicitReturns\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n    \"types\": [\n      \"vite/client\",\n      \"solid-labels\"\n    ]\n  },\n  \"include\": [\"./src\"]\n}\n"
  },
  {
    "path": "examples/labels/vite.config.js",
    "content": "import { defineConfig } from 'vite';\nimport solidPlugin from 'vite-plugin-solid';\nimport solidLabels from 'vite-plugin-solid-labels';\n\nexport default defineConfig({\n  plugins: [\n    solidPlugin({}),\n    solidLabels({\n      filter: {\n        include: 'src/**/*.{ts,js,tsx,jsx}',\n        exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',\n      },\n    }),\n  ],\n});\n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"npmClient\": \"npm\",\n  \"packages\": [\n    \"packages/*\",\n    \"examples/*\"\n  ],\n  \"command\": {\n    \"version\": {\n      \"exact\": true\n    },\n    \"publish\": {\n      \"allowBranch\": [\n        \"main\"\n      ],\n      \"registry\": \"https://registry.npmjs.org/\"\n    }\n  },\n  \"version\": \"0.17.0\"\n}"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"root\",\n  \"private\": true,\n  \"workspaces\": [\"packages/*\", \"examples/*\"],\n  \"devDependencies\": {\n    \"@biomejs/biome\": \"^1.9.4\",\n    \"lerna\": \"^8.2.1\",\n    \"typescript\": \"^5.8.2\"\n  }\n}\n"
  },
  {
    "path": "packages/core/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.production\n.env.development\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.npmrc\n"
  },
  {
    "path": "packages/core/README.md",
    "content": "\n# `solid-labels`\n\n[![NPM](https://img.shields.io/npm/v/solid-labels.svg)](https://www.npmjs.com/package/solid-labels) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n\n<p align=\"center\">\n  <img\n    src=\"https://github.com/LXSMNSYC/solid-labels/blob/main/images/ctf.png?raw=true\"\n    alt=\"Example\"\n    style=\"width: 80%; height: auto;\"\n  />\n</p>\n\n## Install\n\n```bash\nnpm install solid-labels\n```\n\n```bash\nyarn add solid-labels\n```\n\n```bash\npnpm add solid-labels\n```\n\n## Features\n\n- 🏷 Labels: Turn labels into SolidJS utility calls!\n- 💬 Comments: Turn comments into SolidJS utility calls, too!\n- ⏱ Compile-time Functions: Use functions that are evaluated during compile-time!\n- 📦 Auto Imports: No need to import SolidJS utilities, explicitly!\n- 🤝 JS and TS Friendly!\n\n## Usage\n\n- [Labels](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/labels.md)\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-labels/tree/main/examples/labels)\n- [Comments](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/comments.md)\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-labels/tree/main/examples/comments)\n- [Compile-Time Functions](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/ctf.md)\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-labels/tree/main/examples/ctf)\n- [Solid Namespace](https://github.com/LXSMNSYC/solid-labels/tree/main/docs/namespace.md)\n\n### Typescript\n\n`<any file>.d.ts`\n\n```ts\n/// <reference types=\"solid-labels\" />\n```\n\n### Babel\n\n`.babelrc`\n\n```json\n{\n  \"plugins\": [\n    [\"solid-labels/babel\", { \"dev\": false }]\n  ]\n}\n```\n\n[!INFO]: You don't have to use this if you're using Vite or Rollup plugins\n\n## Integrations\n\n- [Vite](https://github.com/lxsmnsyc/solid-labels/tree/main/packages/vite)\n- [Rollup](https://github.com/lxsmnsyc/solid-labels/tree/main/packages/rollup)\n- [Unplugin](https://github.com/lxsmnsyc/solid-labels/tree/main/packages/unplugin)\n\n### Disabling features\n\nYou can disable some features by passing `disabled` option to the plugin options.\n\n```js\n{\n  disabled: {\n    labels: {\n      signal: true,\n    },\n    pragma: {\n      '@signal': true,\n    },\n    ctf: {\n      $signal: true,\n    },\n  }\n}\n```\n\n## Limitations\n\n- Detecting shadowed identifier for `signal` and `memo`.\n\n## Sponsors\n\n![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)\n\n## License\n\nMIT © [lxsmnsyc](https://github.com/lxsmnsyc)\n"
  },
  {
    "path": "packages/core/babel/components.ts",
    "content": "import type { NodePath, Visitor } from '@babel/traverse';\nimport * as t from '@babel/types';\nimport { getImportIdentifier } from './core/get-import-identifier';\nimport type { State } from './core/types';\n\ntype ComponentImport = [name: string, source: string];\n\nconst COMPONENTS: Record<string, ComponentImport> = {\n  // Components\n  For: ['For', 'solid-js'],\n  Show: ['Show', 'solid-js'],\n  Switch: ['Switch', 'solid-js'],\n  Match: ['Match', 'solid-js'],\n  Index: ['Index', 'solid-js'],\n  ErrorBoundary: ['ErrorBoundary', 'solid-js'],\n  Suspense: ['Suspense', 'solid-js'],\n  SuspenseList: ['SuspenseList', 'solid-js'],\n  Dynamic: ['Dynamic', 'solid-js/web'],\n  Portal: ['Portal', 'solid-js/web'],\n  Assets: ['Assets', 'solid-js/web'],\n  HydrationScript: ['HydrationScript', 'solid-js/web'],\n  NoHydration: ['NoHydration', 'solid-js/web'],\n};\n\nconst NAMESPACE = 'solid';\n\nconst NAMESPACE_COMPONENTS: Record<string, ComponentImport> = {\n  // Components\n  for: ['For', 'solid-js'],\n  show: ['Show', 'solid-js'],\n  switch: ['Switch', 'solid-js'],\n  match: ['Match', 'solid-js'],\n  index: ['Index', 'solid-js'],\n  'error-boundary': ['ErrorBoundary', 'solid-js'],\n  suspense: ['Suspense', 'solid-js'],\n  'suspense-list': ['SuspenseList', 'solid-js'],\n  dynamic: ['Dynamic', 'solid-js/web'],\n  portal: ['Portal', 'solid-js/web'],\n  assets: ['Assets', 'solid-js/web'],\n  'hydration-script': ['HydrationScript', 'solid-js/web'],\n  'no-hydration': ['NoHydration', 'solid-js/web'],\n};\n\nconst COMPONENT_TRAVERSE: Visitor<State> = {\n  Expression(p, state) {\n    if (\n      t.isIdentifier(p.node) &&\n      !p.scope.hasBinding(p.node.name) &&\n      p.node.name in COMPONENTS\n    ) {\n      const [name, source] = COMPONENTS[p.node.name];\n      p.replaceWith(getImportIdentifier(state, p, name, source));\n    }\n  },\n  JSXElement(p, state) {\n    const { openingElement, closingElement } = p.node;\n    const id = openingElement.name;\n    let replacement: t.JSXIdentifier | undefined;\n    if (\n      t.isJSXNamespacedName(id) &&\n      id.namespace.name === NAMESPACE &&\n      id.name.name in NAMESPACE_COMPONENTS\n    ) {\n      const [name, source] = NAMESPACE_COMPONENTS[id.name.name];\n      const identifier = getImportIdentifier(state, p, name, source);\n      replacement = t.jsxIdentifier(identifier.name);\n    }\n    if (\n      t.isJSXIdentifier(id) &&\n      !p.scope.hasBinding(id.name) &&\n      id.name in COMPONENTS\n    ) {\n      const [name, source] = COMPONENTS[id.name];\n      const identifier = getImportIdentifier(state, p, name, source);\n      replacement = t.jsxIdentifier(identifier.name);\n    }\n\n    if (replacement) {\n      openingElement.name = replacement;\n      if (closingElement) {\n        closingElement.name = replacement;\n      }\n    }\n  },\n};\n\nexport function transformComponents(state: State, path: NodePath): void {\n  path.traverse(COMPONENT_TRAVERSE, state);\n}\n"
  },
  {
    "path": "packages/core/babel/constants.ts",
    "content": "import * as t from '@babel/types';\n\nexport const UNDEFINED = t.unaryExpression('void', t.numericLiteral(0));\n"
  },
  {
    "path": "packages/core/babel/core/accessor-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { derefMemo } from './deref-memo';\nimport { generateUniqueName } from './generate-unique-name';\n\nexport function accessorVariable(\n  path: babel.NodePath,\n  accessorIdentifier: t.Identifier,\n  callee: t.Identifier,\n  replacement: Array<t.Expression | t.SpreadElement | t.ArgumentPlaceholder>,\n): t.VariableDeclarator {\n  const readIdentifier = generateUniqueName(path, accessorIdentifier.name);\n\n  derefMemo(path, accessorIdentifier, readIdentifier);\n\n  return t.variableDeclarator(\n    readIdentifier,\n    t.callExpression(callee, replacement),\n  );\n}\n"
  },
  {
    "path": "packages/core/babel/core/assert.ts",
    "content": "export function assert<T extends Error>(cond: unknown, error: T): asserts cond {\n  if (!cond) {\n    throw error;\n  }\n}\n"
  },
  {
    "path": "packages/core/babel/core/deferred-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { accessorVariable } from './accessor-variable';\nimport { getImportIdentifier } from './get-import-identifier';\nimport type { State } from './types';\nimport { UNDEFINED } from '../constants';\n\nexport function deferredVariable(\n  state: State,\n  path: babel.NodePath,\n  deferredIdentifier: t.Identifier,\n  stateIdentifier: t.Expression = UNDEFINED,\n  optionsIdentifier: t.Expression | undefined = undefined,\n): t.VariableDeclarator {\n  const normalIdentifier = t.arrowFunctionExpression([], stateIdentifier);\n  const args: t.Expression[] = [normalIdentifier];\n  if (state.opts.dev) {\n    if (optionsIdentifier) {\n      args.push(\n        t.callExpression(\n          t.memberExpression(t.identifier('Object'), t.identifier('assign')),\n          [\n            t.objectExpression([\n              t.objectProperty(\n                t.identifier('name'),\n                t.stringLiteral(deferredIdentifier.name),\n              ),\n            ]),\n            optionsIdentifier,\n          ],\n        ),\n      );\n    } else {\n      args.push(\n        t.objectExpression([\n          t.objectProperty(\n            t.identifier('name'),\n            t.stringLiteral(deferredIdentifier.name),\n          ),\n        ]),\n      );\n    }\n  } else if (optionsIdentifier) {\n    args.push(optionsIdentifier);\n  }\n  return accessorVariable(\n    path,\n    deferredIdentifier,\n    getImportIdentifier(state, path, 'createDeferred', 'solid-js'),\n    args,\n  );\n}\n"
  },
  {
    "path": "packages/core/babel/core/deref-memo-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { derefMemo } from './deref-memo';\nimport { generateUniqueName } from './generate-unique-name';\n\nexport function derefMemoVariable(\n  path: babel.NodePath,\n  memoIdentifier: t.Identifier,\n  stateIdentifier: t.Expression,\n): t.VariableDeclarator {\n  const readIdentifier = generateUniqueName(path, memoIdentifier.name);\n\n  derefMemo(path, memoIdentifier, readIdentifier);\n\n  return t.variableDeclarator(readIdentifier, stateIdentifier);\n}\n"
  },
  {
    "path": "packages/core/babel/core/deref-memo.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { assert } from './assert';\nimport { unexpectedType } from './errors';\nimport { addProtoGetter } from './proto';\nimport { getProperParentPath, unwrapNode } from './unwrap-node';\n\nconst REF_MEMO_CTF = '$refMemo';\nconst GET_CTF = '$get';\n\nconst GETTER_CTF = '$getter';\nconst PROPERTY_CTF = '$property';\n\nconst CALL_CTF = new Set([REF_MEMO_CTF, GET_CTF, GETTER_CTF, PROPERTY_CTF]);\n\nfunction transformGetter(\n  parent: babel.NodePath<t.CallExpression>,\n  readIdentifier: t.Identifier,\n): boolean {\n  const propertyParent = getProperParentPath(parent, t.isObjectProperty);\n  if (!propertyParent) {\n    return true;\n  }\n  const key = propertyParent.node.key;\n  assert(\n    t.isExpression(key),\n    unexpectedType(propertyParent.get('key'), key.type, 'Identifier'),\n  );\n  const objectParent = getProperParentPath(\n    propertyParent,\n    t.isObjectExpression,\n  );\n  if (!objectParent) {\n    return true;\n  }\n  addProtoGetter(objectParent, propertyParent, key, readIdentifier);\n  return false;\n}\n\nfunction transformReferencePath(\n  ref: babel.NodePath,\n  readIdentifier: t.Identifier,\n): boolean {\n  const parent = getProperParentPath(ref, t.isCallExpression);\n  if (parent) {\n    const trueCallee = unwrapNode(parent.node.callee, t.isIdentifier);\n    if (!(trueCallee && CALL_CTF.has(trueCallee.name))) {\n      return true;\n    }\n    const rawArgs = parent.get('arguments')[0];\n    const arg = unwrapNode(rawArgs.node, t.isIdentifier);\n    assert(arg, unexpectedType(rawArgs, rawArgs.type, 'Identifier'));\n    if (arg !== ref.node) {\n      return true;\n    }\n    switch (trueCallee.name) {\n      case REF_MEMO_CTF:\n      case GET_CTF:\n        parent.replaceWith(readIdentifier);\n        break;\n      case PROPERTY_CTF:\n      case GETTER_CTF:\n        return transformGetter(parent, readIdentifier);\n    }\n    return false;\n  }\n  return true;\n}\n\nexport function derefMemo(\n  path: babel.NodePath,\n  memoIdentifier: t.Identifier,\n  readIdentifier: t.Identifier,\n): void {\n  const binding = path.scope.getBinding(memoIdentifier.name);\n  if (!binding) {\n    return;\n  }\n  for (const ref of binding.referencePaths) {\n    if (transformReferencePath(ref, readIdentifier)) {\n      assert(\n        t.isIdentifier(ref.node),\n        unexpectedType(ref, ref.node.type, 'Identifier'),\n      );\n      ref.replaceWith(t.callExpression(readIdentifier, []));\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/babel/core/deref-signal-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { derefSignal } from './deref-signal';\nimport { generateUniqueName } from './generate-unique-name';\n\nexport function derefSignalVariable(\n  path: babel.NodePath,\n  signalIdentifier: t.Identifier,\n  stateIdentifier: t.Expression,\n): t.VariableDeclarator {\n  const readIdentifier = generateUniqueName(path, signalIdentifier.name);\n  const writeIdentifier = generateUniqueName(\n    path,\n    `set${signalIdentifier.name}`,\n  );\n  derefSignal(path, signalIdentifier, readIdentifier, writeIdentifier);\n\n  return t.variableDeclarator(\n    t.arrayPattern([readIdentifier, writeIdentifier]),\n    stateIdentifier,\n  );\n}\n"
  },
  {
    "path": "packages/core/babel/core/deref-signal.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { assert } from './assert';\nimport { unexpectedType } from './errors';\nimport { generateUniqueName } from './generate-unique-name';\nimport { isAwaited } from './is-awaited';\nimport { isYielded } from './is-yielded';\nimport { addProtoGetter, addProtoProperty, addProtoSetter } from './proto';\nimport { getProperParentPath, isPathValid, unwrapNode } from './unwrap-node';\n\nconst REF_SIGNAL_CTF = '$refSignal';\nconst GET_CTF = '$get';\nconst SET_CTF = '$set';\n\nconst GETTER_CTF = '$getter';\nconst SETTER_CTF = '$setter';\nconst PROPERTY_CTF = '$property';\n\nconst CALL_CTF = new Set([\n  REF_SIGNAL_CTF,\n  GET_CTF,\n  SET_CTF,\n  GETTER_CTF,\n  SETTER_CTF,\n  PROPERTY_CTF,\n]);\n\nfunction transformProperty(\n  parent: babel.NodePath<t.CallExpression>,\n  ctf: string,\n  readIdentifier: t.Identifier,\n  writeIdentifier: t.Identifier,\n): boolean {\n  const propertyParent = getProperParentPath(parent, t.isObjectProperty);\n  if (!propertyParent) {\n    return true;\n  }\n  const key = propertyParent.node.key;\n  assert(\n    t.isExpression(key),\n    unexpectedType(propertyParent.get('key'), key.type, 'Identifier'),\n  );\n  const objectParent = getProperParentPath(\n    propertyParent,\n    t.isObjectExpression,\n  );\n  if (!objectParent) {\n    return true;\n  }\n  switch (ctf) {\n    case SETTER_CTF:\n      addProtoSetter(objectParent, propertyParent, key, writeIdentifier);\n      break;\n    case GETTER_CTF:\n      addProtoGetter(objectParent, propertyParent, key, writeIdentifier);\n      break;\n    case PROPERTY_CTF:\n      addProtoProperty(\n        objectParent,\n        propertyParent,\n        key,\n        readIdentifier,\n        writeIdentifier,\n      );\n      break;\n  }\n  return false;\n}\n\nfunction transformSignalRead(\n  ref: babel.NodePath,\n  readIdentifier: t.Identifier,\n  writeIdentifier: t.Identifier,\n): boolean {\n  const parent = getProperParentPath(ref, t.isCallExpression);\n  if (parent) {\n    const trueCallee = unwrapNode(parent.node.callee, t.isIdentifier);\n    if (!(trueCallee && CALL_CTF.has(trueCallee.name))) {\n      return true;\n    }\n    const rawArgs = parent.get('arguments')[0];\n    const arg = unwrapNode(rawArgs.node, t.isIdentifier);\n    assert(arg, unexpectedType(rawArgs, rawArgs.type, 'Identifier'));\n    if (arg !== ref.node) {\n      return true;\n    }\n    switch (trueCallee.name) {\n      case REF_SIGNAL_CTF:\n        parent.replaceWith(\n          t.arrayExpression([readIdentifier, writeIdentifier]),\n        );\n        break;\n      case SET_CTF:\n        parent.replaceWith(writeIdentifier);\n        break;\n      case GET_CTF:\n        parent.replaceWith(readIdentifier);\n        break;\n      case PROPERTY_CTF:\n      case SETTER_CTF:\n      case GETTER_CTF:\n        return transformProperty(\n          parent,\n          trueCallee.name,\n          readIdentifier,\n          writeIdentifier,\n        );\n    }\n    return false;\n  }\n  return true;\n}\n\nfunction transformUpdateExpression(\n  ref: babel.NodePath<t.UpdateExpression>,\n  writeIdentifier: t.Identifier,\n): void {\n  const param = generateUniqueName(ref, 'current');\n  if (ref.node.prefix) {\n    const tmp = generateUniqueName(ref, 'tmp');\n    ref.replaceWith(\n      t.callExpression(\n        t.arrowFunctionExpression(\n          [],\n          t.blockStatement([\n            t.variableDeclaration('let', [t.variableDeclarator(tmp)]),\n            t.expressionStatement(\n              t.callExpression(writeIdentifier, [\n                t.arrowFunctionExpression(\n                  [param],\n                  t.binaryExpression(\n                    ref.node.operator === '++' ? '+' : '-',\n                    t.assignmentExpression('=', tmp, param),\n                    t.numericLiteral(1),\n                  ),\n                ),\n              ]),\n            ),\n            t.returnStatement(tmp),\n          ]),\n        ),\n        [],\n      ),\n    );\n  } else {\n    ref.replaceWith(\n      t.callExpression(writeIdentifier, [\n        t.arrowFunctionExpression(\n          [param],\n          t.binaryExpression(\n            ref.node.operator === '++' ? '+' : '-',\n            param,\n            t.numericLiteral(1),\n          ),\n        ),\n      ]),\n    );\n  }\n}\n\nfunction transformAssignmentExpression(\n  ref: babel.NodePath<t.AssignmentExpression>,\n  writeIdentifier: t.Identifier,\n): void {\n  assert(\n    t.isIdentifier(ref.node.left),\n    unexpectedType(ref.get('left'), ref.node.left.type, 'Identifier'),\n  );\n  let expression = ref.node.right;\n  if (isAwaited(expression) || isYielded(expression)) {\n    const statement = ref.getStatementParent();\n    const functionParent = ref.getFunctionParent();\n    if (statement) {\n      const awaitedID = generateUniqueName(statement, 'tmp');\n      const declaration = t.variableDeclaration('const', [\n        t.variableDeclarator(awaitedID, expression),\n      ]);\n\n      if (functionParent) {\n        if (functionParent.isAncestor(statement)) {\n          statement.insertBefore(declaration);\n        } else {\n          functionParent.scope.push({\n            id: awaitedID,\n            init: expression,\n            kind: 'const',\n          });\n        }\n      } else {\n        statement.insertBefore(declaration);\n      }\n      expression = awaitedID;\n    }\n  }\n  let arg: t.Expression;\n  if (ref.node.operator === '=') {\n    arg = t.arrowFunctionExpression([], expression);\n  } else {\n    const param = generateUniqueName(ref, 'current');\n    arg = t.arrowFunctionExpression(\n      [param],\n      t.assignmentExpression(ref.node.operator, param, expression),\n    );\n  }\n  ref.replaceWith(t.callExpression(writeIdentifier, [arg]));\n}\n\nfunction transformSignalWrite(\n  ref: babel.NodePath,\n  writeIdentifier: t.Identifier,\n): void {\n  if (isPathValid(ref, t.isUpdateExpression)) {\n    transformUpdateExpression(ref, writeIdentifier);\n    return;\n  }\n  if (isPathValid(ref, t.isAssignmentExpression)) {\n    transformAssignmentExpression(ref, writeIdentifier);\n    return;\n  }\n}\n\nexport function derefSignal(\n  path: babel.NodePath,\n  signalIdentifier: t.Identifier,\n  readIdentifier: t.Identifier,\n  writeIdentifier: t.Identifier,\n): void {\n  const binding = path.scope.getBinding(signalIdentifier.name);\n  if (!binding) {\n    return;\n  }\n  // Transform all writes\n  for (const ref of binding.constantViolations) {\n    transformSignalWrite(ref, writeIdentifier);\n  }\n  // Transform all reads\n  for (const ref of binding.referencePaths) {\n    if (transformSignalRead(ref, readIdentifier, writeIdentifier)) {\n      assert(\n        t.isIdentifier(ref.node),\n        unexpectedType(ref, ref.node.type, 'Identifier'),\n      );\n      ref.replaceWith(t.callExpression(readIdentifier, []));\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/babel/core/destructure-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { derefMemo } from './deref-memo';\nimport { unexpectedType } from './errors';\nimport { generateUniqueName } from './generate-unique-name';\nimport { getImportIdentifier } from './get-import-identifier';\nimport { isStatic } from './is-static';\nimport type { State } from './types';\nimport { unwrapNode } from './unwrap-node';\nimport { UNDEFINED } from '../constants';\n\nexport function destructureVariable(\n  state: State,\n  path: babel.NodePath,\n  target: t.Expression,\n  pattern: t.ObjectPattern | t.ArrayPattern,\n  defaultValue?: t.Expression,\n): t.VariableDeclarator[] {\n  const otherIdentifier = generateUniqueName(path, 'other');\n  let declarators: t.VariableDeclarator[] = [];\n  const properties: t.Expression[] = [];\n  let restIdentifier: t.Identifier | undefined;\n\n  // Destructuring for object patterns\n  if (t.isObjectPattern(pattern)) {\n    for (let i = 0, len = pattern.properties.length; i < len; i++) {\n      const property = pattern.properties[i];\n      // Check if this is an object property\n      if (t.isObjectProperty(property)) {\n        const { value, key } = property;\n\n        if (!property.computed) {\n          if (t.isIdentifier(key)) {\n            properties.push(t.stringLiteral(key.name));\n          }\n        } else if (t.isPrivateName(key)) {\n          throw unexpectedType(path, 'PrivateName', 'Expression');\n        } else {\n          properties.push(key);\n        }\n\n        // Create a new identifier for the destructure variable\n        const newIdentifier = generateUniqueName(path, 'prop');\n        let access: t.Expression | t.BlockStatement = t.memberExpression(\n          target,\n          key,\n          property.computed,\n        );\n        let defaultIdentifier: t.Identifier | undefined;\n        if (t.isAssignmentPattern(value)) {\n          defaultIdentifier = generateUniqueName(path, 'def');\n          const isStaticValue = isStatic(value.right);\n          const defValue = isStaticValue\n            ? value.right\n            : t.callExpression(\n                getImportIdentifier(state, path, 'createMemo', 'solid-js'),\n                [t.arrowFunctionExpression([], value.right)],\n              );\n          declarators.push(t.variableDeclarator(defaultIdentifier, defValue));\n          const valueIdentifier = generateUniqueName(path, 'value');\n          access = t.blockStatement([\n            t.variableDeclaration('const', [\n              t.variableDeclarator(valueIdentifier, access),\n            ]),\n            t.returnStatement(\n              t.conditionalExpression(\n                t.binaryExpression('===', valueIdentifier, UNDEFINED),\n                isStaticValue\n                  ? defaultIdentifier\n                  : t.callExpression(defaultIdentifier, []),\n                valueIdentifier,\n              ),\n            ),\n          ]);\n        }\n        declarators.push(\n          t.variableDeclarator(\n            newIdentifier,\n            t.arrowFunctionExpression([], access),\n          ),\n        );\n\n        // If the value is an object or array pattern\n        // destructure that value again\n        // e.g. { x: { y, z }} = w;\n        if (t.isObjectPattern(value) || t.isArrayPattern(value)) {\n          declarators = [\n            ...declarators,\n            ...destructureVariable(\n              state,\n              path,\n              t.callExpression(newIdentifier, []),\n              value,\n            ),\n          ];\n        } else if (t.isIdentifier(value)) {\n          // If the value is just a normal identifier\n          // e.g. { x: y } = w;\n          // normalize bindings\n          derefMemo(path, value, newIdentifier);\n        } else if (t.isAssignmentPattern(value)) {\n          if (t.isIdentifier(value.left)) {\n            // If the value has a default value\n            derefMemo(path, value.left, newIdentifier);\n          } else if (\n            t.isArrayPattern(value.left) ||\n            t.isObjectPattern(value.left)\n          ) {\n            // Otherwise it's just another array/object\n            declarators = [\n              ...declarators,\n              ...destructureVariable(\n                state,\n                path,\n                t.callExpression(newIdentifier, []),\n                value.left,\n                defaultIdentifier,\n              ),\n            ];\n          }\n        } else {\n          throw unexpectedType(\n            path,\n            value.type,\n            'Identifier | ObjectPattern | ArrayPattern',\n          );\n        }\n      } else {\n        // or it's a rest element\n        // make sure that it is an identifier though\n        const trueIdentifier = unwrapNode(property.argument, t.isIdentifier);\n        if (trueIdentifier) {\n          restIdentifier = trueIdentifier;\n        }\n      }\n    }\n  } else {\n    // Destructure for arrays\n    for (let i = 0, len = pattern.elements.length; i < len; i++) {\n      const property = pattern.elements[i];\n      if (property) {\n        const keyExpr = t.numericLiteral(i);\n\n        const newIdentifier = generateUniqueName(path, 'prop');\n        let access: t.Expression | t.BlockStatement = t.memberExpression(\n          target,\n          keyExpr,\n          true,\n        );\n        let defaultIdentifier: t.Identifier | undefined;\n        if (t.isAssignmentPattern(property)) {\n          defaultIdentifier = generateUniqueName(path, 'def');\n          const isStaticValue = isStatic(property.right);\n          const defValue = isStaticValue\n            ? property.right\n            : t.callExpression(\n                getImportIdentifier(state, path, 'createMemo', 'solid-js'),\n                [t.arrowFunctionExpression([], property.right)],\n              );\n          declarators.push(t.variableDeclarator(defaultIdentifier, defValue));\n          const valueIdentifier = generateUniqueName(path, 'value');\n          access = t.blockStatement([\n            t.variableDeclaration('const', [\n              t.variableDeclarator(valueIdentifier, access),\n            ]),\n            t.returnStatement(\n              t.conditionalExpression(\n                t.binaryExpression('===', valueIdentifier, UNDEFINED),\n                isStaticValue\n                  ? defaultIdentifier\n                  : t.callExpression(defaultIdentifier, []),\n                valueIdentifier,\n              ),\n            ),\n          ]);\n        }\n        declarators.push(\n          t.variableDeclarator(\n            newIdentifier,\n            t.arrowFunctionExpression([], access),\n          ),\n        );\n\n        properties.push(keyExpr);\n\n        if (t.isIdentifier(property)) {\n          derefMemo(path, property, newIdentifier);\n        } else if (t.isAssignmentPattern(property)) {\n          if (t.isIdentifier(property.left)) {\n            derefMemo(path, property.left, newIdentifier);\n          } else if (\n            t.isArrayPattern(property.left) ||\n            t.isObjectPattern(property.left)\n          ) {\n            // Otherwise it's just another array/object\n            declarators = [\n              ...declarators,\n              ...destructureVariable(\n                state,\n                path,\n                t.callExpression(newIdentifier, []),\n                property.left,\n                defaultIdentifier,\n              ),\n            ];\n          }\n        } else if (t.isArrayPattern(property) || t.isObjectPattern(property)) {\n          // Otherwise it's just another array/object\n          declarators = [\n            ...declarators,\n            ...destructureVariable(\n              state,\n              path,\n              t.callExpression(newIdentifier, []),\n              property,\n            ),\n          ];\n        } else if (t.isRestElement(property)) {\n          const trueIdentifier = unwrapNode(property.argument, t.isIdentifier);\n          if (trueIdentifier) {\n            restIdentifier = trueIdentifier;\n          }\n        }\n      }\n    }\n  }\n\n  const expr = t.variableDeclarator(\n    otherIdentifier,\n    properties.length\n      ? t.memberExpression(\n          t.callExpression(\n            getImportIdentifier(state, path, 'splitProps', 'solid-js'),\n            [\n              defaultValue != null\n                ? t.callExpression(\n                    getImportIdentifier(state, path, 'mergeProps', 'solid-js'),\n                    [target, defaultValue],\n                  )\n                : target,\n              t.arrayExpression(properties),\n            ],\n          ),\n          t.numericLiteral(1),\n          true,\n        )\n      : target,\n  );\n\n  declarators.push(expr);\n\n  if (restIdentifier) {\n    const binding = path.scope.getBinding(restIdentifier.name);\n    if (binding) {\n      for (const ref of binding.referencePaths) {\n        ref.replaceWith(otherIdentifier);\n      }\n    }\n  }\n\n  return declarators;\n}\n"
  },
  {
    "path": "packages/core/babel/core/errors.ts",
    "content": "import type * as babel from '@babel/core';\n\nexport function unexpectedType<T>(\n  path: babel.NodePath<T>,\n  received: string,\n  expected: string,\n): Error {\n  return path.buildCodeFrameError(\n    `Unexpected '${received}' (Expected: ${expected})`,\n  );\n}\n\nexport function unexpectedMissingParent<T>(path: babel.NodePath<T>): Error {\n  return path.buildCodeFrameError('Unexpected missing parent.');\n}\n\nexport function unexpectedArgumentLength<T>(\n  path: babel.NodePath<T>,\n  received: number,\n  expected: number,\n): Error {\n  return path.buildCodeFrameError(\n    `Unexpected argument length of ${received} (Expected: ${expected})`,\n  );\n}\n\nexport function unexpectedAssignmentOperator<T>(\n  path: babel.NodePath<T>,\n  received: string,\n  expected: string,\n): Error {\n  return path.buildCodeFrameError(\n    `Unexpected assignment operator '${received}' (Expected: ${expected})`,\n  );\n}\n"
  },
  {
    "path": "packages/core/babel/core/generate-unique-name.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\n\nexport function generateUniqueName(\n  path: babel.NodePath,\n  name: string,\n): t.Identifier {\n  let uid;\n  let i = 1;\n  do {\n    uid = name + '_' + i;\n    i++;\n  } while (\n    path.scope.hasLabel(uid) ||\n    path.scope.hasBinding(uid) ||\n    path.scope.hasGlobal(uid) ||\n    path.scope.hasReference(uid)\n  );\n\n  const program = path.scope.getProgramParent();\n  program.references[uid] = true;\n  program.uids[uid] = true;\n\n  return t.identifier(uid);\n}\n"
  },
  {
    "path": "packages/core/babel/core/get-import-identifier.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport type { State } from './types';\n\nexport function getImportIdentifier(\n  state: State,\n  path: babel.NodePath,\n  name: string,\n  source: string,\n): t.Identifier {\n  const target = `${source}[${name}]`;\n  const current = state.hooks.get(target);\n  if (current) {\n    return current;\n  }\n  const programParent = path.scope.getProgramParent();\n  const uid = programParent.generateUidIdentifier(name);\n  const newPath = (\n    programParent.path as babel.NodePath<t.Program>\n  ).unshiftContainer(\n    'body',\n    t.importDeclaration(\n      [t.importSpecifier(uid, t.identifier(name))],\n      t.stringLiteral(source),\n    ),\n  )[0];\n  programParent.registerDeclaration(newPath);\n  state.hooks.set(target, uid);\n  return uid;\n}\n"
  },
  {
    "path": "packages/core/babel/core/is-awaited.ts",
    "content": "import * as t from '@babel/types';\n\nexport function isAwaited(node: t.Expression | t.SpreadElement): boolean {\n  // Default\n  if (t.isAwaitExpression(node)) {\n    return true;\n  }\n  if (t.isTemplateLiteral(node)) {\n    return node.expressions.some(\n      expr => t.isExpression(expr) && isAwaited(expr),\n    );\n  }\n  if (\n    t.isLiteral(node) ||\n    t.isIdentifier(node) ||\n    t.isArrowFunctionExpression(node) ||\n    t.isFunctionExpression(node) ||\n    t.isClassExpression(node) ||\n    t.isYieldExpression(node) ||\n    t.isJSX(node) ||\n    t.isMetaProperty(node) ||\n    t.isSuper(node) ||\n    t.isThisExpression(node) ||\n    t.isImport(node) ||\n    t.isDoExpression(node)\n  ) {\n    return false;\n  }\n  if (t.isTaggedTemplateExpression(node)) {\n    return isAwaited(node.tag) || isAwaited(node.quasi);\n  }\n  if (\n    t.isUnaryExpression(node) ||\n    t.isUpdateExpression(node) ||\n    t.isSpreadElement(node)\n  ) {\n    return isAwaited(node.argument);\n  }\n  if (\n    t.isParenthesizedExpression(node) ||\n    t.isTypeCastExpression(node) ||\n    t.isTSAsExpression(node) ||\n    t.isTSSatisfiesExpression(node) ||\n    t.isTSNonNullExpression(node) ||\n    t.isTSTypeAssertion(node) ||\n    t.isTSInstantiationExpression(node)\n  ) {\n    return isAwaited(node.expression);\n  }\n  // Check for elements\n  if (t.isArrayExpression(node) || t.isTupleExpression(node)) {\n    return node.elements.some(el => el != null && isAwaited(el));\n  }\n  // Skip arrow function\n  if (t.isAssignmentExpression(node)) {\n    if (isAwaited(node.right)) {\n      return true;\n    }\n    if (t.isExpression(node.left)) {\n      return isAwaited(node.left);\n    }\n    return false;\n  }\n  if (t.isBinaryExpression(node)) {\n    if (t.isExpression(node.left) && isAwaited(node.left)) {\n      return true;\n    }\n    return isAwaited(node.right);\n  }\n  if (\n    t.isCallExpression(node) ||\n    t.isOptionalCallExpression(node) ||\n    t.isNewExpression(node)\n  ) {\n    if (t.isExpression(node.callee) && isAwaited(node.callee)) {\n      return true;\n    }\n    return node.arguments.some(\n      arg =>\n        arg &&\n        (t.isSpreadElement(arg) || t.isExpression(arg)) &&\n        isAwaited(arg),\n    );\n  }\n  if (t.isConditionalExpression(node)) {\n    return (\n      isAwaited(node.test) ||\n      isAwaited(node.consequent) ||\n      isAwaited(node.alternate)\n    );\n  }\n  if (t.isLogicalExpression(node)) {\n    return isAwaited(node.left) || isAwaited(node.right);\n  }\n  if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) {\n    return (\n      isAwaited(node.object) ||\n      (node.computed &&\n        t.isExpression(node.property) &&\n        isAwaited(node.property))\n    );\n  }\n  if (t.isSequenceExpression(node)) {\n    return node.expressions.some(isAwaited);\n  }\n  if (t.isObjectExpression(node) || t.isRecordExpression(node)) {\n    return node.properties.some(prop => {\n      if (t.isObjectProperty(prop)) {\n        if (t.isExpression(prop.value) && isAwaited(prop.value)) {\n          return true;\n        }\n        if (prop.computed && t.isExpression(prop.key) && isAwaited(prop.key)) {\n          return true;\n        }\n        return false;\n      }\n      if (t.isSpreadElement(prop)) {\n        return isAwaited(prop);\n      }\n      return false;\n    });\n  }\n  if (t.isBindExpression(node)) {\n    return isAwaited(node.object) || isAwaited(node.callee);\n  }\n  return false;\n}\n"
  },
  {
    "path": "packages/core/babel/core/is-in-typescript.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\n\nexport function isInTypescript(path: babel.NodePath): boolean {\n  let parent = path.parentPath;\n  while (parent) {\n    if (t.isTypeScript(parent.node) && !t.isExpression(parent.node)) {\n      return true;\n    }\n    parent = parent.parentPath;\n  }\n  return false;\n}\n"
  },
  {
    "path": "packages/core/babel/core/is-static.ts",
    "content": "import * as t from '@babel/types';\n\nexport function isStatic(\n  node:\n    | t.Expression\n    | t.SpreadElement\n    | t.AssignmentPattern\n    | t.ArrayPattern\n    | t.ObjectPattern\n    | t.RestElement,\n): boolean {\n  // The following types are singular nested expressions\n  if (\n    t.isParenthesizedExpression(node) ||\n    t.isTypeCastExpression(node) ||\n    t.isTSAsExpression(node) ||\n    t.isTSSatisfiesExpression(node) ||\n    t.isTSNonNullExpression(node) ||\n    t.isTSTypeAssertion(node) ||\n    t.isTSInstantiationExpression(node)\n  ) {\n    return isStatic(node.expression);\n  }\n  // Same as above\n  if (\n    t.isUnaryExpression(node) ||\n    t.isUpdateExpression(node) ||\n    t.isSpreadElement(node)\n  ) {\n    return isStatic(node.argument);\n  }\n  if (t.isRestElement(node)) {\n    if (t.isTSParameterProperty(node.argument)) {\n      return false;\n    }\n    return isStatic(node.argument);\n  }\n  if (t.isLiteral(node)) {\n    if (t.isTemplateLiteral(node)) {\n      return node.expressions.every(expr => {\n        if (t.isExpression(expr)) {\n          return isStatic(expr);\n        }\n        return false;\n      });\n    }\n    return true;\n  }\n  // The following types are always static\n  if (\n    t.isIdentifier(node) ||\n    t.isArrowFunctionExpression(node) ||\n    t.isFunctionExpression(node)\n    // ||\n    // t.isJSXElement(node) ||\n    // t.isJSXFragment(node)\n  ) {\n    return true;\n  }\n  // Arrays and tuples might have static values\n  if (t.isArrayExpression(node) || t.isTupleExpression(node)) {\n    return node.elements.every(el => {\n      if (el) {\n        return isStatic(el);\n      }\n      return true;\n    });\n  }\n  if (t.isArrayPattern(node)) {\n    return node.elements.every(el => {\n      if (t.isTSParameterProperty(el)) {\n        return false;\n      }\n      if (el) {\n        return isStatic(el);\n      }\n      return true;\n    });\n  }\n  if (t.isObjectExpression(node) || t.isRecordExpression(node)) {\n    return node.properties.every(prop => {\n      if (t.isObjectProperty(prop)) {\n        if (t.isExpression(prop.value) && isStatic(prop.value)) {\n          return true;\n        }\n        if (prop.computed && t.isExpression(prop.key) && isStatic(prop.key)) {\n          return true;\n        }\n        return false;\n      }\n      if (t.isSpreadElement(prop)) {\n        return isStatic(prop);\n      }\n      // Ignore\n      return true;\n    });\n  }\n  if (t.isObjectPattern(node)) {\n    return node.properties.every(prop => {\n      if (t.isObjectProperty(prop)) {\n        if (!t.isTSTypeParameter(prop.value) && isStatic(prop.value)) {\n          return true;\n        }\n        if (prop.computed && t.isExpression(prop.key) && isStatic(prop.key)) {\n          return true;\n        }\n        return false;\n      }\n      if (t.isSpreadElement(prop)) {\n        return isStatic(prop);\n      }\n      // Ignore\n      return true;\n    });\n  }\n  if (t.isAssignmentExpression(node) || t.isAssignmentPattern(node)) {\n    if (isStatic(node.right)) {\n      return true;\n    }\n    if (!t.isTSParameterProperty(node.left)) {\n      return false;\n    }\n    return isStatic(node);\n  }\n  if (t.isSequenceExpression(node)) {\n    return node.expressions.every(isStatic);\n  }\n  if (t.isConditionalExpression(node)) {\n    return (\n      isStatic(node.test) ||\n      isStatic(node.consequent) ||\n      isStatic(node.alternate)\n    );\n  }\n  if (t.isBinaryExpression(node)) {\n    if (t.isExpression(node.left)) {\n      return isStatic(node.left);\n    }\n    if (t.isExpression(node.right)) {\n      return isStatic(node.right);\n    }\n    return false;\n  }\n  if (t.isLogicalExpression(node)) {\n    return isStatic(node.left) || isStatic(node.right);\n  }\n  return false;\n}\n"
  },
  {
    "path": "packages/core/babel/core/is-yielded.ts",
    "content": "import * as t from '@babel/types';\n\nexport function isYielded(node: t.Expression | t.SpreadElement): boolean {\n  // Default\n  if (t.isYieldExpression(node)) {\n    return true;\n  }\n  if (t.isTemplateLiteral(node)) {\n    return node.expressions.some(\n      expr => t.isExpression(expr) && isYielded(expr),\n    );\n  }\n  if (\n    t.isLiteral(node) ||\n    t.isIdentifier(node) ||\n    t.isArrowFunctionExpression(node) ||\n    t.isFunctionExpression(node) ||\n    t.isClassExpression(node) ||\n    t.isYieldExpression(node) ||\n    t.isJSX(node) ||\n    t.isMetaProperty(node) ||\n    t.isSuper(node) ||\n    t.isThisExpression(node) ||\n    t.isImport(node) ||\n    t.isDoExpression(node)\n  ) {\n    return false;\n  }\n  if (t.isTaggedTemplateExpression(node)) {\n    return isYielded(node.tag) || isYielded(node.quasi);\n  }\n  if (\n    t.isUnaryExpression(node) ||\n    t.isUpdateExpression(node) ||\n    t.isSpreadElement(node)\n  ) {\n    return isYielded(node.argument);\n  }\n  if (\n    t.isParenthesizedExpression(node) ||\n    t.isTypeCastExpression(node) ||\n    t.isTSAsExpression(node) ||\n    t.isTSSatisfiesExpression(node) ||\n    t.isTSNonNullExpression(node) ||\n    t.isTSTypeAssertion(node) ||\n    t.isTSInstantiationExpression(node)\n  ) {\n    return isYielded(node.expression);\n  }\n  // Check for elements\n  if (t.isArrayExpression(node) || t.isTupleExpression(node)) {\n    return node.elements.some(el => el != null && isYielded(el));\n  }\n  // Skip arrow function\n  if (t.isAssignmentExpression(node)) {\n    if (isYielded(node.right)) {\n      return true;\n    }\n    if (t.isExpression(node.left)) {\n      return isYielded(node.left);\n    }\n    return false;\n  }\n  if (t.isBinaryExpression(node)) {\n    if (t.isExpression(node.left) && isYielded(node.left)) {\n      return true;\n    }\n    return isYielded(node.right);\n  }\n  if (\n    t.isCallExpression(node) ||\n    t.isOptionalCallExpression(node) ||\n    t.isNewExpression(node)\n  ) {\n    if (t.isExpression(node.callee) && isYielded(node.callee)) {\n      return true;\n    }\n    return node.arguments.some(\n      arg =>\n        arg &&\n        (t.isSpreadElement(arg) || t.isExpression(arg)) &&\n        isYielded(arg),\n    );\n  }\n  if (t.isConditionalExpression(node)) {\n    return (\n      isYielded(node.test) ||\n      isYielded(node.consequent) ||\n      isYielded(node.alternate)\n    );\n  }\n  if (t.isLogicalExpression(node)) {\n    return isYielded(node.left) || isYielded(node.right);\n  }\n  if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) {\n    return (\n      isYielded(node.object) ||\n      (node.computed &&\n        t.isExpression(node.property) &&\n        isYielded(node.property))\n    );\n  }\n  if (t.isSequenceExpression(node)) {\n    return node.expressions.some(isYielded);\n  }\n  if (t.isObjectExpression(node) || t.isRecordExpression(node)) {\n    return node.properties.some(prop => {\n      if (t.isObjectProperty(prop)) {\n        if (t.isExpression(prop.value) && isYielded(prop.value)) {\n          return true;\n        }\n        if (prop.computed && t.isExpression(prop.key) && isYielded(prop.key)) {\n          return true;\n        }\n        return false;\n      }\n      if (t.isSpreadElement(prop)) {\n        return isYielded(prop);\n      }\n      return false;\n    });\n  }\n  if (t.isBindExpression(node)) {\n    return isYielded(node.object) || isYielded(node.callee);\n  }\n  return false;\n}\n"
  },
  {
    "path": "packages/core/babel/core/memo-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { accessorVariable } from './accessor-variable';\nimport { getImportIdentifier } from './get-import-identifier';\nimport type { State } from './types';\nimport { UNDEFINED } from '../constants';\n\nexport function memoVariable(\n  state: State,\n  path: babel.NodePath,\n  memoIdentifier: t.Identifier,\n  stateIdentifier: t.Expression,\n  optionsIdentifier?: t.Expression,\n): t.VariableDeclarator {\n  const normalIdentifier =\n    t.isArrowFunctionExpression(stateIdentifier) ||\n    t.isFunctionExpression(stateIdentifier)\n      ? stateIdentifier\n      : t.arrowFunctionExpression([], stateIdentifier);\n\n  const exprs: t.Expression[] = [normalIdentifier];\n\n  if (state.opts.dev) {\n    exprs.push(UNDEFINED);\n    if (optionsIdentifier) {\n      exprs.push(\n        t.callExpression(\n          t.memberExpression(t.identifier('Object'), t.identifier('assign')),\n          [\n            t.objectExpression([\n              t.objectProperty(\n                t.identifier('name'),\n                t.stringLiteral(memoIdentifier.name),\n              ),\n            ]),\n            optionsIdentifier,\n          ],\n        ),\n      );\n    } else {\n      exprs.push(\n        t.objectExpression([\n          t.objectProperty(\n            t.identifier('name'),\n            t.stringLiteral(memoIdentifier.name),\n          ),\n        ]),\n      );\n    }\n  } else if (optionsIdentifier) {\n    exprs.push(UNDEFINED);\n    exprs.push(optionsIdentifier);\n  }\n\n  return accessorVariable(\n    path,\n    memoIdentifier,\n    getImportIdentifier(state, path, 'createMemo', 'solid-js'),\n    exprs,\n  );\n}\n"
  },
  {
    "path": "packages/core/babel/core/proto.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { generateUniqueName } from './generate-unique-name';\n\ninterface ProtoObjectState {\n  root: t.ObjectExpression;\n  proto: t.ObjectExpression;\n}\n\nconst ROOT_GET = 'get';\nconst ROOT_SET = 'set';\nconst ROOT_SYMBOL = '__$';\n\nconst PROTO_STATES = new WeakMap<t.Node, ProtoObjectState>();\n\nfunction getProtoState(\n  path: babel.NodePath<t.ObjectExpression>,\n): ProtoObjectState {\n  const current = PROTO_STATES.get(path.node);\n  if (current) {\n    return current;\n  }\n  const protoID = generateUniqueName(path, 'proto');\n  const proto = t.objectExpression([]);\n  path.scope.getProgramParent().push({\n    id: protoID,\n    init: proto,\n    kind: 'const',\n  });\n  path.node.properties.push(\n    t.objectProperty(t.identifier('__proto__'), protoID),\n  );\n  const state: ProtoObjectState = {\n    proto,\n    root: path.node,\n  };\n  PROTO_STATES.set(path.node, state);\n  return state;\n}\n\nfunction getGetterReplacement(\n  key: t.Expression,\n  source: t.Expression,\n  computed: boolean,\n): t.ObjectMethod {\n  return t.objectMethod(\n    'get',\n    key,\n    [],\n    t.blockStatement([t.returnStatement(t.callExpression(source, []))]),\n    computed,\n  );\n}\n\nfunction getSetterReplacement(\n  path: babel.NodePath,\n  key: t.Expression,\n  source: t.Expression,\n  computed: boolean,\n): t.ObjectMethod {\n  const param = generateUniqueName(path, 'param');\n  return t.objectMethod(\n    'set',\n    key,\n    [param],\n    t.blockStatement([\n      t.expressionStatement(\n        t.callExpression(source, [t.arrowFunctionExpression([], param)]),\n      ),\n    ]),\n    computed,\n  );\n}\n\nfunction getNamespacedKey(\n  name: string,\n  identifier: t.Expression,\n): t.Expression | undefined {\n  switch (identifier.type) {\n    case 'StringLiteral':\n    case 'NumericLiteral':\n      return t.stringLiteral(`${ROOT_SYMBOL}${name}__${identifier.value}`);\n    case 'Identifier':\n      return t.identifier(`${ROOT_SYMBOL}${name}__${identifier.name}`);\n    case 'NullLiteral':\n      return t.identifier(`${ROOT_SYMBOL}${name}__null`);\n    default:\n      return undefined;\n  }\n}\n\nfunction initProtoGetters(\n  path: babel.NodePath<t.ObjectExpression>,\n  identifier: t.Expression,\n  source: t.Identifier,\n): void {\n  const current = getProtoState(path);\n  const key = getNamespacedKey(ROOT_GET, identifier);\n  if (key) {\n    current.root.properties.push(t.objectProperty(key, source));\n  }\n}\n\nfunction registerProtoGetter(\n  path: babel.NodePath<t.ObjectExpression>,\n  identifier: t.Expression,\n): void {\n  const current = getProtoState(path);\n  const key = getNamespacedKey(ROOT_GET, identifier);\n  if (key) {\n    const targetProperty = t.memberExpression(\n      t.identifier('this'),\n      key,\n      !t.isIdentifier(key),\n    );\n    current.proto.properties.push(\n      getGetterReplacement(identifier, targetProperty, false),\n    );\n  }\n}\n\nfunction addUnoptimizedGetter(\n  property: babel.NodePath<t.ObjectProperty>,\n  key: t.Expression,\n  source: t.Identifier,\n): void {\n  property.replaceWith(\n    getGetterReplacement(key, source, property.node.computed),\n  );\n}\n\nexport function addProtoGetter(\n  path: babel.NodePath<t.ObjectExpression>,\n  property: babel.NodePath<t.ObjectProperty>,\n  identifier: t.Expression,\n  source: t.Identifier,\n): void {\n  if (property.node.computed) {\n    addUnoptimizedGetter(property, identifier, source);\n  } else {\n    initProtoGetters(path, identifier, source);\n    registerProtoGetter(path, identifier);\n    property.remove();\n  }\n}\n\nfunction initProtoSetters(\n  path: babel.NodePath<t.ObjectExpression>,\n  identifier: t.Expression,\n  source: t.Identifier,\n): void {\n  const current = getProtoState(path);\n  const key = getNamespacedKey(ROOT_SET, identifier);\n  if (key) {\n    current.root.properties.push(t.objectProperty(key, source));\n  }\n}\n\nfunction registerProtoSetter(\n  path: babel.NodePath<t.ObjectExpression>,\n  identifier: t.Expression,\n): void {\n  const current = getProtoState(path);\n  const key = getNamespacedKey(ROOT_SET, identifier);\n  if (key) {\n    const targetProperty = t.memberExpression(\n      t.identifier('this'),\n      key,\n      !t.isIdentifier(key),\n    );\n    current.proto.properties.push(\n      getSetterReplacement(path, identifier, targetProperty, false),\n    );\n  }\n}\n\nfunction addUnoptimizedSetter(\n  property: babel.NodePath<t.ObjectProperty>,\n  key: t.Expression,\n  source: t.Identifier,\n): void {\n  property.replaceWith(\n    getSetterReplacement(property, key, source, property.node.computed),\n  );\n}\n\nexport function addProtoSetter(\n  path: babel.NodePath<t.ObjectExpression>,\n  property: babel.NodePath<t.ObjectProperty>,\n  identifier: t.Expression,\n  source: t.Identifier,\n): void {\n  if (property.node.computed) {\n    addUnoptimizedSetter(property, identifier, source);\n  } else {\n    initProtoSetters(path, identifier, source);\n    registerProtoSetter(path, identifier);\n    property.remove();\n  }\n}\n\nfunction addUnoptimizedProperty(\n  property: babel.NodePath<t.ObjectProperty>,\n  key: t.PrivateName | t.Expression,\n  readSource: t.Identifier,\n  writeSource: t.Identifier,\n): void {\n  if (!t.isPrivateName(key)) {\n    const tmp = generateUniqueName(property, 'tmp');\n    property.scope.push({ id: tmp, kind: 'let' });\n    const isComputed = property.node.computed;\n    property.replaceWithMultiple([\n      getGetterReplacement(\n        isComputed ? t.assignmentExpression('=', tmp, key) : key,\n        readSource,\n        isComputed,\n      ),\n      getSetterReplacement(property, tmp, writeSource, isComputed),\n    ]);\n  }\n}\n\nexport function addProtoProperty(\n  path: babel.NodePath<t.ObjectExpression>,\n  property: babel.NodePath<t.ObjectProperty>,\n  identifier: t.Expression,\n  readSource: t.Identifier,\n  writeSource: t.Identifier,\n): void {\n  if (property.node.computed) {\n    addUnoptimizedProperty(property, identifier, readSource, writeSource);\n  } else {\n    initProtoGetters(path, identifier, readSource);\n    initProtoSetters(path, identifier, writeSource);\n    registerProtoGetter(path, identifier);\n    registerProtoSetter(path, identifier);\n    property.remove();\n  }\n}\n"
  },
  {
    "path": "packages/core/babel/core/signal-variable.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { derefSignal } from './deref-signal';\nimport { generateUniqueName } from './generate-unique-name';\nimport { getImportIdentifier } from './get-import-identifier';\nimport type { State } from './types';\n\nexport function signalVariable(\n  state: State,\n  path: babel.NodePath,\n  signalIdentifier: t.Identifier,\n  stateIdentifier: t.Expression,\n  optionsIdentifier?: t.Expression,\n): t.VariableDeclarator {\n  const readIdentifier = generateUniqueName(path, signalIdentifier.name);\n  const writeIdentifier = generateUniqueName(\n    path,\n    `set${signalIdentifier.name}`,\n  );\n\n  const callee = getImportIdentifier(state, path, 'createSignal', 'solid-js');\n  const args: t.Expression[] = [stateIdentifier];\n\n  if (state.opts.dev) {\n    const nameOption = t.objectExpression([\n      t.objectProperty(\n        t.identifier('name'),\n        t.stringLiteral(signalIdentifier.name),\n      ),\n    ]);\n    if (optionsIdentifier) {\n      args.push(\n        t.callExpression(\n          t.memberExpression(t.identifier('Object'), t.identifier('assign')),\n          [nameOption, optionsIdentifier],\n        ),\n      );\n    } else {\n      args.push(nameOption);\n    }\n  } else if (optionsIdentifier) {\n    args.push(optionsIdentifier);\n  }\n\n  derefSignal(path, signalIdentifier, readIdentifier, writeIdentifier);\n\n  return t.variableDeclarator(\n    t.arrayPattern([readIdentifier, writeIdentifier]),\n    t.callExpression(callee, args),\n  );\n}\n"
  },
  {
    "path": "packages/core/babel/core/types.ts",
    "content": "import type * as babel from '@babel/core';\nimport type * as t from '@babel/types';\n\nexport interface Options {\n  dev?: boolean;\n  disabled?: {\n    ctf?: Record<string, boolean>;\n    pragma?: Record<string, boolean>;\n    label?: Record<string, boolean>;\n  };\n}\n\ntype ImportHook = Map<string, t.Identifier>;\n\nexport interface State extends babel.PluginPass {\n  hooks: ImportHook;\n  opts: Options;\n}\n"
  },
  {
    "path": "packages/core/babel/core/unwrap-node.ts",
    "content": "import type { NodePath } from '@babel/traverse';\nimport type * as t from '@babel/types';\n\ntype TypeFilter<K extends t.Node> = (node: t.Node) => node is K;\n\ntype TypeCheck<K> = K extends TypeFilter<infer U> ? U : never;\n\ntype NestedExpression =\n  | t.ParenthesizedExpression\n  | t.TypeCastExpression\n  | t.TSAsExpression\n  | t.TSSatisfiesExpression\n  | t.TSNonNullExpression\n  | t.TSInstantiationExpression\n  | t.TSTypeAssertion;\n\nfunction isNestedExpression(node: t.Node): node is NestedExpression {\n  switch (node.type) {\n    case 'ParenthesizedExpression':\n    case 'TypeCastExpression':\n    case 'TSAsExpression':\n    case 'TSSatisfiesExpression':\n    case 'TSNonNullExpression':\n    case 'TSTypeAssertion':\n    case 'TSInstantiationExpression':\n      return true;\n    default:\n      return false;\n  }\n}\n\nexport function isPathValid<V extends t.Node>(\n  path: unknown,\n  key: TypeFilter<V>,\n): path is NodePath<V> {\n  return key((path as NodePath).node);\n}\n\nexport function unwrapNode<K extends (node: t.Node) => boolean>(\n  node: t.Node,\n  key: K,\n): TypeCheck<K> | undefined {\n  if (key(node)) {\n    return node as TypeCheck<K>;\n  }\n  if (isNestedExpression(node)) {\n    return unwrapNode(node.expression, key);\n  }\n  return undefined;\n}\n\nexport function getProperParentPath<K extends (node: t.Node) => boolean>(\n  path: NodePath,\n  key: K,\n): NodePath<TypeCheck<K>> | undefined {\n  let parent = path.parentPath;\n\n  while (parent) {\n    if (isNestedExpression(parent.node)) {\n      parent = parent.parentPath;\n    } else if (key(parent.node)) {\n      return parent as NodePath<TypeCheck<K>>;\n    } else {\n      return undefined;\n    }\n  }\n\n  return undefined;\n}\n"
  },
  {
    "path": "packages/core/babel/index.ts",
    "content": "import type * as babel from '@babel/core';\nimport { transformComponents } from './components';\nimport type { Options, State } from './core/types';\nimport { transformComments } from './transform-comment';\nimport { transformCTF } from './transform-ctf';\nimport { transformLabels } from './transform-label';\n\nexport type { Options };\n\nexport default function solidLabelsPlugin(): babel.PluginObj<State> {\n  return {\n    name: 'solid-labels',\n    pre(): void {\n      this.hooks = new Map();\n    },\n    visitor: {\n      Program(path, state): void {\n        transformComments(state, path);\n        transformLabels(state, path);\n        transformCTF(state, path);\n        transformComponents(state, path);\n      },\n    },\n  };\n}\n"
  },
  {
    "path": "packages/core/babel/transform-comment.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { accessorVariable } from './core/accessor-variable';\nimport { deferredVariable } from './core/deferred-variable';\nimport { destructureVariable } from './core/destructure-variable';\nimport { getImportIdentifier } from './core/get-import-identifier';\nimport { memoVariable } from './core/memo-variable';\nimport { signalVariable } from './core/signal-variable';\nimport type { State } from './core/types';\nimport { UNDEFINED } from './constants';\n\nconst VARIABLE_LABEL = {\n  '@signal': true,\n  '@memo': true,\n  '@deferred': true,\n  '@destructure': true,\n  '@children': true,\n};\n\ntype CallbackLabel = [name: string, source: string, named: boolean];\n\nconst CALLBACK_LABEL: Record<string, CallbackLabel> = {\n  '@effect': ['createEffect', 'solid-js', true],\n  '@computed': ['createComputed', 'solid-js', true],\n  '@renderEffect': ['createRenderEffect', 'solid-js', true],\n  '@mount': ['onMount', 'solid-js', false],\n  '@cleanup': ['onCleanup', 'solid-js', false],\n  '@error': ['onError', 'solid-js', false],\n  '@root': ['createRoot', 'solid-js', false],\n  '@untrack': ['untrack', 'solid-js', false],\n  '@batch': ['untrack', 'solid-js', false],\n  '@transition': ['startTransition', 'solid-js', false],\n};\n\nfunction getVariableLabelPreference(\n  state: State,\n  comments: t.Comment[],\n): string | undefined {\n  let preference: string | undefined;\n  for (let i = 0, len = comments.length; i < len; i++) {\n    const comment = comments[i];\n    const value: string = comment.value.trim();\n    if (value in VARIABLE_LABEL && !state.opts.disabled?.pragma?.[value]) {\n      preference = value;\n      comment.value = '';\n    }\n  }\n  return preference;\n}\n\nconst LABEL_PATTERN = /^@\\w+( .*)?$/;\n\nfunction getCallbackLabelPreference(state: State, comments: t.Comment[]) {\n  let preference: string | undefined;\n  let nameOption: string | undefined;\n  for (let i = 0, len = comments.length; i < len; i++) {\n    const comment = comments[i];\n    const value: string = comment.value.trim();\n    if (LABEL_PATTERN.test(value)) {\n      const [tag, ...debugName] = value.split(' ');\n      if (tag in CALLBACK_LABEL && !state.opts.disabled?.pragma?.[value]) {\n        preference = tag;\n        nameOption = debugName.join(' ');\n        comment.value = '';\n      }\n    }\n  }\n  return [preference, nameOption];\n}\n\nconst COMMENT_TRAVERSE: babel.Visitor<State> = {\n  VariableDeclaration(path, state) {\n    const comments = path.node.leadingComments;\n    if (comments) {\n      const preference = getVariableLabelPreference(state, comments);\n      if (preference) {\n        const { declarations } = path.node;\n        let declarators: t.VariableDeclarator[] = [];\n        for (let i = 0, len = declarations.length; i < len; i++) {\n          const declarator = declarations[i];\n          switch (preference as keyof typeof VARIABLE_LABEL) {\n            case '@signal':\n              if (t.isIdentifier(declarator.id)) {\n                declarators.push(\n                  signalVariable(\n                    state,\n                    path,\n                    declarator.id,\n                    declarator.init ?? UNDEFINED,\n                  ),\n                );\n              }\n              break;\n            case '@memo':\n              if (t.isIdentifier(declarator.id)) {\n                declarators.push(\n                  memoVariable(\n                    state,\n                    path,\n                    declarator.id,\n                    declarator.init ?? UNDEFINED,\n                  ),\n                );\n              }\n              break;\n            case '@deferred':\n              if (t.isIdentifier(declarator.id)) {\n                declarators.push(\n                  deferredVariable(\n                    state,\n                    path,\n                    declarator.id,\n                    declarator.init ?? UNDEFINED,\n                  ),\n                );\n              }\n              break;\n            case '@destructure':\n              if (\n                (t.isObjectPattern(declarator.id) ||\n                  t.isArrayPattern(declarator.id)) &&\n                declarator.init\n              ) {\n                declarators = [\n                  ...declarators,\n                  ...destructureVariable(\n                    state,\n                    path,\n                    declarator.init,\n                    declarator.id,\n                  ),\n                ];\n              }\n              break;\n            case '@children':\n              if (t.isIdentifier(declarator.id)) {\n                declarators.push(\n                  accessorVariable(\n                    path,\n                    declarator.id,\n                    getImportIdentifier(state, path, 'children', 'solid-js'),\n                    [\n                      t.arrowFunctionExpression(\n                        [],\n                        declarator.init ?? UNDEFINED,\n                      ),\n                    ],\n                  ),\n                );\n              }\n              break;\n            default:\n              break;\n          }\n        }\n\n        path.replaceWith(t.variableDeclaration('const', declarators));\n      }\n    }\n  },\n  BlockStatement(path, state) {\n    if (!t.isBlockStatement(path.parent)) {\n      return;\n    }\n    const comments = path.node.leadingComments;\n    if (comments) {\n      const [preference, nameOption] = getCallbackLabelPreference(\n        state,\n        comments,\n      );\n      if (preference) {\n        const [name, source, named] = CALLBACK_LABEL[preference];\n        const callback = t.arrowFunctionExpression([], path.node);\n        const args: t.Expression[] = [callback];\n        if (named && nameOption) {\n          args.push(\n            t.unaryExpression('void', t.numericLiteral(0)),\n            t.objectExpression([\n              t.objectProperty(\n                t.identifier('name'),\n                t.stringLiteral(nameOption),\n              ),\n            ]),\n          );\n        }\n        path.replaceWith(\n          t.callExpression(\n            getImportIdentifier(state, path, name, source),\n            args,\n          ),\n        );\n      }\n    }\n  },\n  ExpressionStatement(path, state) {\n    const comments = path.node.leadingComments;\n    if (comments) {\n      const [preference, nameOption] = getCallbackLabelPreference(\n        state,\n        comments,\n      );\n      if (preference) {\n        const [name, source, named] = CALLBACK_LABEL[preference];\n        const callback = t.arrowFunctionExpression([], path.node.expression);\n        const args: t.Expression[] = [callback];\n        if (named && nameOption) {\n          args.push(\n            UNDEFINED,\n            t.objectExpression([\n              t.objectProperty(\n                t.identifier('name'),\n                t.stringLiteral(nameOption),\n              ),\n            ]),\n          );\n        }\n        path.replaceWith(\n          t.callExpression(\n            getImportIdentifier(state, path, name, source),\n            args,\n          ),\n        );\n      }\n    }\n  },\n};\n\nexport function transformComments(state: State, path: babel.NodePath): void {\n  path.traverse(COMMENT_TRAVERSE, state);\n}\n"
  },
  {
    "path": "packages/core/babel/transform-ctf.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { accessorVariable } from './core/accessor-variable';\nimport { assert } from './core/assert';\nimport { deferredVariable } from './core/deferred-variable';\nimport { derefMemoVariable } from './core/deref-memo-variable';\nimport { derefSignalVariable } from './core/deref-signal-variable';\nimport { destructureVariable } from './core/destructure-variable';\nimport { unexpectedArgumentLength, unexpectedType } from './core/errors';\nimport { generateUniqueName } from './core/generate-unique-name';\nimport { getImportIdentifier } from './core/get-import-identifier';\nimport { memoVariable } from './core/memo-variable';\nimport { signalVariable } from './core/signal-variable';\nimport type { State } from './core/types';\nimport { unwrapNode } from './core/unwrap-node';\nimport { UNDEFINED } from './constants';\n\ntype AutoArrowCTF = [name: string, source: string, arguments: number];\n\nconst AUTO_ARROW_CTF: Record<string, AutoArrowCTF> = {\n  $lazy: ['lazy', 'solid-js', 1],\n  $untrack: ['untrack', 'solid-js', 1],\n  $batch: ['batch', 'solid-js', 1],\n  $observable: ['observable', 'solid-js', 1],\n  $selector: ['createSelector', 'solid-js', 1],\n  $on: ['on', 'solid-js', 3],\n};\n\ntype AutoImportAliasCTF = [name: string, source: string];\n\nconst AUTO_IMPORT_ALIAS_CTF: Record<string, AutoImportAliasCTF> = {\n  $root: ['createRoot', 'solid-js'],\n  $useContext: ['useContext', 'solid-js'],\n  $createContext: ['createContext', 'solid-js'],\n  $uid: ['createUniqueId', 'solid-js'],\n  $effect: ['createEffect', 'solid-js'],\n  $computed: ['createComputed', 'solid-js'],\n  $renderEffect: ['createRenderEffect', 'solid-js'],\n  $merge: ['mergeProps', 'solid-js'],\n  $resource: ['createResource', 'solid-js'],\n  $cleanup: ['onCleanup', 'solid-js'],\n  $mount: ['onMount', 'solid-js'],\n  $error: ['onError', 'solid-js'],\n  $reaction: ['createReaction', 'solid-js'],\n  $startTransition: ['startTransition', 'solid-js'],\n  $useTransition: ['useTransition', 'solid-js'],\n  $owner: ['getOwner', 'solid-js'],\n  $runWithOwner: ['runWithOwner', 'solid-js'],\n  $catchError: ['catchError', 'solid-js'],\n\n  // Store API\n  $store: ['createStore', 'solid-js/store'],\n  $mutable: ['createMutable', 'solid-js/store'],\n  $produce: ['produce', 'solid-js/store'],\n  $reconcile: ['reconcile', 'solid-js/store'],\n  $unwrap: ['unwrap', 'solid-js/store'],\n};\n\ntype AutoAccessorCTF = [\n  name: string,\n  source: string,\n  args: number,\n  arrow: boolean,\n];\n\nconst AUTO_ACCESSOR_CTF: Record<string, AutoAccessorCTF> = {\n  $from: ['from', 'solid-js', 1, true],\n  $children: ['children', 'solid-js', 1, false],\n  $mapArray: ['mapArray', 'solid-js', 3, false],\n  $indexArray: ['indexArray', 'solid-js', 3, false],\n};\n\nconst SIGNAL_CTF = '$signal';\nconst MEMO_CTF = '$memo';\nconst DEREF_SIGNAL_CTF = '$derefSignal';\nconst DEREF_MEMO_CTF = '$derefMemo';\nconst REACTIVE_CTF = '$';\nconst DEFERRED_CTF = '$deferred';\nconst DESTRUCTURE_CTF = '$destructure';\nconst COMPONENT_CTF = '$component';\n\nconst SPECIAL_CTF = new Set([\n  SIGNAL_CTF,\n  MEMO_CTF,\n  DEREF_SIGNAL_CTF,\n  DEREF_MEMO_CTF,\n  REACTIVE_CTF,\n  DEFERRED_CTF,\n  DESTRUCTURE_CTF,\n  COMPONENT_CTF,\n]);\n\nconst CTF_TRAVERSE: babel.Visitor<State> = {\n  CallExpression(path, state) {\n    const trueIdentifier = unwrapNode(path.node.callee, t.isIdentifier);\n    if (\n      trueIdentifier &&\n      !path.scope.hasBinding(trueIdentifier.name) &&\n      !state.opts.disabled?.ctf?.[trueIdentifier.name]\n    ) {\n      // Transform Auto Arrow CTFs\n      if (trueIdentifier.name in AUTO_ARROW_CTF) {\n        const [name, source, limit] = AUTO_ARROW_CTF[trueIdentifier.name];\n        const args = path.node.arguments;\n        assert(\n          args.length <= limit,\n          unexpectedArgumentLength(path, args.length, limit),\n        );\n        const [argument, ...rest] = args;\n        assert(\n          t.isExpression(argument),\n          unexpectedType(path, argument.type, 'Expression'),\n        );\n        path.replaceWith(\n          t.callExpression(getImportIdentifier(state, path, name, source), [\n            t.isArrowFunctionExpression(argument) ||\n            t.isFunctionExpression(argument)\n              ? argument\n              : t.arrowFunctionExpression([], argument),\n            ...rest,\n          ]),\n        );\n      }\n      if (trueIdentifier.name === COMPONENT_CTF) {\n        const args = path.node.arguments;\n        assert(\n          args.length === 1,\n          unexpectedArgumentLength(path, args.length, 1),\n        );\n        const argument = args[0];\n        assert(\n          t.isFunctionExpression(argument) ||\n            t.isArrowFunctionExpression(argument),\n          unexpectedType(\n            path,\n            argument.type,\n            'FunctionExpression | ArrowFunctionExpression',\n          ),\n        );\n        if (argument.params.length > 0) {\n          const params = argument.params[0];\n          if (t.isObjectPattern(params)) {\n            // Generate uid for props\n            const props = generateUniqueName(path, 'props');\n            // Replace params with props\n            argument.params[0] = props;\n            const declaration = t.variableDeclaration('const', [\n              t.variableDeclarator(\n                params,\n                t.callExpression(t.identifier('$destructure'), [props]),\n              ),\n            ]);\n            if (t.isExpression(argument.body)) {\n              argument.body = t.blockStatement([\n                declaration,\n                t.returnStatement(argument.body),\n              ]);\n            } else {\n              argument.body.body.unshift(declaration);\n            }\n          }\n        }\n        path.replaceWith(argument);\n      }\n    }\n  },\n  Expression(path, state) {\n    if (t.isIdentifier(path.node) && !path.scope.hasBinding(path.node.name)) {\n      if (\n        path.node.name in AUTO_IMPORT_ALIAS_CTF &&\n        !state.opts.disabled?.ctf?.[path.node.name]\n      ) {\n        const [name, source] = AUTO_IMPORT_ALIAS_CTF[path.node.name];\n        path.replaceWith(getImportIdentifier(state, path, name, source));\n      }\n    }\n  },\n  VariableDeclarator(path, state) {\n    const { id, init } = path.node;\n    if (init) {\n      const trueCallExpr = unwrapNode(init, t.isCallExpression);\n      if (trueCallExpr) {\n        const trueCallee = unwrapNode(trueCallExpr.callee, t.isIdentifier);\n        if (\n          trueCallee &&\n          !path.scope.hasBinding(trueCallee.name) &&\n          (SPECIAL_CTF.has(trueCallee.name) ||\n            trueCallee.name in AUTO_ACCESSOR_CTF) &&\n          !state.opts.disabled?.ctf?.[trueCallee.name]\n        ) {\n          if (t.isIdentifier(id)) {\n            // Transform CTFs with auto-accessor\n            if (trueCallee.name in AUTO_ACCESSOR_CTF) {\n              const [name, source, limit, arrow] =\n                AUTO_ACCESSOR_CTF[trueCallee.name];\n              const args = trueCallExpr.arguments;\n              assert(\n                args.length <= limit,\n                unexpectedArgumentLength(path, args.length, limit),\n              );\n              const [argument, ...rest] = args;\n              assert(\n                t.isExpression(argument),\n                unexpectedType(path, argument.type, 'Expression'),\n              );\n              path.replaceWith(\n                accessorVariable(\n                  path,\n                  id,\n                  getImportIdentifier(state, path, name, source),\n                  [\n                    arrow ? t.arrowFunctionExpression([], argument) : argument,\n                    ...rest,\n                  ],\n                ),\n              );\n            } else if (trueCallee.name === SIGNAL_CTF) {\n              // Transform $signal\n              const args = trueCallExpr.arguments;\n              assert(\n                args.length <= 2,\n                unexpectedArgumentLength(path, args.length, 2),\n              );\n              let argument: t.Expression | undefined;\n              let options: t.Expression | undefined;\n              if (trueCallExpr.arguments.length > 0) {\n                const initialState = trueCallExpr.arguments[0];\n                assert(\n                  t.isExpression(initialState),\n                  unexpectedType(path, initialState.type, 'Expression'),\n                );\n                argument = initialState;\n                if (trueCallExpr.arguments.length > 1) {\n                  const optionsValue = trueCallExpr.arguments[1];\n                  assert(\n                    t.isExpression(optionsValue),\n                    unexpectedType(path, optionsValue.type, 'Expression'),\n                  );\n                  options = optionsValue;\n                }\n              }\n              path.replaceWith(\n                signalVariable(state, path, id, argument || UNDEFINED, options),\n              );\n            } else if (\n              trueCallee.name === MEMO_CTF ||\n              trueCallee.name === REACTIVE_CTF\n            ) {\n              // Transform $memo\n              const args = trueCallExpr.arguments;\n              assert(\n                args.length <= 2,\n                unexpectedArgumentLength(path, args.length, 2),\n              );\n              const argument = args[0];\n              assert(\n                t.isExpression(argument),\n                unexpectedType(path, argument.type, 'Expression'),\n              );\n              let options: t.Expression | undefined;\n              if (args.length > 1) {\n                const optionsValue = args[1];\n                assert(\n                  t.isExpression(optionsValue),\n                  unexpectedType(path, optionsValue.type, 'Expression'),\n                );\n                options = optionsValue;\n              }\n              path.replaceWith(\n                memoVariable(state, path, id, argument, options),\n              );\n            } else if (trueCallee.name === DEREF_SIGNAL_CTF) {\n              // Transform $derefSignal\n              const args = trueCallExpr.arguments;\n              assert(\n                args.length === 1,\n                unexpectedArgumentLength(path, args.length, 1),\n              );\n              const argument = args[0];\n              assert(\n                t.isExpression(argument),\n                unexpectedType(path, argument.type, 'Expression'),\n              );\n              path.replaceWith(derefSignalVariable(path, id, argument));\n            } else if (trueCallee.name === DEREF_MEMO_CTF) {\n              // Transform $derefMemo\n              const args = trueCallExpr.arguments;\n              assert(\n                args.length === 1,\n                unexpectedArgumentLength(path, args.length, 1),\n              );\n              const argument = args[0];\n              assert(\n                t.isExpression(argument),\n                unexpectedType(path, argument.type, 'Expression'),\n              );\n              path.replaceWith(derefMemoVariable(path, id, argument));\n            } else if (trueCallee.name === DEFERRED_CTF) {\n              // Transform $deferred\n              const args = trueCallExpr.arguments;\n              assert(\n                args.length <= 2,\n                unexpectedArgumentLength(path, args.length, 2),\n              );\n              let argument: t.Expression | undefined;\n              let options: t.Expression | undefined;\n              if (args.length > 0) {\n                const initialState = args[0];\n                assert(\n                  t.isExpression(initialState),\n                  unexpectedType(path, initialState.type, 'Expression'),\n                );\n                argument = initialState;\n                if (args.length > 1) {\n                  const optionsValue = args[1];\n                  assert(\n                    t.isExpression(optionsValue),\n                    unexpectedType(path, optionsValue.type, 'Expression'),\n                  );\n                  options = optionsValue;\n                }\n              }\n              path.replaceWith(\n                deferredVariable(state, path, id, argument, options),\n              );\n            }\n          } else if (trueCallee.name === DESTRUCTURE_CTF) {\n            const args = trueCallExpr.arguments;\n            assert(\n              args.length === 1,\n              unexpectedArgumentLength(path, args.length, 1),\n            );\n            const argument = args[0];\n            assert(\n              t.isExpression(argument),\n              unexpectedType(path, argument.type, 'Expression'),\n            );\n            assert(\n              t.isObjectPattern(id) || t.isArrayPattern(id),\n              unexpectedType(path, id.type, 'ArrayPattern | ObjectPattern'),\n            );\n            path.replaceWithMultiple(\n              destructureVariable(state, path, argument, id),\n            );\n          }\n          path.scope.crawl();\n        }\n      }\n    }\n  },\n  ExpressionStatement(path, state) {\n    const trueCallExpr = unwrapNode(path.node.expression, t.isCallExpression);\n    if (trueCallExpr) {\n      const trueCallee = unwrapNode(trueCallExpr.callee, t.isIdentifier);\n      if (\n        trueCallee &&\n        !path.scope.hasBinding(trueCallee.name) &&\n        !state.opts.disabled?.ctf?.[trueCallee.name]\n      ) {\n        // Transform $\n        if (trueCallee.name === REACTIVE_CTF) {\n          const args = trueCallExpr.arguments;\n          assert(\n            args.length === 1,\n            unexpectedArgumentLength(path, args.length, 1),\n          );\n          const argument = args[0];\n          assert(\n            t.isExpression(argument),\n            unexpectedType(path, argument.type, 'Expression'),\n          );\n          path.replaceWith(\n            t.expressionStatement(\n              t.callExpression(\n                getImportIdentifier(state, path, 'createEffect', 'solid-js'),\n                [\n                  t.isArrowFunctionExpression(argument) ||\n                  t.isFunctionExpression(argument)\n                    ? argument\n                    : t.arrowFunctionExpression([], argument),\n                ],\n              ),\n            ),\n          );\n        }\n      }\n    }\n  },\n};\n\nexport function transformCTF(state: State, path: babel.NodePath): void {\n  path.traverse(CTF_TRAVERSE, state);\n}\n"
  },
  {
    "path": "packages/core/babel/transform-label.ts",
    "content": "import type * as babel from '@babel/core';\nimport * as t from '@babel/types';\nimport { accessorVariable } from './core/accessor-variable';\nimport { assert } from './core/assert';\nimport { deferredVariable } from './core/deferred-variable';\nimport { destructureVariable } from './core/destructure-variable';\nimport { unexpectedType } from './core/errors';\nimport { getImportIdentifier } from './core/get-import-identifier';\nimport { memoVariable } from './core/memo-variable';\nimport { signalVariable } from './core/signal-variable';\nimport type { State } from './core/types';\nimport { UNDEFINED } from './constants';\n\nconst REACTIVE_LABEL = '$';\n\nconst SPECIAL_LABELS = new Set([REACTIVE_LABEL]);\n\nconst VARIABLE_LABEL = {\n  signal: true,\n  memo: true,\n  deferred: true,\n  destructure: true,\n  children: true,\n};\n\ntype CallbackLabel = [name: string, source: string, named: boolean];\n\nconst CALLBACK_LABEL: Record<string, CallbackLabel> = {\n  effect: ['createEffect', 'solid-js', true],\n  computed: ['createComputed', 'solid-js', true],\n  renderEffect: ['createRenderEffect', 'solid-js', true],\n  mount: ['onMount', 'solid-js', false],\n  cleanup: ['onCleanup', 'solid-js', false],\n  error: ['onError', 'solid-js', false],\n  root: ['createRoot', 'solid-js', false],\n  untrack: ['untrack', 'solid-js', false],\n  batch: ['untrack', 'solid-js', false],\n  transition: ['startTransition', 'solid-js', false],\n};\n\nfunction transformReactiveLabel(\n  state: State,\n  path: babel.NodePath,\n  body: t.Statement,\n): void {\n  let target: t.Expression | t.BlockStatement;\n  if (t.isExpressionStatement(body)) {\n    target = body.expression;\n  } else if (t.isBlockStatement(body)) {\n    target = body;\n  } else {\n    throw unexpectedType(\n      path,\n      body.type,\n      'ExpressionStatement | BlockStatement',\n    );\n  }\n  path.replaceWith(\n    t.callExpression(\n      getImportIdentifier(state, path, 'createEffect', 'solid-js'),\n      [t.arrowFunctionExpression([], target)],\n    ),\n  );\n}\n\nfunction transformDeclaratorFromVariableLabel(\n  state: State,\n  path: babel.NodePath,\n  labelName: keyof typeof VARIABLE_LABEL,\n  declarator: t.VariableDeclarator,\n): t.VariableDeclarator[] {\n  if (labelName === 'signal' && t.isIdentifier(declarator.id)) {\n    return [\n      signalVariable(state, path, declarator.id, declarator.init ?? UNDEFINED),\n    ];\n  }\n  if (labelName === 'memo' && t.isIdentifier(declarator.id)) {\n    return [\n      memoVariable(state, path, declarator.id, declarator.init ?? UNDEFINED),\n    ];\n  }\n  if (labelName === 'deferred' && t.isIdentifier(declarator.id)) {\n    return [\n      deferredVariable(\n        state,\n        path,\n        declarator.id,\n        declarator.init ?? UNDEFINED,\n      ),\n    ];\n  }\n  if (\n    labelName === 'destructure' &&\n    (t.isObjectPattern(declarator.id) || t.isArrayPattern(declarator.id)) &&\n    declarator.init\n  ) {\n    return destructureVariable(state, path, declarator.init, declarator.id);\n  }\n  if (labelName === 'children' && t.isIdentifier(declarator.id)) {\n    return [\n      accessorVariable(\n        path,\n        declarator.id,\n        getImportIdentifier(state, path, 'children', 'solid-js'),\n        [t.arrowFunctionExpression([], declarator.init ?? UNDEFINED)],\n      ),\n    ];\n  }\n  return [];\n}\n\nfunction transformVariableLabel(\n  state: State,\n  path: babel.NodePath,\n  labelName: keyof typeof VARIABLE_LABEL,\n  body: t.Statement,\n): void {\n  assert(\n    t.isVariableDeclaration(body),\n    unexpectedType(path, path.node.type, 'VariableDeclaration'),\n  );\n\n  const declarators: t.VariableDeclarator[] = [];\n\n  for (let i = 0, len = body.declarations.length; i < len; i++) {\n    declarators.push.apply(\n      declarators,\n      transformDeclaratorFromVariableLabel(\n        state,\n        path,\n        labelName,\n        body.declarations[i],\n      ),\n    );\n  }\n\n  path.replaceWith(t.variableDeclaration('const', declarators));\n}\n\nfunction transformCallbackLabel(\n  state: State,\n  path: babel.NodePath,\n  labelName: string,\n  body: t.Statement,\n): void {\n  const [name, source, named] = CALLBACK_LABEL[labelName];\n  let nameOption: string | undefined;\n  let callback: t.Expression;\n  let currentBody = body;\n  if (named && t.isLabeledStatement(currentBody)) {\n    nameOption = currentBody.label.name;\n    currentBody = currentBody.body;\n  }\n  if (t.isBlockStatement(currentBody)) {\n    callback = t.arrowFunctionExpression([], currentBody);\n  } else if (t.isExpressionStatement(currentBody)) {\n    callback = currentBody.expression;\n  } else {\n    throw unexpectedType(\n      path,\n      currentBody.type,\n      'BlockStatement | ExpressionStatement',\n    );\n  }\n  const args: t.Expression[] = [callback];\n  if (named && nameOption) {\n    args.push(\n      UNDEFINED,\n      t.objectExpression([\n        t.objectProperty(t.identifier('name'), t.stringLiteral(nameOption)),\n      ]),\n    );\n  }\n  path.replaceWith(\n    t.callExpression(getImportIdentifier(state, path, name, source), args),\n  );\n}\n\nconst LABEL_TRAVERSE: babel.Visitor<State> = {\n  LabeledStatement(path, state) {\n    const labelName = path.node.label.name;\n    const { body } = path.node;\n    if (\n      (SPECIAL_LABELS.has(labelName) ||\n        labelName in VARIABLE_LABEL ||\n        labelName in CALLBACK_LABEL) &&\n      !state.opts.disabled?.label?.[labelName]\n    ) {\n      if (labelName === REACTIVE_LABEL) {\n        transformReactiveLabel(state, path, body);\n      } else if (labelName in VARIABLE_LABEL) {\n        transformVariableLabel(\n          state,\n          path,\n          labelName as keyof typeof VARIABLE_LABEL,\n          body,\n        );\n      } else if (labelName in CALLBACK_LABEL) {\n        transformCallbackLabel(state, path, labelName, body);\n      }\n    }\n  },\n};\n\nexport function transformLabels(state: State, path: babel.NodePath): void {\n  path.traverse(LABEL_TRAVERSE, state);\n}\n"
  },
  {
    "path": "packages/core/example.js",
    "content": "import * as babel from '@babel/core';\nimport plugin from './dist/esm/development/babel.mjs';\n\nasync function compile(code, dev) {\n  const result = await babel.transformAsync(code, {\n    plugins: [[plugin, { dev }]],\n    parserOpts: {\n      plugins: ['jsx'],\n    },\n  });\n\n  return result?.code ?? '';\n}\n\nconsole.log(\n  await compile(`\nlet foo = $signal('foo');\nlet bar = $signal('bar')\nlet baz = $memo('baz');\n\nconst example = {\n  foo: $property(foo),\n  [baz]: $property(bar),\n  baz: baz,\n};\n\n$(console.log(example.foo, example.bar));\n`),\n);\n"
  },
  {
    "path": "packages/core/package.json",
    "content": "{\n  \"version\": \"0.17.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": {\n      \"development\": {\n        \"require\": \"./dist/cjs/development/index.cjs\",\n        \"import\": \"./dist/esm/development/index.mjs\"\n      },\n      \"require\": \"./dist/cjs/production/index.cjs\",\n      \"import\": \"./dist/esm/production/index.mjs\",\n      \"types\": \"./dist/types/src/index.d.ts\"\n    },\n    \"./babel\": {\n      \"development\": {\n        \"require\": \"./dist/cjs/development/babel.cjs\",\n        \"import\": \"./dist/esm/development/babel.mjs\"\n      },\n      \"require\": \"./dist/cjs/production/babel.cjs\",\n      \"import\": \"./dist/esm/production/babel.mjs\",\n      \"types\": \"./dist/types/babel/index.d.ts\"\n    }\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"engines\": {\n    \"node\": \">=10\"\n  },\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"pridepack\",\n    \"babel\",\n    \"solid-js\",\n    \"labels\",\n    \"reactivity\"\n  ],\n  \"name\": \"solid-labels\",\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.26.9\",\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/babel__traverse\": \"^7.20.6\",\n    \"@types/node\": \"^22.13.4\",\n    \"pridepack\": \"2.6.1\",\n    \"solid-js\": \"^1.9.3\",\n    \"tslib\": \"^2.8.1\",\n    \"typescript\": \"^5.8.2\",\n    \"vitest\": \"^3.0.6\"\n  },\n  \"peerDependencies\": {\n    \"@babel/core\": \"^7.25\",\n    \"solid-js\": \"^1.3\"\n  },\n  \"dependencies\": {\n    \"@babel/traverse\": \"^7.26.9\",\n    \"@babel/types\": \"^7.26.9\"\n  },\n  \"scripts\": {\n    \"prepublish\": \"pridepack clean && pridepack build\",\n    \"build\": \"pridepack build\",\n    \"type-check\": \"pridepack check\",\n    \"lint\": \"pridepack lint\",\n    \"clean\": \"pridepack clean\",\n    \"watch\": \"pridepack watch\",\n    \"test\": \"vitest\"\n  },\n  \"description\": \"Simple, reactive labels for SolidJS\",\n  \"repository\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-labels.git\",\n    \"type\": \"git\"\n  },\n  \"homepage\": \"https://github.com/lxsmnsyc/solid-labels/tree/main/packages/core\",\n  \"bugs\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-labels/issues\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"author\": \"Alexis Munsayac\",\n  \"private\": false,\n  \"typesVersions\": {\n    \"*\": {\n      \"babel\": [\n        \"./dist/types/babel/index.d.ts\"\n      ]\n    }\n  },\n  \"types\": \"./dist/types/src/index.d.ts\",\n  \"main\": \"./dist/cjs/production/index.cjs\",\n  \"module\": \"./dist/esm/production/index.mjs\"\n}\n"
  },
  {
    "path": "packages/core/pridepack.json",
    "content": "{\r\n  \"target\": \"es2018\",\r\n  \"entrypoints\": {\r\n    \".\": \"src/index.ts\",\r\n    \"./babel\": \"babel/index.ts\"\r\n  }\r\n}\r\n"
  },
  {
    "path": "packages/core/src/index.ts",
    "content": "import type * as solid from 'solid-js';\nimport type * as solidStore from 'solid-js/store';\nimport type * as solidWeb from 'solid-js/web';\n\ndeclare global {\n  type Accessor<T> = solid.Accessor<T>;\n  type Setter<T> = solid.Setter<T>;\n  type Context<T> = solid.Context<T>;\n  type ObservableObserver<T> = solid.ObservableObserver<T>;\n  type Component<T extends Record<string, any> = {}> = solid.Component<T>;\n\n  function $signal<T>(): T | undefined;\n  function $signal<T>(\n    value: T,\n    options?: {\n      equals?: false | ((prev: T, next: T) => boolean);\n      name?: string;\n      internal?: boolean;\n    },\n  ): T;\n\n  function $memo<T>(\n    value: T,\n    options?: {\n      equals?: false | ((prev: T, next: T) => boolean);\n      name?: string;\n    },\n  ): T;\n  function $memo<T>(\n    value: T,\n    options?: {\n      equals?: false | ((prev: T, next: T) => boolean);\n      name?: string;\n    },\n  ): T;\n\n  function $untrack<T>(value: T): T;\n  function $batch<T>(value: T): T;\n\n  function $<T>(value: T): T;\n\n  function $derefSignal<T>(value: [Accessor<T>, Setter<T>]): T;\n  function $refSignal<T>(value: T): [Accessor<T>, Setter<T>];\n  function $derefMemo<T>(value: Accessor<T>): T;\n  function $refMemo<T>(value: T): Accessor<T>;\n\n  function $get<T>(value: T): Accessor<T>;\n  function $set<T>(value: T): Setter<T>;\n\n  // Object property transforms\n  function $getter<T>(value: T): T;\n  function $setter<T>(value: T): T;\n  function $property<T>(value: T): T;\n\n  function $selector<T, U>(\n    source: T,\n    fn?: (a: U, b: T) => boolean,\n    options?: { name?: string },\n  ): (key: U) => boolean;\n\n  function $on<T, U>(\n    deps: T,\n    fn: (input: T, prevInput: T, prevValue?: U) => U,\n    options?: { defer?: boolean },\n  ): (prevValue?: U) => U;\n\n  function $deferred<T>(\n    source: T,\n    options?: {\n      equals?: false | ((prev: T, next: T) => boolean);\n      name?: string;\n      timeoutMs?: number;\n    },\n  ): T;\n\n  function $lazy<T extends Component<any>>(\n    fn: Promise<{ default: T }>,\n  ): T & {\n    preload: () => void;\n  };\n\n  function $children(value: solid.JSX.Element): solid.JSX.Element;\n\n  interface Observable<T> {\n    subscribe(\n      observer: ObservableObserver<T>,\n    ): { unsubscribe(): void } | (() => void);\n  }\n\n  function $observable<T>(value: T): Observable<T>;\n  function $from<T>(observable: Observable<T>): T;\n  function $from<T>(produce: (setter: Setter<T>) => () => void): T;\n\n  function $mapArray<T, U>(\n    arr: readonly T[] | undefined | null | false,\n    mapFn: (v: T, i: Accessor<number>) => U,\n    options?: {\n      fallback?: Accessor<any>;\n    },\n  ): U[];\n  function $indexArray<T, U>(\n    arr: readonly T[] | undefined | null | false,\n    mapFn: (v: Accessor<T>, i: number) => U,\n    options?: {\n      fallback?: Accessor<any>;\n    },\n  ): U[];\n\n  function $destructure<T>(value: T): T;\n\n  // Auto imports\n\n  const $effect: typeof solid.createEffect;\n  const $computed: typeof solid.createComputed;\n  const $renderEffect: typeof solid.createRenderEffect;\n\n  const $useContext: typeof solid.useContext;\n  const $createContext: typeof solid.createContext;\n\n  const $uid: typeof solid.createUniqueId;\n  const $root: typeof solid.createRoot;\n  const $resource: typeof solid.createResource;\n  const $merge: typeof solid.mergeProps;\n\n  const $reaction: typeof solid.createReaction;\n  const $mount: typeof solid.onMount;\n  // @deprecated\n  const $error: typeof solid.onError;\n  const $cleanup: typeof solid.onCleanup;\n  const $catchError: typeof solid.catchError;\n\n  const $startTransition: typeof solid.startTransition;\n  const $useTransition: typeof solid.useTransition;\n\n  const $owner: typeof solid.getOwner;\n  const $runWithOwner: typeof solid.runWithOwner;\n\n  // store\n  const $store: typeof solidStore.createStore;\n  const $mutable: typeof solidStore.createMutable;\n  const $produce: typeof solidStore.produce;\n  const $reconcile: typeof solidStore.reconcile;\n  const $unwrap: typeof solidStore.unwrap;\n\n  // components\n  const For: typeof solid.For;\n  const Show: typeof solid.Show;\n  const Switch: typeof solid.Switch;\n  const Match: typeof solid.Match;\n  const Index: typeof solid.Index;\n  const ErrorBoundary: typeof solid.ErrorBoundary;\n  const Suspense: typeof solid.Suspense;\n  const SuspenseList: typeof solid.SuspenseList;\n  const Dynamic: typeof solidWeb.Dynamic;\n  const Portal: typeof solidWeb.Portal;\n  const Assets: typeof solidWeb.Assets;\n  const HydrationScript: typeof solidWeb.HydrationScript;\n  const NoHydration: typeof solidWeb.NoHydration;\n\n  function $component<P>(\n    Comp: (props: P) => solid.JSX.Element,\n  ): (props: P) => solid.JSX.Element;\n}\n\ntype Props<T> = T extends (props: infer P) => solid.JSX.Element ? P : never;\n\ndeclare module 'solid-js' {\n  // biome-ignore lint/style/noNamespace: <explanation>\n  namespace JSX {\n    interface IntrinsicElements {\n      'solid:error-boundary': Props<typeof ErrorBoundary>;\n      'solid:suspense': Props<typeof Suspense>;\n      'solid:suspense-list': Props<typeof SuspenseList>;\n      'solid:portal': Props<typeof solidWeb.Portal>;\n      'solid:assets': Props<typeof solidWeb.Assets>;\n      'solid:hydration-script': Props<typeof solidWeb.HydrationScript>;\n      'solid:no-hydration': Props<typeof solidWeb.NoHydration>;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/test/__snapshots__/ctf.test.ts.snap",
    "content": "// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html\n\nexports[`ctf > $component > should transform $component 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n};\"\n`;\n\nexports[`ctf > $component > should transform $component bindings 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n  _createEffect(() => {\n    console.log(prop_2(), prop_3());\n  });\n  _createEffect(() => {\n    console.log(prop_5(), prop_6());\n  });\n  _createEffect(() => {\n    console.log(other_1);\n  });\n};\"\n`;\n\nexports[`ctf > $component > should transform $component bindings 2`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n  _createEffect(() => {\n    console.log({\n      b: prop_2()\n    }, {\n      c: prop_3()\n    });\n  });\n  _createEffect(() => {\n    console.log({\n      d: prop_5()\n    }, {\n      e: prop_6()\n    });\n  });\n  _createEffect(() => {\n    console.log(other_1);\n  });\n};\"\n`;\n\nexports[`ctf > $component > should transform $component bindings on $get 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n  _createEffect(() => {\n    console.log(prop_2, prop_3);\n  });\n  _createEffect(() => {\n    console.log(prop_5, prop_6);\n  });\n  _createEffect(() => {\n    console.log(other_1);\n  });\n};\"\n`;\n\nexports[`ctf > $component > should transform $component bindings on $getter 1`] = `\n\"const proto_1 = {\n    get b() {\n      return this.__$get__b();\n    }\n  },\n  proto_2 = {\n    get c() {\n      return this.__$get__c();\n    }\n  },\n  proto_3 = {\n    get d() {\n      return this.__$get__d();\n    }\n  },\n  proto_4 = {\n    get e() {\n      return this.__$get__e();\n    }\n  };\nimport { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n  _createEffect(() => {\n    console.log({\n      __proto__: proto_1,\n      __$get__b: prop_2\n    }, {\n      __proto__: proto_2,\n      __$get__c: prop_3\n    });\n  });\n  _createEffect(() => {\n    console.log({\n      __proto__: proto_3,\n      __$get__d: prop_5\n    }, {\n      __proto__: proto_4,\n      __$get__e: prop_6\n    });\n  });\n  _createEffect(() => {\n    console.log(other_1);\n  });\n};\"\n`;\n\nexports[`ctf > $component > should transform $component bindings on $property 1`] = `\n\"const proto_1 = {\n    get b() {\n      return this.__$get__b();\n    }\n  },\n  proto_2 = {\n    get c() {\n      return this.__$get__c();\n    }\n  },\n  proto_3 = {\n    get d() {\n      return this.__$get__d();\n    }\n  },\n  proto_4 = {\n    get e() {\n      return this.__$get__e();\n    }\n  };\nimport { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n  _createEffect(() => {\n    console.log({\n      __proto__: proto_1,\n      __$get__b: prop_2\n    }, {\n      __proto__: proto_2,\n      __$get__c: prop_3\n    });\n  });\n  _createEffect(() => {\n    console.log({\n      __proto__: proto_3,\n      __$get__d: prop_5\n    }, {\n      __proto__: proto_4,\n      __$get__e: prop_6\n    });\n  });\n  _createEffect(() => {\n    console.log(other_1);\n  });\n};\"\n`;\n\nexports[`ctf > $component > should transform $component bindings on $refMemo 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nprops_1 => {\n  const prop_1 = () => props_1.a,\n    prop_2 = () => prop_1().b,\n    prop_3 = () => prop_1().c,\n    other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n    prop_4 = () => props_1.b,\n    def_1 = defaultD,\n    prop_5 = () => {\n      const value_1 = prop_4().d;\n      return value_1 === void 0 ? def_1 : value_1;\n    },\n    def_2 = defaultE,\n    prop_6 = () => {\n      const value_2 = prop_4().e;\n      return value_2 === void 0 ? def_2 : value_2;\n    },\n    other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n    other_1 = _splitProps(props_1, [\"a\", \"b\"])[1];\n  _createEffect(() => {\n    console.log(prop_2, prop_3);\n  });\n  _createEffect(() => {\n    console.log(prop_5, prop_6);\n  });\n  _createEffect(() => {\n    console.log(other_1);\n  });\n};\"\n`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo 1`] = `\"const message_1 = () => \\`Count: \\${count}\\`;\"`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo bindings 1`] = `\n\"const message_1 = () => \\`Count: \\${count}\\`;\nconst value = message_1();\"\n`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo bindings 2`] = `\n\"const message_1 = () => \\`Count: \\${count}\\`;\nconst value = {\n  message: message_1()\n};\"\n`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo on $get 1`] = `\n\"const message_1 = () => \\`Count: \\${count}\\`;\nconst value = message_1;\"\n`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo on $getter 1`] = `\n\"const proto_1 = {\n  get message() {\n    return this.__$get__message();\n  }\n};\nconst message_1 = () => \\`Count: \\${count}\\`;\nconst value = {\n  __proto__: proto_1,\n  __$get__message: message_1\n};\"\n`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo on $property 1`] = `\n\"const proto_1 = {\n  get message() {\n    return this.__$get__message();\n  }\n};\nconst message_1 = () => \\`Count: \\${count}\\`;\nconst value = {\n  __proto__: proto_1,\n  __$get__message: message_1\n};\"\n`;\n\nexports[`ctf > $derefMemo > should transform $derefMemo on $refMemo 1`] = `\n\"const message_1 = () => \\`Count: \\${count}\\`;\nconst value = message_1;\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal 1`] = `\"const [count_1, setcount_1] = createSignal(0);\"`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings 1`] = `\n\"const [count_1, setcount_1] = createSignal(0);\nconst value = count_1();\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings 2`] = `\n\"const [count_1, setcount_1] = createSignal(0);\nconst value = {\n  count: count_1()\n};\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings for $get 1`] = `\n\"const [count_1, setcount_1] = createSignal(0);\nconst value = count_1;\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings for $getter 1`] = `\n\"const proto_1 = {\n  get count() {\n    return this.__$get__count();\n  }\n};\nconst [count_1, setcount_1] = createSignal(0);\nconst value = {\n  __proto__: proto_1,\n  __$get__count: setcount_1\n};\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings for $property 1`] = `\n\"const proto_1 = {\n  get count() {\n    return this.__$get__count();\n  },\n  set count(param_1) {\n    this.__$set__count(() => param_1);\n  }\n};\nconst [count_1, setcount_1] = createSignal(0);\nconst value = {\n  __proto__: proto_1,\n  __$get__count: count_1,\n  __$set__count: setcount_1\n};\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings for $refSignal 1`] = `\n\"const [count_1, setcount_1] = createSignal(0);\nconst value = [count_1, setcount_1];\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings for $set 1`] = `\n\"const [count_1, setcount_1] = createSignal(0);\nconst value = setcount_1;\"\n`;\n\nexports[`ctf > $derefSignal > should transform $derefSignal bindings for $setter 1`] = `\n\"const proto_1 = {\n  set count(param_1) {\n    this.__$set__count(() => param_1);\n  }\n};\nconst [count_1, setcount_1] = createSignal(0);\nconst value = {\n  __proto__: proto_1,\n  __$set__count: setcount_1\n};\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure bindings 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log(prop_2(), prop_3());\n});\n_createEffect(() => {\n  console.log(prop_5(), prop_6());\n});\n_createEffect(() => {\n  console.log(other_1);\n});\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure bindings 2`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log({\n    b: prop_2()\n  }, {\n    c: prop_3()\n  });\n});\n_createEffect(() => {\n  console.log({\n    d: prop_5()\n  }, {\n    e: prop_6()\n  });\n});\n_createEffect(() => {\n  console.log(other_1);\n});\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure bindings on $get 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log(prop_2, prop_3);\n});\n_createEffect(() => {\n  console.log(prop_5, prop_6);\n});\n_createEffect(() => {\n  console.log(other_1);\n});\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure bindings on $getter 1`] = `\n\"const proto_1 = {\n    get b() {\n      return this.__$get__b();\n    }\n  },\n  proto_2 = {\n    get c() {\n      return this.__$get__c();\n    }\n  },\n  proto_3 = {\n    get d() {\n      return this.__$get__d();\n    }\n  },\n  proto_4 = {\n    get e() {\n      return this.__$get__e();\n    }\n  };\nimport { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log({\n    __proto__: proto_1,\n    __$get__b: prop_2\n  }, {\n    __proto__: proto_2,\n    __$get__c: prop_3\n  });\n});\n_createEffect(() => {\n  console.log({\n    __proto__: proto_3,\n    __$get__d: prop_5\n  }, {\n    __proto__: proto_4,\n    __$get__e: prop_6\n  });\n});\n_createEffect(() => {\n  console.log(other_1);\n});\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure bindings on $property 1`] = `\n\"const proto_1 = {\n    get b() {\n      return this.__$get__b();\n    }\n  },\n  proto_2 = {\n    get c() {\n      return this.__$get__c();\n    }\n  },\n  proto_3 = {\n    get d() {\n      return this.__$get__d();\n    }\n  },\n  proto_4 = {\n    get e() {\n      return this.__$get__e();\n    }\n  };\nimport { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log({\n    __proto__: proto_1,\n    __$get__b: prop_2\n  }, {\n    __proto__: proto_2,\n    __$get__c: prop_3\n  });\n});\n_createEffect(() => {\n  console.log({\n    __proto__: proto_3,\n    __$get__d: prop_5\n  }, {\n    __proto__: proto_4,\n    __$get__e: prop_6\n  });\n});\n_createEffect(() => {\n  console.log(other_1);\n});\"\n`;\n\nexports[`ctf > $destructure > should transform $destructure bindings on $refMemo 1`] = `\n\"import { splitProps as _splitProps } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nlet prop_1 = () => x.a,\n  prop_2 = () => prop_1().b,\n  prop_3 = () => prop_1().c,\n  other_2 = _splitProps(prop_1(), [\"b\", \"c\"])[1],\n  prop_4 = () => x.b,\n  def_1 = defaultD,\n  prop_5 = () => {\n    const value_1 = prop_4().d;\n    return value_1 === void 0 ? def_1 : value_1;\n  },\n  def_2 = defaultE,\n  prop_6 = () => {\n    const value_2 = prop_4().e;\n    return value_2 === void 0 ? def_2 : value_2;\n  },\n  other_3 = _splitProps(prop_4(), [\"d\", \"e\"])[1],\n  other_1 = _splitProps(x, [\"a\", \"b\"])[1];\n_createEffect(() => {\n  console.log(prop_2, prop_3);\n});\n_createEffect(() => {\n  console.log(prop_5, prop_6);\n});\n_createEffect(() => {\n  console.log(other_1);\n});\"\n`;\n\nexports[`ctf > $effect, $renderEffect, $computed > should transform $effect, $renderEffect, $computed 1`] = `\n\"import { createRenderEffect as _createRenderEffect } from \"solid-js\";\nimport { createComputed as _createComputed } from \"solid-js\";\nimport { createEffect as _createEffect } from \"solid-js\";\nimport { createSignal as _createSignal } from \"solid-js\";\nlet [x_1, setx_1] = _createSignal(0);\n_createEffect(() => {\n  console.log('Count', x_1());\n});\n_createComputed(() => {\n  console.log('Count', x_1());\n});\n_createRenderEffect(() => {\n  console.log('Count', x_1());\n});\"\n`;\n\nexports[`ctf > $memo > should transform $memo 1`] = `\n\"import { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\"\n`;\n\nexports[`ctf > $memo > should transform $memo bindings 1`] = `\n\"import { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\nconst value = message_1();\"\n`;\n\nexports[`ctf > $memo > should transform $memo bindings 2`] = `\n\"import { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\nconst value = {\n  message: message_1()\n};\"\n`;\n\nexports[`ctf > $memo > should transform $memo on $get 1`] = `\n\"import { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\nconst value = message_1;\"\n`;\n\nexports[`ctf > $memo > should transform $memo on $getter 1`] = `\n\"const proto_1 = {\n  get message() {\n    return this.__$get__message();\n  }\n};\nimport { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\nconst value = {\n  __proto__: proto_1,\n  __$get__message: message_1\n};\"\n`;\n\nexports[`ctf > $memo > should transform $memo on $property 1`] = `\n\"const proto_1 = {\n  get message() {\n    return this.__$get__message();\n  }\n};\nimport { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\nconst value = {\n  __proto__: proto_1,\n  __$get__message: message_1\n};\"\n`;\n\nexports[`ctf > $memo > should transform $memo on $refMemo 1`] = `\n\"import { createMemo as _createMemo } from \"solid-js\";\nconst message_1 = _createMemo(() => \\`Count: \\${count}\\`);\nconst value = message_1;\"\n`;\n\nexports[`ctf > $signal > should transform $signal 1`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings 1`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = count_1();\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings 2`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = {\n  count: count_1()\n};\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings 3`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nasync function exampleA() {\n  const tmp_1 = await asyncValue();\n  setcount_1(() => tmp_1);\n}\nfunction* exampleB() {\n  const tmp_2 = yield asyncValue();\n  setcount_1(() => tmp_2);\n}\nasync function* exampleC() {\n  const tmp_3 = yield asyncValue();\n  setcount_1(() => tmp_3);\n}\nconst example = async () => {\n  const tmp_4 = await asyncValue();\n  return setcount_1(() => tmp_4);\n};\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings for $get 1`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = count_1;\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings for $getter 1`] = `\n\"const proto_1 = {\n  get count() {\n    return this.__$get__count();\n  }\n};\nimport { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = {\n  __proto__: proto_1,\n  __$get__count: setcount_1\n};\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings for $property 1`] = `\n\"const proto_1 = {\n  get count() {\n    return this.__$get__count();\n  },\n  set count(param_1) {\n    this.__$set__count(() => param_1);\n  }\n};\nimport { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = {\n  __proto__: proto_1,\n  __$get__count: count_1,\n  __$set__count: setcount_1\n};\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings for $refSignal 1`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = [count_1, setcount_1];\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings for $set 1`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = setcount_1;\"\n`;\n\nexports[`ctf > $signal > should transform $signal bindings for $setter 1`] = `\n\"const proto_1 = {\n  set count(param_1) {\n    this.__$set__count(() => param_1);\n  }\n};\nimport { createSignal as _createSignal } from \"solid-js\";\nlet [count_1, setcount_1] = _createSignal(0);\nconst value = {\n  __proto__: proto_1,\n  __$set__count: setcount_1\n};\"\n`;\n\nexports[`ctf > variable shadowing > should respect variable shadowing 1`] = `\n\"import { createSignal as _createSignal } from \"solid-js\";\nconst [selected_1, setselected_1] = _createSignal('root');\n{\n  const selected = 'local';\n  console.log(selected); // 'local'\n  {\n    console.log(selected); // 'local'\n    {\n      const [selected_2, setselected_2] = _createSignal('inner');\n      console.log(selected_2()); // 'inner'\n      {\n        console.log(selected_2()); // 'inner'\n      }\n    }\n  }\n}\"\n`;\n"
  },
  {
    "path": "packages/core/test/ctf.test.ts",
    "content": "import * as babel from '@babel/core';\nimport { describe, expect, it } from 'vitest';\nimport plugin from '../babel';\n\nasync function compile(code: string, dev?: boolean): Promise<string> {\n  const result = await babel.transformAsync(code, {\n    plugins: [[plugin, { dev }]],\n    parserOpts: {\n      plugins: ['jsx'],\n    },\n  });\n\n  return result?.code ?? '';\n}\n\ndescribe('ctf', () => {\n  describe('$signal', () => {\n    it('should transform $signal', async () => {\n      expect(await compile('let count = $signal(0);')).toMatchSnapshot();\n    });\n    it('should transform $signal bindings', async () => {\n      let code = `\n      let count = $signal(0);\n      const value = count;\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      let count = $signal(0);\n      const value = { count };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      let count = $signal(0);\n\n      async function exampleA() {\n        count = await asyncValue();\n      }\n      function* exampleB() {\n        count = yield asyncValue();\n      }\n      async function* exampleC() {\n        count = yield asyncValue();\n      }\n\n      const example = async () => (count = await asyncValue());\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $signal bindings for $set', async () => {\n      const code = `\n      let count = $signal(0);\n      const value = $set(count);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $signal bindings for $get', async () => {\n      const code = `\n      let count = $signal(0);\n      const value = $get(count);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $signal bindings for $refSignal', async () => {\n      const code = `\n      let count = $signal(0);\n      const value = $refSignal(count);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $signal bindings for $getter', async () => {\n      const code = `\n      let count = $signal(0);\n      const value = { count: $getter(count) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $signal bindings for $setter', async () => {\n      const code = `\n      let count = $signal(0);\n      const value = { count: $setter(count) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $signal bindings for $property', async () => {\n      const code = `\n      let count = $signal(0);\n      const value = { count: $property(count) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n  describe('$memo', () => {\n    it('should transform $memo', async () => {\n      const code = 'const message = $memo(`Count: ${count}`);';\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $memo bindings', async () => {\n      let code = `\n      const message = $memo(\\`Count: \\${count}\\`)\n      const value = message;\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      const message = $memo(\\`Count: \\${count}\\`)\n      const value = { message };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $memo on $get', async () => {\n      const code = `\n      const message = $memo(\\`Count: \\${count}\\`)\n      const value = $get(message);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $memo on $refMemo', async () => {\n      const code = `\n      const message = $memo(\\`Count: \\${count}\\`)\n      const value = $refMemo(message);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $memo on $getter', async () => {\n      const code = `\n      const message = $memo(\\`Count: \\${count}\\`)\n      const value = { message: $getter(message) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $memo on $property', async () => {\n      const code = `\n      const message = $memo(\\`Count: \\${count}\\`)\n      const value = { message: $property(message) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n  describe('$derefSignal', () => {\n    it('should transform $derefSignal', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings', async () => {\n      let code = `\n      const count = $derefSignal(createSignal(0));\n      const value = count;\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      const count = $derefSignal(createSignal(0));\n      const value = { count };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings for $set', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      const value = $set(count);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings for $get', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      const value = $get(count);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings for $refSignal', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      const value = $refSignal(count);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings for $getter', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      const value = { count: $getter(count) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings for $setter', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      const value = { count: $setter(count) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefSignal bindings for $property', async () => {\n      const code = `\n      const count = $derefSignal(createSignal(0));\n      const value = { count: $property(count) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n  describe('$derefMemo', () => {\n    it('should transform $derefMemo', async () => {\n      const code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefMemo bindings', async () => {\n      let code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      const value = message;\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      const value = { message };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefMemo on $get', async () => {\n      const code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      const value = $get(message);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefMemo on $refMemo', async () => {\n      const code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      const value = $refMemo(message);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefMemo on $getter', async () => {\n      const code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      const value = { message: $getter(message) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $derefMemo on $property', async () => {\n      const code = `\n      const message = $derefMemo(() => \\`Count: \\${count}\\`);\n      const value = { message: $property(message) };\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n  describe('$destructure', () => {\n    it('should transform $destructure', async () => {\n      const code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $destructure bindings', async () => {\n      let code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\n      effect: {\n        console.log(b, c);\n      }\n      effect: {\n        console.log(d, e);\n      }\n      effect: {\n        console.log(f);\n      }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\n      effect: {\n        console.log({ b }, { c });\n      }\n      effect: {\n        console.log({ d }, { e });\n      }\n      effect: {\n        console.log(f);\n      }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $destructure bindings on $get', async () => {\n      const code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\n      effect: {\n        console.log($get(b), $get(c));\n      }\n      effect: {\n        console.log($get(d), $get(e));\n      }\n      effect: {\n        console.log(f);\n      }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $destructure bindings on $refMemo', async () => {\n      const code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\n      effect: {\n        console.log($refMemo(b), $refMemo(c));\n      }\n      effect: {\n        console.log($refMemo(d), $refMemo(e));\n      }\n      effect: {\n        console.log(f);\n      }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $destructure bindings on $getter', async () => {\n      const code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\n      effect: {\n        console.log({ b: $getter(b) }, { c: $getter(c) });\n      }\n      effect: {\n        console.log({ d: $getter(d) }, { e: $getter(e) });\n      }\n      effect: {\n        console.log(f);\n      }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $destructure bindings on $property', async () => {\n      const code = `\n      let { a: { b, c }, b: { d = defaultD, e = defaultE }, ...f } = $destructure(x);\n\n      effect: {\n        console.log({ b: $property(b) }, { c: $property(c) });\n      }\n      effect: {\n        console.log({ d: $property(d) }, { e: $property(e) });\n      }\n      effect: {\n        console.log(f);\n      }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n  describe('$component', () => {\n    it('should transform $component', async () => {\n      const code = `\n      $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $component bindings', async () => {\n      let code = `\n      $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n        effect: {\n          console.log(b, c);\n        }\n        effect: {\n          console.log(d, e);\n        }\n        effect: {\n          console.log(f);\n        }\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n      code = `\n      $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n        effect: {\n          console.log({ b }, { c });\n        }\n        effect: {\n          console.log({ d }, { e });\n        }\n        effect: {\n          console.log(f);\n        }\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $component bindings on $get', async () => {\n      const code = `\n        $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n          effect: {\n            console.log($get(b), $get(c));\n          }\n          effect: {\n            console.log($get(d), $get(e));\n          }\n          effect: {\n            console.log(f);\n          }\n        });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $component bindings on $refMemo', async () => {\n      const code = `\n      $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n        effect: {\n          console.log($refMemo(b), $refMemo(c));\n        }\n        effect: {\n          console.log($refMemo(d), $refMemo(e));\n        }\n        effect: {\n          console.log(f);\n        }\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $component bindings on $getter', async () => {\n      const code = `\n      $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n        effect: {\n          console.log({ b: $getter(b) }, { c: $getter(c) });\n        }\n        effect: {\n          console.log({ d: $getter(d) }, { e: $getter(e) });\n        }\n        effect: {\n          console.log(f);\n        }\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n    it('should transform $component bindings on $property', async () => {\n      const code = `\n      $component(({ a: { b, c }, b: { d = defaultD, e = defaultE }, ...f }) => {\n        effect: {\n          console.log({ b: $property(b) }, { c: $property(c) });\n        }\n        effect: {\n          console.log({ d: $property(d) }, { e: $property(e) });\n        }\n        effect: {\n          console.log(f);\n        }\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n  describe('$effect, $renderEffect, $computed', () => {\n    it('should transform $effect, $renderEffect, $computed', async () => {\n      const code = `\n      let x = $signal(0);\n\n      $effect(() => {\n        console.log('Count', x);\n      });\n      $computed(() => {\n        console.log('Count', x);\n      });\n      $renderEffect(() => {\n        console.log('Count', x);\n      });\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n\n  describe('variable shadowing', () => {\n    it('should respect variable shadowing', async () => {\n      const code = `\n        const selected = $signal('root');\n        {\n          const selected = 'local';\n          console.log(selected); // 'local'\n          {\n            console.log(selected); // 'local'\n            {\n              const selected = $signal('inner');\n              console.log(selected); // 'inner'\n              {\n                console.log(selected); // 'inner'\n              }\n            }   \n          }\n        }\n      `;\n      expect(await compile(code)).toMatchSnapshot();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/tsconfig.json",
    "content": "{\n  \"exclude\": [\"node_modules\"],\n  \"include\": [\"src\", \"types\", \"babel\"],\n  \"compilerOptions\": {\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"importHelpers\": true,\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"rootDir\": \"./\",\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"jsx\": \"react\",\n    \"esModuleInterop\": true,\n    \"target\": \"ES2017\",\n    \"useDefineForClassFields\": false,\n    \"declarationMap\": true\n  }\n}\n"
  },
  {
    "path": "packages/rollup/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.production\n.env.development\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.npmrc\n"
  },
  {
    "path": "packages/rollup/README.md",
    "content": "# rollup-plugin-solid-labels\n\n> Rollup plugin for [`solid-labels`](https://github.com/lxsmnsyc/solid-labels)\n\n[![NPM](https://img.shields.io/npm/v/rollup-plugin-solid-labels.svg)](https://www.npmjs.com/package/rollup-plugin-solid-labels) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n\n## Install\n\n```bash\nnpm install --D solid-labels rollup-plugin-solid-labels\n```\n\n```bash\nyarn add -D solid-labels rollup-plugin-solid-labels\n```\n\n```bash\npnpm add -D solid-labels rollup-plugin-solid-labels\n```\n\n## Usage\n\n```js\nimport solidLabels from 'rollup-plugin-solid-labels';\n\n///...\nsolidLabels({\n  dev: true, // defaults to false\n  disabled: {\n    labels: {\n      signal: true,\n    },\n    pragma: {\n      '@signal': true,\n    },\n    ctf: {\n      $signal: true,\n    },\n  },\n  filter: {\n    include: 'src/**/*.{ts,js,tsx,jsx}',\n    exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',\n  },\n})\n```\n\n> [!INFO]\n> When you are using a SolidJS Rollup plugin, make sure that solid-labels runs first.\n\n## Sponsors\n\n![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)\n\n## License\n\nMIT © [lxsmnsyc](https://github.com/lxsmnsyc)\n"
  },
  {
    "path": "packages/rollup/package.json",
    "content": "{\n  \"version\": \"0.17.0\",\n  \"type\": \"module\",\n  \"types\": \"./dist/types/index.d.ts\",\n  \"main\": \"./dist/cjs/production/index.cjs\",\n  \"module\": \"./dist/esm/production/index.mjs\",\n  \"exports\": {\n    \".\": {\n      \"development\": {\n        \"require\": \"./dist/cjs/development/index.cjs\",\n        \"import\": \"./dist/esm/development/index.mjs\"\n      },\n      \"require\": \"./dist/cjs/production/index.cjs\",\n      \"import\": \"./dist/esm/production/index.mjs\",\n      \"types\": \"./dist/types/index.d.ts\"\n    }\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"engines\": {\n    \"node\": \">=10\"\n  },\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"pridepack\",\n    \"babel\",\n    \"solid-js\",\n    \"labels\",\n    \"reactivity\"\n  ],\n  \"name\": \"rollup-plugin-solid-labels\",\n  \"devDependencies\": {\n    \"@types/node\": \"^22.13.4\",\n    \"pridepack\": \"2.6.1\",\n    \"rollup\": \"^4.24.0\",\n    \"tslib\": \"^2.8.1\",\n    \"typescript\": \"^5.8.2\"\n  },\n  \"dependencies\": {\n    \"unplugin-solid-labels\": \"0.17.0\"\n  },\n  \"peerDependencies\": {\n    \"rollup\": \"^3 || ^4\",\n    \"solid-labels\": \"^0.16\"\n  },\n  \"scripts\": {\n    \"prepublish\": \"pridepack clean && pridepack build\",\n    \"build\": \"pridepack build\",\n    \"type-check\": \"pridepack check\",\n    \"lint\": \"pridepack lint\",\n    \"clean\": \"pridepack clean\",\n    \"watch\": \"pridepack watch\"\n  },\n  \"description\": \"Simple, reactive labels for SolidJS\",\n  \"repository\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-labels.git\",\n    \"type\": \"git\"\n  },\n  \"homepage\": \"https://github.com/lxsmnsyc/solid-labels/tree/main/packages/vite\",\n  \"bugs\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-labels/issues\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"author\": \"Alexis Munsayac\",\n  \"private\": false,\n  \"typesVersions\": {\n    \"*\": {}\n  }\n}\n"
  },
  {
    "path": "packages/rollup/pridepack.json",
    "content": "{\r\n  \"target\": \"es2018\"\r\n}\r\n"
  },
  {
    "path": "packages/rollup/src/index.ts",
    "content": "import type { SolidLabelsPluginOptions } from 'unplugin-solid-labels';\nimport solidLabelsUnplugin from 'unplugin-solid-labels';\nimport type { Plugin } from 'rollup';\n\nexport type {\n  SolidLabelsPluginFilter,\n  SolidLabelsPluginOptions,\n} from 'unplugin-solid-labels';\n\nconst solidLabelsPlugin = solidLabelsUnplugin.rollup as (\n  options: SolidLabelsPluginOptions,\n) => Plugin;\n\nexport default solidLabelsPlugin;\n"
  },
  {
    "path": "packages/rollup/tsconfig.json",
    "content": "{\n  \"exclude\": [\"node_modules\"],\n  \"include\": [\"src\", \"types\"],\n  \"compilerOptions\": {\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"importHelpers\": true,\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"rootDir\": \"./src\",\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"jsx\": \"react\",\n    \"esModuleInterop\": true,\n    \"target\": \"ES2017\",\n    \"useDefineForClassFields\": false,\n    \"declarationMap\": true\n  }\n}\n"
  },
  {
    "path": "packages/unplugin/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.production\n.env.development\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.npmrc\n"
  },
  {
    "path": "packages/unplugin/README.md",
    "content": "# unplugin-solid-labels\n\n> [Unplugin](https://github.com/unjs/unplugin) for [`solid-labels`](https://github.com/lxsmnsyc/solid-labels)\n\n[![NPM](https://img.shields.io/npm/v/unplugin-solid-labels.svg)](https://www.npmjs.com/package/unplugin-solid-labels) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n\n## Install\n\n```bash\nnpm install --D solid-labels unplugin-solid-labels\n```\n\n```bash\nyarn add -D solid-labels unplugin-solid-labels\n```\n\n```bash\npnpm add -D solid-labels unplugin-solid-labels\n```\n\n## Usage\n\n```js\nimport solidLabels from 'unplugin-solid-labels';\n\n///...\nsolidLabels.vite({\n  dev: true, // defaults to false\n  disabled: {\n    labels: {\n      signal: true,\n    },\n    pragma: {\n      '@signal': true,\n    },\n    ctf: {\n      $signal: true,\n    },\n  },\n  filter: {\n    include: 'src/**/*.{ts,js,tsx,jsx}',\n    exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',\n  },\n})\n```\n\n## Sponsors\n\n![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)\n\n## License\n\nMIT © [lxsmnsyc](https://github.com/lxsmnsyc)\n"
  },
  {
    "path": "packages/unplugin/package.json",
    "content": "{\n  \"name\": \"unplugin-solid-labels\",\n  \"version\": \"0.17.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"dist\",\n    \"babel\",\n    \"core\"\n  ],\n  \"engines\": {\n    \"node\": \">=10\"\n  },\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"pridepack\"\n  ],\n  \"devDependencies\": {\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/node\": \"^22.13.4\",\n    \"pridepack\": \"2.6.1\",\n    \"rollup\": \"^4.34.8\",\n    \"solid-labels\": \"0.17.0\",\n    \"tslib\": \"^2.8.1\",\n    \"typescript\": \"^5.8.2\",\n    \"vite\": \"^6.1.1\"\n  },\n  \"dependencies\": {\n    \"@babel/core\": \"^7.26.9\",\n    \"@rollup/pluginutils\": \"^5.1.4\",\n    \"unplugin\": \"^2.2.0\"\n  },\n  \"peerDependencies\": {\n    \"rollup\": \"^3 || 4\",\n    \"solid-labels\": \"^0.16\",\n    \"vite\": \"^3 || ^4 || ^5\"\n  },\n  \"peerDependenciesMeta\": {\n    \"vite\": {\n      \"optional\": true\n    },\n    \"rollup\": {\n      \"optional\": true\n    }\n  },\n  \"scripts\": {\n    \"prepublishOnly\": \"pridepack clean && pridepack build\",\n    \"build\": \"pridepack build\",\n    \"type-check\": \"pridepack check\",\n    \"lint\": \"pridepack lint\",\n    \"clean\": \"pridepack clean\",\n    \"watch\": \"pridepack watch\",\n    \"start\": \"pridepack start\",\n    \"dev\": \"pridepack dev\"\n  },\n  \"description\": \"Rollup plugin for solid-styled\",\n  \"repository\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-styled.git\",\n    \"type\": \"git\"\n  },\n  \"homepage\": \"https://github.com/lxsmnsyc/solid-styled/packages/rollup\",\n  \"bugs\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-styled/issues\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"author\": \"Alexis Munsayac\",\n  \"private\": false,\n  \"types\": \"./dist/types/index.d.ts\",\n  \"main\": \"./dist/cjs/production/index.cjs\",\n  \"module\": \"./dist/esm/production/index.mjs\",\n  \"exports\": {\n    \".\": {\n      \"development\": {\n        \"require\": \"./dist/cjs/development/index.cjs\",\n        \"import\": \"./dist/esm/development/index.mjs\"\n      },\n      \"require\": \"./dist/cjs/production/index.cjs\",\n      \"import\": \"./dist/esm/production/index.mjs\",\n      \"types\": \"./dist/types/index.d.ts\"\n    }\n  },\n  \"typesVersions\": {\n    \"*\": {}\n  }\n}\n"
  },
  {
    "path": "packages/unplugin/pridepack.json",
    "content": "{\n  \"target\": \"es2018\"\n}\n"
  },
  {
    "path": "packages/unplugin/src/index.ts",
    "content": "import * as babel from '@babel/core';\nimport type { FilterPattern } from '@rollup/pluginutils';\nimport { createFilter } from '@rollup/pluginutils';\nimport path from 'node:path';\nimport type { Options } from 'solid-labels/babel';\nimport solidLabelsBabel from 'solid-labels/babel';\nimport type { TransformResult } from 'unplugin';\nimport { createUnplugin } from 'unplugin';\nimport type { Plugin } from 'vite';\n\nexport interface SolidLabelsPluginFilter {\n  include?: FilterPattern;\n  exclude?: FilterPattern;\n}\n\nexport interface SolidLabelsPluginOptions extends Options {\n  filter?: SolidLabelsPluginFilter;\n}\n\n// From: https://github.com/bluwy/whyframe/blob/master/packages/jsx/src/index.js#L27-L37\nfunction repushPlugin(\n  plugins: Plugin[],\n  pluginName: string,\n  pluginNames: string[],\n): void {\n  const namesSet = new Set(pluginNames);\n\n  let baseIndex = -1;\n  let targetIndex = -1;\n  let targetPlugin: Plugin | undefined;\n  for (let i = 0, len = plugins.length; i < len; i += 1) {\n    const current = plugins[i];\n    if (namesSet.has(current.name) && baseIndex === -1) {\n      baseIndex = i;\n    }\n    if (current.name === pluginName) {\n      targetIndex = i;\n      targetPlugin = current;\n    }\n  }\n  if (\n    targetPlugin &&\n    baseIndex !== -1 &&\n    targetIndex !== -1 &&\n    baseIndex < targetIndex\n  ) {\n    plugins.splice(targetIndex, 1);\n    plugins.splice(baseIndex, 0, targetPlugin);\n  }\n}\n\nconst DEFAULT_INCLUDE = 'src/**/*.{jsx,tsx,ts,js,mjs,cjs}';\nconst DEFAULT_EXCLUDE = 'node_modules/**/*.{jsx,tsx,ts,js,mjs,cjs}';\n\nconst FILE_FILTER = /\\.[mc]?tsx?$/i;\n\nconst solidLabelsPlugin = createUnplugin(\n  (options: SolidLabelsPluginOptions = {}) => {\n    const filter = createFilter(\n      options.filter?.include || DEFAULT_INCLUDE,\n      options.filter?.exclude || DEFAULT_EXCLUDE,\n    );\n\n    let env: string;\n\n    return {\n      name: 'solid-labels',\n      transformInclude(id): boolean {\n        return filter(id);\n      },\n      async transform(code, id): Promise<TransformResult> {\n        const plugins: NonNullable<\n          NonNullable<babel.TransformOptions['parserOpts']>['plugins']\n        > = ['jsx'];\n        if (FILE_FILTER.test(id)) {\n          plugins.push('typescript');\n        }\n        const result = await babel.transformAsync(code, {\n          plugins: [\n            [\n              solidLabelsBabel,\n              {\n                disabled: options.disabled,\n                dev: env === 'development' || options.dev,\n              },\n            ],\n          ],\n          parserOpts: {\n            plugins,\n          },\n          filename: path.basename(id),\n          ast: false,\n          sourceMaps: true,\n          configFile: false,\n          babelrc: false,\n          sourceFileName: id,\n        });\n\n        if (result) {\n          return {\n            code: result.code || '',\n            map: result.map,\n          };\n        }\n        return undefined;\n      },\n      vite: {\n        enforce: 'pre',\n        configResolved(config): void {\n          env = config.mode !== 'production' ? 'development' : 'production';\n\n          // run our plugin before the following plugins:\n          repushPlugin(config.plugins as Plugin[], 'solid-labels', [\n            // https://github.com/withastro/astro/blob/main/packages/astro/src/vite-plugin-jsx/index.ts#L173\n            'astro:jsx',\n            // https://github.com/solidjs/vite-plugin-solid/blob/master/src/index.ts#L305\n            'solid',\n            // https://github.com/solidjs/solid-start/blob/main/packages/start/vite/plugin.js#L118\n            'solid-start-file-system-router',\n          ]);\n        },\n      },\n    };\n  },\n);\n\nexport default solidLabelsPlugin;\n"
  },
  {
    "path": "packages/unplugin/tsconfig.json",
    "content": "{\n  \"exclude\": [\"node_modules\"],\n  \"include\": [\"src\"],\n  \"compilerOptions\": {\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"importHelpers\": true,\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"rootDir\": \"./src\",\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"jsx\": \"react\",\n    \"esModuleInterop\": true,\n    \"target\": \"ES2017\",\n    \"useDefineForClassFields\": false,\n    \"declarationMap\": true\n  }\n}\n"
  },
  {
    "path": "packages/vite/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.production\n.env.development\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.npmrc\n"
  },
  {
    "path": "packages/vite/README.md",
    "content": "# vite-plugin-solid-labels\n\n> Vite plugin for [`solid-labels`](https://github.com/lxsmnsyc/solid-labels)\n\n[![NPM](https://img.shields.io/npm/v/vite-plugin-solid-labels.svg)](https://www.npmjs.com/package/vite-plugin-solid-labels) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n\n## Install\n\n```bash\nnpm install --D solid-labels vite-plugin-solid-labels\n```\n\n```bash\nyarn add -D solid-labels vite-plugin-solid-labels\n```\n\n```bash\npnpm add -D solid-labels vite-plugin-solid-labels\n```\n\n## Usage\n\n```js\nimport solidLabels from 'vite-plugin-solid-labels';\n\n///...\nsolidLabels({\n  dev: true, // defaults to false\n  disabled: {\n    labels: {\n      signal: true,\n    },\n    pragma: {\n      '@signal': true,\n    },\n    ctf: {\n      $signal: true,\n    },\n  },\n  filter: {\n    include: 'src/**/*.{ts,js,tsx,jsx}',\n    exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',\n  },\n})\n```\n\n## Sponsors\n\n![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)\n\n## License\n\nMIT © [lxsmnsyc](https://github.com/lxsmnsyc)\n"
  },
  {
    "path": "packages/vite/package.json",
    "content": "{\n  \"version\": \"0.17.0\",\n  \"type\": \"module\",\n  \"types\": \"./dist/types/index.d.ts\",\n  \"main\": \"./dist/cjs/production/index.cjs\",\n  \"module\": \"./dist/esm/production/index.mjs\",\n  \"exports\": {\n    \".\": {\n      \"development\": {\n        \"require\": \"./dist/cjs/development/index.cjs\",\n        \"import\": \"./dist/esm/development/index.mjs\"\n      },\n      \"require\": \"./dist/cjs/production/index.cjs\",\n      \"import\": \"./dist/esm/production/index.mjs\",\n      \"types\": \"./dist/types/index.d.ts\"\n    }\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"engines\": {\n    \"node\": \">=10\"\n  },\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"pridepack\",\n    \"babel\",\n    \"solid-js\",\n    \"labels\",\n    \"reactivity\"\n  ],\n  \"name\": \"vite-plugin-solid-labels\",\n  \"devDependencies\": {\n    \"@types/node\": \"^22.13.4\",\n    \"pridepack\": \"2.6.0\",\n    \"rollup\": \"^4.34.8\",\n    \"solid-labels\": \"0.17.0\",\n    \"tslib\": \"^2.8.1\",\n    \"typescript\": \"^5.8.2\",\n    \"vite\": \"^6.1.1\"\n  },\n  \"dependencies\": {\n    \"unplugin-solid-labels\": \"0.17.0\"\n  },\n  \"peerDependencies\": {\n    \"solid-labels\": \"^0.16\",\n    \"vite\": \"^3 || ^4 || ^5\"\n  },\n  \"scripts\": {\n    \"prepublish\": \"pridepack clean && pridepack build\",\n    \"build\": \"pridepack build\",\n    \"type-check\": \"pridepack check\",\n    \"lint\": \"pridepack lint\",\n    \"clean\": \"pridepack clean\",\n    \"watch\": \"pridepack watch\"\n  },\n  \"description\": \"Simple, reactive labels for SolidJS\",\n  \"repository\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-labels.git\",\n    \"type\": \"git\"\n  },\n  \"homepage\": \"https://github.com/lxsmnsyc/solid-labels/tree/main/packages/vite\",\n  \"bugs\": {\n    \"url\": \"https://github.com/lxsmnsyc/solid-labels/issues\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"author\": \"Alexis Munsayac\",\n  \"private\": false,\n  \"typesVersions\": {\n    \"*\": {}\n  }\n}\n"
  },
  {
    "path": "packages/vite/pridepack.json",
    "content": "{\r\n  \"target\": \"es2018\"\r\n}\r\n"
  },
  {
    "path": "packages/vite/src/index.ts",
    "content": "import type { SolidLabelsPluginOptions } from 'unplugin-solid-labels';\nimport solidLabelsUnplugin from 'unplugin-solid-labels';\nimport type { Plugin } from 'vite';\n\nexport type {\n  SolidLabelsPluginFilter,\n  SolidLabelsPluginOptions,\n} from 'unplugin-solid-labels';\n\nconst solidLabelsPlugin = solidLabelsUnplugin.vite as (\n  options: SolidLabelsPluginOptions,\n) => Plugin;\n\nexport default solidLabelsPlugin;\n"
  },
  {
    "path": "packages/vite/tsconfig.json",
    "content": "{\n  \"exclude\": [\"node_modules\"],\n  \"include\": [\"src\", \"types\"],\n  \"compilerOptions\": {\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"importHelpers\": true,\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"rootDir\": \"./src\",\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"jsx\": \"react\",\n    \"esModuleInterop\": true,\n    \"target\": \"ES2017\",\n    \"useDefineForClassFields\": false,\n    \"declarationMap\": true\n  }\n}\n"
  },
  {
    "path": "pnpm-workspace.yaml",
    "content": "packages:\n- 'packages/**/*'\n- 'examples/**/*'"
  }
]