tailwind-styled-v4 5.0.37 → 5.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +118 -82
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +28 -14
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +105 -68
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +40 -13
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +577 -426
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +466 -304
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +826 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +287 -29
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +71 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.js +333 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +26 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +679 -502
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +467 -307
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +145 -319
- package/dist/index.d.ts +145 -319
- package/dist/index.js +1329 -7441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1266 -7385
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +318 -243
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +256 -181
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +93 -49
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-api.mjs +26 -6
- package/dist/plugin-api.mjs.map +1 -1
- package/dist/plugin-registry.js +67 -40
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +14 -10
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.js +101 -53
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +30 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +47 -15
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +13 -5
- package/dist/preset.mjs.map +1 -1
- package/dist/rspack.js +82 -50
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +20 -12
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +62 -24
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +15 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/runtime.js +97 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.js +163 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +67 -39
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.js +441 -295
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +253 -122
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +39 -10
- package/dist/storybook-addon.js.map +1 -1
- package/dist/storybook-addon.mjs +8 -3
- package/dist/storybook-addon.mjs.map +1 -1
- package/dist/svelte.js +88 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +28 -13
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +68 -37
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +8 -7
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +55 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.js +131 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +42 -13
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +150 -116
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +124 -81
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +560 -421
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +460 -302
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +561 -446
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +433 -321
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +95 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +30 -14
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +110 -78
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +45 -17
- package/dist/webpackLoader.mjs.map +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../packages/domain/plugin-registry/registry.json","../packages/domain/plugin-registry/src/index.ts"],"names":["exports","fileURLToPath","createRequire","join","resolve","spawnSync","existsSync","readFileSync"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAA,gBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,+CAAA,CAAAA,SAAA,EAAA,MAAA,EAAA;AAAA,IAAA,MAAA,CAAA,OAAA,GAAA;AAAA,MACE,OAAA,EAAW,OAAA;AAAA,MACX,SAAA,EAAa,YAAA;AAAA,MACb,QAAA,EAAY;AAAA,QACV;AAAA,UACE,IAAA,EAAQ,mCAAA;AAAA,UACR,WAAA,EAAe,iGAAA;AAAA,UACf,OAAA,EAAW,OAAA;AAAA,UACX,IAAA,EAAQ,CAAC,WAAA,EAAa,QAAA,EAAU,cAAc,WAAW,CAAA;AAAA,UACzD,IAAA,EAAQ,kFAAA;AAAA,UACR,OAAA,EAAW,qDAAA;AAAA,UACX,SAAA,EAAa;AAAA,SACf;AAAA,QACA;AAAA,UACE,IAAA,EAAQ,oCAAA;AAAA,UACR,WAAA,EAAe,mFAAA;AAAA,UACf,OAAA,EAAW,OAAA;AAAA,UACX,IAAA,EAAQ,CAAC,YAAA,EAAc,OAAA,EAAS,YAAY,SAAS,CAAA;AAAA,UACrD,IAAA,EAAQ,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AAC,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAyB,MAAM,MAAS,CAAA;AAAA,EACrG;AACF;AAEA,IAAM,MAAA,GAAS,EAAE,eAAA,EAAiB,IAAA,EAA8B;AAEzD,SAAS,WAAA,GAA8B;AAC5C,EAAA,IAAI,CAAC,OAAO,eAAA,EAAiB;AAC3B,IAAA,MAAM,YAAA,GAAe,gBAAA,EAAA;AACrB,IAAA,MAAA,CAAO,eAAA,GAAkB,IAAI,cAAA,CAAe,YAAY,CAAA;AAAA,EAC1D;AACA,EAAA,OAAO,MAAA,CAAO,eAAA;AAChB;AAEO,IAAM,WAAW,WAAA","file":"plugin-registry.js","sourcesContent":["{\n \"version\": \"5.0.0\",\n \"updatedAt\": \"2026-03-23\",\n \"official\": [\n {\n \"name\": \"@tailwind-styled/plugin-animation\",\n \"description\": \"Animation presets and keyframes — enter/exit transitions, spring physics, scroll-triggered\",\n \"version\": \"5.0.0\",\n \"tags\": [\"animation\", \"motion\", \"transition\", \"keyframes\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/packages/animate\",\n \"install\": \"npm install @tailwind-styled/plugin-animation@5.0.0\",\n \"integrity\": \"sha256-abc123\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-typography\",\n \"description\": \"Prose and typography utilities — headings, body, code blocks, with dark mode\",\n \"version\": \"5.0.0\",\n \"tags\": [\"typography\", \"prose\", \"markdown\", \"content\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-typography@5.0.0\",\n \"integrity\": \"sha256-def456\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-forms\",\n \"description\": \"Form input styling helpers — reset, validation states, custom checkboxes/radios\",\n \"version\": \"5.0.0\",\n \"tags\": [\"forms\", \"inputs\", \"validation\", \"checkbox\", \"radio\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-forms@5.0.0\",\n \"integrity\": \"sha256-ghi789\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-container-queries\",\n \"description\": \"Container query utilities — @container breakpoints for component-level responsiveness\",\n \"version\": \"5.0.0\",\n \"tags\": [\"container-queries\", \"responsive\", \"layout\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-container-queries@5.0.0\",\n \"integrity\": \"sha256-jkl012\"\n }\n ],\n \"community\": [\n {\n \"name\": \"tailwind-styled-animate\",\n \"description\": \"Community animation variants — bounce, pulse, wiggle, and more\",\n \"version\": \"0.1.0\",\n \"tags\": [\"animation\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-animate\"\n },\n {\n \"name\": \"tailwind-styled-icons\",\n \"description\": \"SVG icon system integrated with tw() variant API\",\n \"version\": \"0.1.0\",\n \"tags\": [\"icons\", \"svg\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-icons\"\n }\n ]\n}\n","import { spawnSync } from \"node:child_process\"\nimport { existsSync, readFileSync } from \"node:fs\"\nimport { createRequire } from \"node:module\"\nimport { join, resolve } from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\n\n// ── Native bridge (lazy-loaded to avoid circular deps) ──────────────────────\ntype NativePluginRegistry = {\n pluginSearch: (pluginsJson: string, query: string) => string\n pluginValidateName: (name: string) => boolean\n pluginVerifyIntegrity: (content: string, expectedIntegrity: string) => boolean\n pluginSemverHasUpdate: (current: string, latest: string) => boolean\n pluginCheckAllUpdates: (installedJson: string, registryJson: string) => string\n}\nlet _native: NativePluginRegistry | null | undefined = undefined\nfunction getNative(): NativePluginRegistry | null {\n if (_native !== undefined) return _native\n try {\n const runtimeDir = typeof __dirname === \"string\" && __dirname.length > 0\n ? __dirname\n : typeof import.meta !== \"undefined\" && import.meta.url\n ? fileURLToPath(new URL(\".\", import.meta.url))\n : process.cwd()\n const req = createRequire(join(runtimeDir, \"noop.cjs\"))\n const _pa = `${process.platform}-${process.arch}`\n const _paGnu = _pa === \"linux-x64\" ? \"linux-x64-gnu\" : _pa === \"linux-arm64\" ? \"linux-arm64-gnu\" : _pa\n const candidates = [\n // npm install case: dist/../native/\n resolve(runtimeDir, \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_pa}.node`),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_paGnu}.node`),\n resolve(runtimeDir, \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // cwd fallback\n resolve(process.cwd(), \"native\", \"tailwind-styled-native.node\"),\n resolve(process.cwd(), \"native\", \"tailwind_styled_parser.node\"),\n // monorepo dev: 4-level up\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // 3-level fallback\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n ]\n for (const c of candidates) {\n try {\n const mod = req(c) as Record<string, unknown>\n if (typeof mod?.pluginSearch === \"function\") {\n return (_native = mod as unknown as NativePluginRegistry)\n }\n } catch { /* continue */ }\n }\n } catch { /* ignore */ }\n return (_native = null)\n}\n\nconst NATIVE_UNAVAILABLE_MESSAGE =\n \"[tailwind-styled/plugin-registry] Native binding is required but not available.\\n\" +\n \"Please ensure you have run: npm run build:rust\"\n\n/**\n * Native-only accessor. Throws if the Rust binding is missing.\n * The TS layer is a thin wrapper — no JS fallbacks (native-first philosophy).\n */\nfunction requireNative(): NativePluginRegistry {\n const native = getNative()\n if (!native) throw new Error(NATIVE_UNAVAILABLE_MESSAGE)\n return native\n}\n\nconst PLUGIN_NAME_REGEX = /^(@[a-z0-9-]+\\/)?[a-z0-9-]+(@[0-9]+\\.[0-9]+\\.[0-9]+)?$/\n\nexport interface PluginInfo {\n name: string\n description: string\n version: string\n tags: string[]\n official?: boolean\n docs?: string\n install?: string\n integrity?: string\n}\n\ninterface RegistryData {\n version: string\n official: PluginInfo[]\n community: PluginInfo[]\n}\n\nexport interface InstallResult {\n plugin: string\n installed: boolean\n command: string\n exitCode: number\n}\n\nexport type PluginRegistryErrorCode =\n | \"INVALID_PLUGIN_NAME\"\n | \"PLUGIN_NOT_FOUND\"\n | \"EXTERNAL_CONFIRMATION_REQUIRED\"\n | \"INSTALL_COMMAND_FAILED\"\n | \"INSTALL_FAILED\"\n | \"NETWORK_ERROR\"\n | \"REGISTRY_LOAD_FAILED\"\n\nexport interface PluginRegistryErrorPayload {\n code: PluginRegistryErrorCode\n message: string\n context?: Record<string, unknown>\n}\n\nexport class PluginRegistryError extends Error {\n readonly code: PluginRegistryErrorCode\n readonly context?: Record<string, unknown>\n\n constructor(payload: PluginRegistryErrorPayload) {\n super(payload.message)\n this.name = \"PluginRegistryError\"\n this.code = payload.code\n this.context = payload.context\n }\n\n toObject(): PluginRegistryErrorPayload {\n return {\n code: this.code,\n message: this.message,\n context: this.context,\n }\n }\n}\n\nexport interface InstallOptions {\n dryRun?: boolean\n npmBin?: string\n allowExternal?: boolean\n confirmExternal?: boolean\n}\n\nexport interface RegistryOptions {\n registryUrl?: string\n}\n\nexport class PluginRegistry {\n private readonly plugins: PluginInfo[]\n private readonly registryVersion: string\n\n constructor(registryData?: RegistryData, options: RegistryOptions = {}) {\n if (options.registryUrl) {\n this.plugins = []\n this.registryVersion = \"0.0.0\"\n } else {\n const data = registryData\n const version = data?.version ?? \"4.2.0\"\n const official = (data?.official ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: true,\n docs: item.docs,\n install: item.install,\n integrity: item.integrity,\n }))\n const community = (data?.community ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: false,\n }))\n this.plugins = [...official, ...community]\n this.registryVersion = version\n }\n }\n\n static async loadFromUrl(url: string): Promise<PluginRegistry> {\n try {\n const response = await fetch(url)\n if (!response.ok) {\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to fetch registry: ${response.status} ${response.statusText}`,\n context: { url, status: response.status },\n })\n }\n const data = (await response.json()) as RegistryData\n return new PluginRegistry(data, { registryUrl: url })\n } catch (error) {\n if (error instanceof PluginRegistryError) throw error\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to load registry: ${error instanceof Error ? error.message : String(error)}`,\n context: { url },\n })\n }\n }\n\n getVersion(): string {\n return this.registryVersion\n }\n\n search(query: string): PluginInfo[] {\n const native = requireNative()\n return JSON.parse(native.pluginSearch(JSON.stringify(this.plugins), query)) as PluginInfo[]\n }\n\n getAll(): PluginInfo[] {\n return [...this.plugins]\n }\n\n getByName(pluginName: string): PluginInfo | undefined {\n const nameWithoutVersion = pluginName.split(\"@\").slice(0, 2).join(\"@\")\n return this.plugins.find((plugin) => plugin.name === nameWithoutVersion)\n }\n\n install(pluginName: string, options: InstallOptions = {}): InstallResult {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n\n const native = requireNative()\n const isValidName = native.pluginValidateName(pluginName)\n\n if (!isValidName) {\n throw new PluginRegistryError({\n code: \"INVALID_PLUGIN_NAME\",\n message: `Nama plugin tidak valid: '${pluginName}'.`,\n context: {\n pluginName,\n expectedPattern: String(PLUGIN_NAME_REGEX),\n },\n })\n }\n\n const knownPlugin = this.getByName(pluginName)\n const isExternal = !knownPlugin\n\n if (isExternal && !options.allowExternal) {\n throw new PluginRegistryError({\n code: \"PLUGIN_NOT_FOUND\",\n message: `Plugin '${pluginName}' tidak ditemukan di registry. Coba cari dengan 'tw-plugin search <keyword>'.`,\n context: {\n pluginName,\n allowExternal: false,\n },\n })\n }\n\n if (isExternal && options.allowExternal && !options.confirmExternal) {\n throw new PluginRegistryError({\n code: \"EXTERNAL_CONFIRMATION_REQUIRED\",\n message: `Plugin eksternal '${pluginName}' butuh konfirmasi. Jalankan ulang dengan --allow-external --yes.`,\n context: {\n pluginName,\n allowExternal: true,\n },\n })\n }\n\n const command = `${npmBin} install ${pluginName}`\n if (options.dryRun) {\n return { plugin: pluginName, installed: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"install\", pluginName], { stdio: \"inherit\" })\n if (child.error) {\n throw new PluginRegistryError({\n code: \"INSTALL_COMMAND_FAILED\",\n message: `Gagal menjalankan perintah install: ${command}`,\n context: {\n pluginName,\n command,\n reason: child.error.message,\n },\n })\n }\n\n if (child.status !== 0) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Install gagal (${child.status ?? 1}): ${command}`,\n context: {\n pluginName,\n command,\n exitCode: child.status ?? 1,\n },\n })\n }\n\n return {\n plugin: pluginName,\n installed: true,\n command,\n exitCode: 0,\n }\n }\n\n uninstall(\n pluginName: string,\n options: { dryRun?: boolean; npmBin?: string } = {}\n ): {\n plugin: string\n uninstalled: boolean\n command: string\n exitCode: number\n } {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n const command = `${npmBin} uninstall ${pluginName}`\n\n if (options.dryRun) {\n return { plugin: pluginName, uninstalled: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"uninstall\", pluginName], { stdio: \"inherit\" })\n if (child.status !== 0 && child.status !== null) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Uninstall gagal (${child.status}): ${command}`,\n context: { pluginName, command, exitCode: child.status },\n })\n }\n\n return {\n plugin: pluginName,\n uninstalled: true,\n command,\n exitCode: child.status ?? 0,\n }\n }\n\n verifyIntegrity(pluginName: string): { ok: boolean; reason?: string } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { ok: false, reason: `Plugin '${pluginName}' not in registry` }\n if (!plugin.integrity) {\n return { ok: true, reason: \"no checksum registered (skip)\" }\n }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { ok: false, reason: \"plugin not installed\" }\n const content = readFileSync(pkgPath, \"utf8\")\n const native = requireNative()\n const ok = native.pluginVerifyIntegrity(content, plugin.integrity!)\n return ok ? { ok: true } : { ok: false, reason: `Integrity mismatch: expected ${plugin.integrity}` }\n } catch (e: unknown) {\n return {\n ok: false,\n reason: `Integrity check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkForUpdate(pluginName: string): {\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { hasUpdate: false, error: `Plugin '${pluginName}' not in registry` }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { hasUpdate: false, error: \"plugin not installed\" }\n const current = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n const latest = plugin.version\n const native = requireNative()\n const hasUpdate = native.pluginSemverHasUpdate(current as string, latest)\n return { hasUpdate, current: current as string, latest }\n } catch (e: unknown) {\n return {\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkAllUpdates(): Array<{\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }> {\n type UpdateResult = {\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }\n const native = requireNative()\n\n // FS I/O stays in JS — gather installed versions for every registry plugin.\n const installed: Array<{ name: string; version: string }> = []\n const byName = new Map<string, UpdateResult>()\n for (const p of this.plugins) {\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", p.name, \"package.json\")\n if (!existsSync(pkgPath)) {\n byName.set(p.name, { name: p.name, hasUpdate: false, error: \"plugin not installed\" })\n continue\n }\n const version = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n installed.push({ name: p.name, version: version as string })\n } catch (e: unknown) {\n byName.set(p.name, {\n name: p.name,\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n })\n }\n }\n\n // Single native batch call does all semver comparisons (1 FFI crossing, not N).\n const results = JSON.parse(\n native.pluginCheckAllUpdates(JSON.stringify(installed), JSON.stringify(this.plugins))\n ) as UpdateResult[]\n for (const r of results) byName.set(r.name, r)\n\n // Preserve registry order.\n return this.plugins.map((p) => byName.get(p.name)).filter((r): r is UpdateResult => r !== undefined)\n }\n}\n\nconst _state = { defaultRegistry: null as PluginRegistry | null }\n\nexport function getRegistry(): PluginRegistry {\n if (!_state.defaultRegistry) {\n const registryData = require(\"../registry.json\") as RegistryData\n _state.defaultRegistry = new PluginRegistry(registryData)\n }\n return _state.defaultRegistry\n}\n\nexport const registry = getRegistry()"]}
|
|
1
|
+
{"version":3,"sources":["../packages/domain/plugin-registry/registry.json","../src/umbrella/plugin-registry.ts","../packages/domain/plugin-registry/src/index.ts"],"sourcesContent":["{\n \"version\": \"5.0.0\",\n \"updatedAt\": \"2026-03-23\",\n \"official\": [\n {\n \"name\": \"@tailwind-styled/plugin-animation\",\n \"description\": \"Animation presets and keyframes — enter/exit transitions, spring physics, scroll-triggered\",\n \"version\": \"5.0.0\",\n \"tags\": [\"animation\", \"motion\", \"transition\", \"keyframes\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/packages/animate\",\n \"install\": \"npm install @tailwind-styled/plugin-animation@5.0.0\",\n \"integrity\": \"sha256-abc123\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-typography\",\n \"description\": \"Prose and typography utilities — headings, body, code blocks, with dark mode\",\n \"version\": \"5.0.0\",\n \"tags\": [\"typography\", \"prose\", \"markdown\", \"content\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-typography@5.0.0\",\n \"integrity\": \"sha256-def456\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-forms\",\n \"description\": \"Form input styling helpers — reset, validation states, custom checkboxes/radios\",\n \"version\": \"5.0.0\",\n \"tags\": [\"forms\", \"inputs\", \"validation\", \"checkbox\", \"radio\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-forms@5.0.0\",\n \"integrity\": \"sha256-ghi789\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-container-queries\",\n \"description\": \"Container query utilities — @container breakpoints for component-level responsiveness\",\n \"version\": \"5.0.0\",\n \"tags\": [\"container-queries\", \"responsive\", \"layout\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-container-queries@5.0.0\",\n \"integrity\": \"sha256-jkl012\"\n }\n ],\n \"community\": [\n {\n \"name\": \"tailwind-styled-animate\",\n \"description\": \"Community animation variants — bounce, pulse, wiggle, and more\",\n \"version\": \"0.1.0\",\n \"tags\": [\"animation\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-animate\"\n },\n {\n \"name\": \"tailwind-styled-icons\",\n \"description\": \"SVG icon system integrated with tw() variant API\",\n \"version\": \"0.1.0\",\n \"tags\": [\"icons\", \"svg\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-icons\"\n }\n ]\n}\n","export * from \"@tailwind-styled/plugin-registry\"\n","import { spawnSync } from \"node:child_process\"\nimport { existsSync, readFileSync } from \"node:fs\"\nimport { createRequire } from \"node:module\"\nimport { join, resolve } from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\n\n// ── Native bridge (lazy-loaded to avoid circular deps) ──────────────────────\ntype NativePluginRegistry = {\n pluginSearch: (pluginsJson: string, query: string) => string\n pluginValidateName: (name: string) => boolean\n pluginVerifyIntegrity: (content: string, expectedIntegrity: string) => boolean\n pluginSemverHasUpdate: (current: string, latest: string) => boolean\n pluginCheckAllUpdates: (installedJson: string, registryJson: string) => string\n}\nlet _native: NativePluginRegistry | null | undefined = undefined\nfunction getNative(): NativePluginRegistry | null {\n if (_native !== undefined) return _native\n try {\n const runtimeDir = typeof __dirname === \"string\" && __dirname.length > 0\n ? __dirname\n : typeof import.meta !== \"undefined\" && import.meta.url\n ? fileURLToPath(new URL(\".\", import.meta.url))\n : process.cwd()\n const req = createRequire(join(runtimeDir, \"noop.cjs\"))\n const _pa = `${process.platform}-${process.arch}`\n const _paGnu = _pa === \"linux-x64\" ? \"linux-x64-gnu\" : _pa === \"linux-arm64\" ? \"linux-arm64-gnu\" : _pa\n const candidates = [\n // npm install case: dist/../native/\n resolve(runtimeDir, \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_pa}.node`),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_paGnu}.node`),\n resolve(runtimeDir, \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // cwd fallback\n resolve(process.cwd(), \"native\", \"tailwind-styled-native.node\"),\n resolve(process.cwd(), \"native\", \"tailwind_styled_parser.node\"),\n // monorepo dev: 4-level up\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // 3-level fallback\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n ]\n for (const c of candidates) {\n try {\n const mod = req(c) as Record<string, unknown>\n if (typeof mod?.pluginSearch === \"function\") {\n return (_native = mod as unknown as NativePluginRegistry)\n }\n } catch { /* continue */ }\n }\n } catch { /* ignore */ }\n return (_native = null)\n}\n\nconst NATIVE_UNAVAILABLE_MESSAGE =\n \"[tailwind-styled/plugin-registry] Native binding is required but not available.\\n\" +\n \"Please ensure you have run: npm run build:rust\"\n\n/**\n * Native-only accessor. Throws if the Rust binding is missing.\n * The TS layer is a thin wrapper — no JS fallbacks (native-first philosophy).\n */\nfunction requireNative(): NativePluginRegistry {\n const native = getNative()\n if (!native) throw new Error(NATIVE_UNAVAILABLE_MESSAGE)\n return native\n}\n\nconst PLUGIN_NAME_REGEX = /^(@[a-z0-9-]+\\/)?[a-z0-9-]+(@[0-9]+\\.[0-9]+\\.[0-9]+)?$/\n\nexport interface PluginInfo {\n name: string\n description: string\n version: string\n tags: string[]\n official?: boolean\n docs?: string\n install?: string\n integrity?: string\n}\n\ninterface RegistryData {\n version: string\n official: PluginInfo[]\n community: PluginInfo[]\n}\n\nexport interface InstallResult {\n plugin: string\n installed: boolean\n command: string\n exitCode: number\n}\n\nexport type PluginRegistryErrorCode =\n | \"INVALID_PLUGIN_NAME\"\n | \"PLUGIN_NOT_FOUND\"\n | \"EXTERNAL_CONFIRMATION_REQUIRED\"\n | \"INSTALL_COMMAND_FAILED\"\n | \"INSTALL_FAILED\"\n | \"NETWORK_ERROR\"\n | \"REGISTRY_LOAD_FAILED\"\n\nexport interface PluginRegistryErrorPayload {\n code: PluginRegistryErrorCode\n message: string\n context?: Record<string, unknown>\n}\n\nexport class PluginRegistryError extends Error {\n readonly code: PluginRegistryErrorCode\n readonly context?: Record<string, unknown>\n\n constructor(payload: PluginRegistryErrorPayload) {\n super(payload.message)\n this.name = \"PluginRegistryError\"\n this.code = payload.code\n this.context = payload.context\n }\n\n toObject(): PluginRegistryErrorPayload {\n return {\n code: this.code,\n message: this.message,\n context: this.context,\n }\n }\n}\n\nexport interface InstallOptions {\n dryRun?: boolean\n npmBin?: string\n allowExternal?: boolean\n confirmExternal?: boolean\n}\n\nexport interface RegistryOptions {\n registryUrl?: string\n}\n\nexport class PluginRegistry {\n private readonly plugins: PluginInfo[]\n private readonly registryVersion: string\n\n constructor(registryData?: RegistryData, options: RegistryOptions = {}) {\n if (options.registryUrl) {\n this.plugins = []\n this.registryVersion = \"0.0.0\"\n } else {\n const data = registryData\n const version = data?.version ?? \"4.2.0\"\n const official = (data?.official ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: true,\n docs: item.docs,\n install: item.install,\n integrity: item.integrity,\n }))\n const community = (data?.community ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: false,\n }))\n this.plugins = [...official, ...community]\n this.registryVersion = version\n }\n }\n\n static async loadFromUrl(url: string): Promise<PluginRegistry> {\n try {\n const response = await fetch(url)\n if (!response.ok) {\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to fetch registry: ${response.status} ${response.statusText}`,\n context: { url, status: response.status },\n })\n }\n const data = (await response.json()) as RegistryData\n return new PluginRegistry(data, { registryUrl: url })\n } catch (error) {\n if (error instanceof PluginRegistryError) throw error\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to load registry: ${error instanceof Error ? error.message : String(error)}`,\n context: { url },\n })\n }\n }\n\n getVersion(): string {\n return this.registryVersion\n }\n\n search(query: string): PluginInfo[] {\n const native = requireNative()\n return JSON.parse(native.pluginSearch(JSON.stringify(this.plugins), query)) as PluginInfo[]\n }\n\n getAll(): PluginInfo[] {\n return [...this.plugins]\n }\n\n getByName(pluginName: string): PluginInfo | undefined {\n const nameWithoutVersion = pluginName.split(\"@\").slice(0, 2).join(\"@\")\n return this.plugins.find((plugin) => plugin.name === nameWithoutVersion)\n }\n\n install(pluginName: string, options: InstallOptions = {}): InstallResult {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n\n const native = requireNative()\n const isValidName = native.pluginValidateName(pluginName)\n\n if (!isValidName) {\n throw new PluginRegistryError({\n code: \"INVALID_PLUGIN_NAME\",\n message: `Nama plugin tidak valid: '${pluginName}'.`,\n context: {\n pluginName,\n expectedPattern: String(PLUGIN_NAME_REGEX),\n },\n })\n }\n\n const knownPlugin = this.getByName(pluginName)\n const isExternal = !knownPlugin\n\n if (isExternal && !options.allowExternal) {\n throw new PluginRegistryError({\n code: \"PLUGIN_NOT_FOUND\",\n message: `Plugin '${pluginName}' tidak ditemukan di registry. Coba cari dengan 'tw-plugin search <keyword>'.`,\n context: {\n pluginName,\n allowExternal: false,\n },\n })\n }\n\n if (isExternal && options.allowExternal && !options.confirmExternal) {\n throw new PluginRegistryError({\n code: \"EXTERNAL_CONFIRMATION_REQUIRED\",\n message: `Plugin eksternal '${pluginName}' butuh konfirmasi. Jalankan ulang dengan --allow-external --yes.`,\n context: {\n pluginName,\n allowExternal: true,\n },\n })\n }\n\n const command = `${npmBin} install ${pluginName}`\n if (options.dryRun) {\n return { plugin: pluginName, installed: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"install\", pluginName], { stdio: \"inherit\" })\n if (child.error) {\n throw new PluginRegistryError({\n code: \"INSTALL_COMMAND_FAILED\",\n message: `Gagal menjalankan perintah install: ${command}`,\n context: {\n pluginName,\n command,\n reason: child.error.message,\n },\n })\n }\n\n if (child.status !== 0) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Install gagal (${child.status ?? 1}): ${command}`,\n context: {\n pluginName,\n command,\n exitCode: child.status ?? 1,\n },\n })\n }\n\n return {\n plugin: pluginName,\n installed: true,\n command,\n exitCode: 0,\n }\n }\n\n uninstall(\n pluginName: string,\n options: { dryRun?: boolean; npmBin?: string } = {}\n ): {\n plugin: string\n uninstalled: boolean\n command: string\n exitCode: number\n } {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n const command = `${npmBin} uninstall ${pluginName}`\n\n if (options.dryRun) {\n return { plugin: pluginName, uninstalled: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"uninstall\", pluginName], { stdio: \"inherit\" })\n if (child.status !== 0 && child.status !== null) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Uninstall gagal (${child.status}): ${command}`,\n context: { pluginName, command, exitCode: child.status },\n })\n }\n\n return {\n plugin: pluginName,\n uninstalled: true,\n command,\n exitCode: child.status ?? 0,\n }\n }\n\n verifyIntegrity(pluginName: string): { ok: boolean; reason?: string } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { ok: false, reason: `Plugin '${pluginName}' not in registry` }\n if (!plugin.integrity) {\n return { ok: true, reason: \"no checksum registered (skip)\" }\n }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { ok: false, reason: \"plugin not installed\" }\n const content = readFileSync(pkgPath, \"utf8\")\n const native = requireNative()\n const ok = native.pluginVerifyIntegrity(content, plugin.integrity!)\n return ok ? { ok: true } : { ok: false, reason: `Integrity mismatch: expected ${plugin.integrity}` }\n } catch (e: unknown) {\n return {\n ok: false,\n reason: `Integrity check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkForUpdate(pluginName: string): {\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { hasUpdate: false, error: `Plugin '${pluginName}' not in registry` }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { hasUpdate: false, error: \"plugin not installed\" }\n const current = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n const latest = plugin.version\n const native = requireNative()\n const hasUpdate = native.pluginSemverHasUpdate(current as string, latest)\n return { hasUpdate, current: current as string, latest }\n } catch (e: unknown) {\n return {\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkAllUpdates(): Array<{\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }> {\n type UpdateResult = {\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }\n const native = requireNative()\n\n // FS I/O stays in JS — gather installed versions for every registry plugin.\n const installed: Array<{ name: string; version: string }> = []\n const byName = new Map<string, UpdateResult>()\n for (const p of this.plugins) {\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", p.name, \"package.json\")\n if (!existsSync(pkgPath)) {\n byName.set(p.name, { name: p.name, hasUpdate: false, error: \"plugin not installed\" })\n continue\n }\n const version = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n installed.push({ name: p.name, version: version as string })\n } catch (e: unknown) {\n byName.set(p.name, {\n name: p.name,\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n })\n }\n }\n\n // Single native batch call does all semver comparisons (1 FFI crossing, not N).\n const results = JSON.parse(\n native.pluginCheckAllUpdates(JSON.stringify(installed), JSON.stringify(this.plugins))\n ) as UpdateResult[]\n for (const r of results) byName.set(r.name, r)\n\n // Preserve registry order.\n return this.plugins.map((p) => byName.get(p.name)).filter((r): r is UpdateResult => r !== undefined)\n }\n}\n\nconst _state = { defaultRegistry: null as PluginRegistry | null }\n\nexport function getRegistry(): PluginRegistry {\n if (!_state.defaultRegistry) {\n const registryData = require(\"../registry.json\") as RegistryData\n _state.defaultRegistry = new PluginRegistry(registryData)\n }\n return _state.defaultRegistry\n}\n\nexport const registry = getRegistry()"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,kDAAAA,UAAAC,SAAA;AAAA,IAAAA,QAAA;AAAA,MACE,SAAW;AAAA,MACX,WAAa;AAAA,MACb,UAAY;AAAA,QACV;AAAA,UACE,MAAQ;AAAA,UACR,aAAe;AAAA,UACf,SAAW;AAAA,UACX,MAAQ,CAAC,aAAa,UAAU,cAAc,WAAW;AAAA,UACzD,MAAQ;AAAA,UACR,SAAW;AAAA,UACX,WAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,MAAQ;AAAA,UACR,aAAe;AAAA,UACf,SAAW;AAAA,UACX,MAAQ,CAAC,cAAc,SAAS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AAM,CAAC,EAAE,WAAW;AACrE,kBAAU,KAAK,EAAE,MAAM,EAAE,MAAM,QAA2B,CAAC;AAAA,MAC7D,SAAS,GAAY;AACnB,eAAO,IAAI,EAAE,MAAM;AAAA,UACjB,MAAM,EAAE;AAAA,UACR,WAAW;AAAA,UACX,OAAO,wBAAwB,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,CAAC;AAAA,QAC3E,CAAC;AAAA,MACH;AAAA,IACF;AAGA,UAAM,UAAU,KAAK;AAAA,MACnB,OAAO,sBAAsB,KAAK,UAAU,SAAS,GAAG,KAAK,UAAU,KAAK,OAAO,CAAC;AAAA,IACtF;AACA,eAAW,KAAK,QAAS,QAAO,IAAI,EAAE,MAAM,CAAC;AAG7C,WAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,OAAO,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,MAAyB,MAAM,MAAS;AAAA,EACrG;AACF;AAEA,IAAM,SAAS,EAAE,iBAAiB,KAA8B;AAEzD,SAAS,cAA8B;AAC5C,MAAI,CAAC,OAAO,iBAAiB;AAC3B,UAAM,eAAe;AACrB,WAAO,kBAAkB,IAAI,eAAe,YAAY;AAAA,EAC1D;AACA,SAAO,OAAO;AAChB;AAEO,IAAM,WAAW,YAAY;","names":["exports","module"]}
|
package/dist/plugin-registry.mjs
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { spawnSync } from 'child_process';
|
|
2
|
-
import { existsSync, readFileSync } from 'fs';
|
|
3
|
-
import { createRequire } from 'module';
|
|
4
|
-
import { join, resolve } from 'path';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
|
|
7
1
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
8
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
3
|
var __commonJS = (cb, mod) => function __require() {
|
|
@@ -12,7 +6,7 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
12
6
|
|
|
13
7
|
// packages/domain/plugin-registry/registry.json
|
|
14
8
|
var require_registry = __commonJS({
|
|
15
|
-
"packages/domain/plugin-registry/registry.json"(exports
|
|
9
|
+
"packages/domain/plugin-registry/registry.json"(exports, module) {
|
|
16
10
|
module.exports = {
|
|
17
11
|
version: "5.0.0",
|
|
18
12
|
updatedAt: "2026-03-23",
|
|
@@ -75,6 +69,13 @@ var require_registry = __commonJS({
|
|
|
75
69
|
};
|
|
76
70
|
}
|
|
77
71
|
});
|
|
72
|
+
|
|
73
|
+
// packages/domain/plugin-registry/src/index.ts
|
|
74
|
+
import { spawnSync } from "child_process";
|
|
75
|
+
import { existsSync, readFileSync } from "fs";
|
|
76
|
+
import { createRequire } from "module";
|
|
77
|
+
import { join, resolve } from "path";
|
|
78
|
+
import { fileURLToPath } from "url";
|
|
78
79
|
var _native = void 0;
|
|
79
80
|
function getNative() {
|
|
80
81
|
if (_native !== void 0) return _native;
|
|
@@ -368,7 +369,10 @@ function getRegistry() {
|
|
|
368
369
|
return _state.defaultRegistry;
|
|
369
370
|
}
|
|
370
371
|
var registry = getRegistry();
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
export {
|
|
373
|
+
PluginRegistry,
|
|
374
|
+
PluginRegistryError,
|
|
375
|
+
getRegistry,
|
|
376
|
+
registry
|
|
377
|
+
};
|
|
374
378
|
//# sourceMappingURL=plugin-registry.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../packages/domain/plugin-registry/registry.json","../packages/domain/plugin-registry/src/index.ts"],"names":["exports"],"mappings":";;;;;;;;;;;;;AAAA,IAAA,gBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,+CAAA,CAAAA,SAAA,EAAA,MAAA,EAAA;AAAA,IAAA,MAAA,CAAA,OAAA,GAAA;AAAA,MACE,OAAA,EAAW,OAAA;AAAA,MACX,SAAA,EAAa,YAAA;AAAA,MACb,QAAA,EAAY;AAAA,QACV;A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AO,CAAC,CAAC,CAAA;AAAA,SAC1E,CAAA;AAAA,MACH;AAAA,IACF;AAGA,IAAA,MAAM,UAAU,IAAA,CAAK,KAAA;AAAA,MACnB,MAAA,CAAO,qBAAA,CAAsB,IAAA,CAAK,SAAA,CAAU,SAAS,GAAG,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,OAAO,CAAC;AAAA,KACtF;AACA,IAAA,KAAA,MAAW,KAAK,OAAA,EAAS,MAAA,CAAO,GAAA,CAAI,CAAA,CAAE,MAAM,CAAC,CAAA;AAG7C,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,CAAC,MAAM,MAAA,CAAO,GAAA,CAAI,CAAA,CAAE,IAAI,CAAC,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAyB,MAAM,MAAS,CAAA;AAAA,EACrG;AACF;AAEA,IAAM,MAAA,GAAS,EAAE,eAAA,EAAiB,IAAA,EAA8B;AAEzD,SAAS,WAAA,GAA8B;AAC5C,EAAA,IAAI,CAAC,OAAO,eAAA,EAAiB;AAC3B,IAAA,MAAM,YAAA,GAAe,gBAAA,EAAA;AACrB,IAAA,MAAA,CAAO,eAAA,GAAkB,IAAI,cAAA,CAAe,YAAY,CAAA;AAAA,EAC1D;AACA,EAAA,OAAO,MAAA,CAAO,eAAA;AAChB;AAEO,IAAM,WAAW,WAAA","file":"plugin-registry.mjs","sourcesContent":["{\n \"version\": \"5.0.0\",\n \"updatedAt\": \"2026-03-23\",\n \"official\": [\n {\n \"name\": \"@tailwind-styled/plugin-animation\",\n \"description\": \"Animation presets and keyframes — enter/exit transitions, spring physics, scroll-triggered\",\n \"version\": \"5.0.0\",\n \"tags\": [\"animation\", \"motion\", \"transition\", \"keyframes\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/packages/animate\",\n \"install\": \"npm install @tailwind-styled/plugin-animation@5.0.0\",\n \"integrity\": \"sha256-abc123\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-typography\",\n \"description\": \"Prose and typography utilities — headings, body, code blocks, with dark mode\",\n \"version\": \"5.0.0\",\n \"tags\": [\"typography\", \"prose\", \"markdown\", \"content\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-typography@5.0.0\",\n \"integrity\": \"sha256-def456\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-forms\",\n \"description\": \"Form input styling helpers — reset, validation states, custom checkboxes/radios\",\n \"version\": \"5.0.0\",\n \"tags\": [\"forms\", \"inputs\", \"validation\", \"checkbox\", \"radio\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-forms@5.0.0\",\n \"integrity\": \"sha256-ghi789\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-container-queries\",\n \"description\": \"Container query utilities — @container breakpoints for component-level responsiveness\",\n \"version\": \"5.0.0\",\n \"tags\": [\"container-queries\", \"responsive\", \"layout\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-container-queries@5.0.0\",\n \"integrity\": \"sha256-jkl012\"\n }\n ],\n \"community\": [\n {\n \"name\": \"tailwind-styled-animate\",\n \"description\": \"Community animation variants — bounce, pulse, wiggle, and more\",\n \"version\": \"0.1.0\",\n \"tags\": [\"animation\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-animate\"\n },\n {\n \"name\": \"tailwind-styled-icons\",\n \"description\": \"SVG icon system integrated with tw() variant API\",\n \"version\": \"0.1.0\",\n \"tags\": [\"icons\", \"svg\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-icons\"\n }\n ]\n}\n","import { spawnSync } from \"node:child_process\"\nimport { existsSync, readFileSync } from \"node:fs\"\nimport { createRequire } from \"node:module\"\nimport { join, resolve } from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\n\n// ── Native bridge (lazy-loaded to avoid circular deps) ──────────────────────\ntype NativePluginRegistry = {\n pluginSearch: (pluginsJson: string, query: string) => string\n pluginValidateName: (name: string) => boolean\n pluginVerifyIntegrity: (content: string, expectedIntegrity: string) => boolean\n pluginSemverHasUpdate: (current: string, latest: string) => boolean\n pluginCheckAllUpdates: (installedJson: string, registryJson: string) => string\n}\nlet _native: NativePluginRegistry | null | undefined = undefined\nfunction getNative(): NativePluginRegistry | null {\n if (_native !== undefined) return _native\n try {\n const runtimeDir = typeof __dirname === \"string\" && __dirname.length > 0\n ? __dirname\n : typeof import.meta !== \"undefined\" && import.meta.url\n ? fileURLToPath(new URL(\".\", import.meta.url))\n : process.cwd()\n const req = createRequire(join(runtimeDir, \"noop.cjs\"))\n const _pa = `${process.platform}-${process.arch}`\n const _paGnu = _pa === \"linux-x64\" ? \"linux-x64-gnu\" : _pa === \"linux-arm64\" ? \"linux-arm64-gnu\" : _pa\n const candidates = [\n // npm install case: dist/../native/\n resolve(runtimeDir, \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_pa}.node`),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_paGnu}.node`),\n resolve(runtimeDir, \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // cwd fallback\n resolve(process.cwd(), \"native\", \"tailwind-styled-native.node\"),\n resolve(process.cwd(), \"native\", \"tailwind_styled_parser.node\"),\n // monorepo dev: 4-level up\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // 3-level fallback\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n ]\n for (const c of candidates) {\n try {\n const mod = req(c) as Record<string, unknown>\n if (typeof mod?.pluginSearch === \"function\") {\n return (_native = mod as unknown as NativePluginRegistry)\n }\n } catch { /* continue */ }\n }\n } catch { /* ignore */ }\n return (_native = null)\n}\n\nconst NATIVE_UNAVAILABLE_MESSAGE =\n \"[tailwind-styled/plugin-registry] Native binding is required but not available.\\n\" +\n \"Please ensure you have run: npm run build:rust\"\n\n/**\n * Native-only accessor. Throws if the Rust binding is missing.\n * The TS layer is a thin wrapper — no JS fallbacks (native-first philosophy).\n */\nfunction requireNative(): NativePluginRegistry {\n const native = getNative()\n if (!native) throw new Error(NATIVE_UNAVAILABLE_MESSAGE)\n return native\n}\n\nconst PLUGIN_NAME_REGEX = /^(@[a-z0-9-]+\\/)?[a-z0-9-]+(@[0-9]+\\.[0-9]+\\.[0-9]+)?$/\n\nexport interface PluginInfo {\n name: string\n description: string\n version: string\n tags: string[]\n official?: boolean\n docs?: string\n install?: string\n integrity?: string\n}\n\ninterface RegistryData {\n version: string\n official: PluginInfo[]\n community: PluginInfo[]\n}\n\nexport interface InstallResult {\n plugin: string\n installed: boolean\n command: string\n exitCode: number\n}\n\nexport type PluginRegistryErrorCode =\n | \"INVALID_PLUGIN_NAME\"\n | \"PLUGIN_NOT_FOUND\"\n | \"EXTERNAL_CONFIRMATION_REQUIRED\"\n | \"INSTALL_COMMAND_FAILED\"\n | \"INSTALL_FAILED\"\n | \"NETWORK_ERROR\"\n | \"REGISTRY_LOAD_FAILED\"\n\nexport interface PluginRegistryErrorPayload {\n code: PluginRegistryErrorCode\n message: string\n context?: Record<string, unknown>\n}\n\nexport class PluginRegistryError extends Error {\n readonly code: PluginRegistryErrorCode\n readonly context?: Record<string, unknown>\n\n constructor(payload: PluginRegistryErrorPayload) {\n super(payload.message)\n this.name = \"PluginRegistryError\"\n this.code = payload.code\n this.context = payload.context\n }\n\n toObject(): PluginRegistryErrorPayload {\n return {\n code: this.code,\n message: this.message,\n context: this.context,\n }\n }\n}\n\nexport interface InstallOptions {\n dryRun?: boolean\n npmBin?: string\n allowExternal?: boolean\n confirmExternal?: boolean\n}\n\nexport interface RegistryOptions {\n registryUrl?: string\n}\n\nexport class PluginRegistry {\n private readonly plugins: PluginInfo[]\n private readonly registryVersion: string\n\n constructor(registryData?: RegistryData, options: RegistryOptions = {}) {\n if (options.registryUrl) {\n this.plugins = []\n this.registryVersion = \"0.0.0\"\n } else {\n const data = registryData\n const version = data?.version ?? \"4.2.0\"\n const official = (data?.official ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: true,\n docs: item.docs,\n install: item.install,\n integrity: item.integrity,\n }))\n const community = (data?.community ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: false,\n }))\n this.plugins = [...official, ...community]\n this.registryVersion = version\n }\n }\n\n static async loadFromUrl(url: string): Promise<PluginRegistry> {\n try {\n const response = await fetch(url)\n if (!response.ok) {\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to fetch registry: ${response.status} ${response.statusText}`,\n context: { url, status: response.status },\n })\n }\n const data = (await response.json()) as RegistryData\n return new PluginRegistry(data, { registryUrl: url })\n } catch (error) {\n if (error instanceof PluginRegistryError) throw error\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to load registry: ${error instanceof Error ? error.message : String(error)}`,\n context: { url },\n })\n }\n }\n\n getVersion(): string {\n return this.registryVersion\n }\n\n search(query: string): PluginInfo[] {\n const native = requireNative()\n return JSON.parse(native.pluginSearch(JSON.stringify(this.plugins), query)) as PluginInfo[]\n }\n\n getAll(): PluginInfo[] {\n return [...this.plugins]\n }\n\n getByName(pluginName: string): PluginInfo | undefined {\n const nameWithoutVersion = pluginName.split(\"@\").slice(0, 2).join(\"@\")\n return this.plugins.find((plugin) => plugin.name === nameWithoutVersion)\n }\n\n install(pluginName: string, options: InstallOptions = {}): InstallResult {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n\n const native = requireNative()\n const isValidName = native.pluginValidateName(pluginName)\n\n if (!isValidName) {\n throw new PluginRegistryError({\n code: \"INVALID_PLUGIN_NAME\",\n message: `Nama plugin tidak valid: '${pluginName}'.`,\n context: {\n pluginName,\n expectedPattern: String(PLUGIN_NAME_REGEX),\n },\n })\n }\n\n const knownPlugin = this.getByName(pluginName)\n const isExternal = !knownPlugin\n\n if (isExternal && !options.allowExternal) {\n throw new PluginRegistryError({\n code: \"PLUGIN_NOT_FOUND\",\n message: `Plugin '${pluginName}' tidak ditemukan di registry. Coba cari dengan 'tw-plugin search <keyword>'.`,\n context: {\n pluginName,\n allowExternal: false,\n },\n })\n }\n\n if (isExternal && options.allowExternal && !options.confirmExternal) {\n throw new PluginRegistryError({\n code: \"EXTERNAL_CONFIRMATION_REQUIRED\",\n message: `Plugin eksternal '${pluginName}' butuh konfirmasi. Jalankan ulang dengan --allow-external --yes.`,\n context: {\n pluginName,\n allowExternal: true,\n },\n })\n }\n\n const command = `${npmBin} install ${pluginName}`\n if (options.dryRun) {\n return { plugin: pluginName, installed: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"install\", pluginName], { stdio: \"inherit\" })\n if (child.error) {\n throw new PluginRegistryError({\n code: \"INSTALL_COMMAND_FAILED\",\n message: `Gagal menjalankan perintah install: ${command}`,\n context: {\n pluginName,\n command,\n reason: child.error.message,\n },\n })\n }\n\n if (child.status !== 0) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Install gagal (${child.status ?? 1}): ${command}`,\n context: {\n pluginName,\n command,\n exitCode: child.status ?? 1,\n },\n })\n }\n\n return {\n plugin: pluginName,\n installed: true,\n command,\n exitCode: 0,\n }\n }\n\n uninstall(\n pluginName: string,\n options: { dryRun?: boolean; npmBin?: string } = {}\n ): {\n plugin: string\n uninstalled: boolean\n command: string\n exitCode: number\n } {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n const command = `${npmBin} uninstall ${pluginName}`\n\n if (options.dryRun) {\n return { plugin: pluginName, uninstalled: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"uninstall\", pluginName], { stdio: \"inherit\" })\n if (child.status !== 0 && child.status !== null) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Uninstall gagal (${child.status}): ${command}`,\n context: { pluginName, command, exitCode: child.status },\n })\n }\n\n return {\n plugin: pluginName,\n uninstalled: true,\n command,\n exitCode: child.status ?? 0,\n }\n }\n\n verifyIntegrity(pluginName: string): { ok: boolean; reason?: string } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { ok: false, reason: `Plugin '${pluginName}' not in registry` }\n if (!plugin.integrity) {\n return { ok: true, reason: \"no checksum registered (skip)\" }\n }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { ok: false, reason: \"plugin not installed\" }\n const content = readFileSync(pkgPath, \"utf8\")\n const native = requireNative()\n const ok = native.pluginVerifyIntegrity(content, plugin.integrity!)\n return ok ? { ok: true } : { ok: false, reason: `Integrity mismatch: expected ${plugin.integrity}` }\n } catch (e: unknown) {\n return {\n ok: false,\n reason: `Integrity check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkForUpdate(pluginName: string): {\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { hasUpdate: false, error: `Plugin '${pluginName}' not in registry` }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { hasUpdate: false, error: \"plugin not installed\" }\n const current = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n const latest = plugin.version\n const native = requireNative()\n const hasUpdate = native.pluginSemverHasUpdate(current as string, latest)\n return { hasUpdate, current: current as string, latest }\n } catch (e: unknown) {\n return {\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkAllUpdates(): Array<{\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }> {\n type UpdateResult = {\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }\n const native = requireNative()\n\n // FS I/O stays in JS — gather installed versions for every registry plugin.\n const installed: Array<{ name: string; version: string }> = []\n const byName = new Map<string, UpdateResult>()\n for (const p of this.plugins) {\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", p.name, \"package.json\")\n if (!existsSync(pkgPath)) {\n byName.set(p.name, { name: p.name, hasUpdate: false, error: \"plugin not installed\" })\n continue\n }\n const version = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n installed.push({ name: p.name, version: version as string })\n } catch (e: unknown) {\n byName.set(p.name, {\n name: p.name,\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n })\n }\n }\n\n // Single native batch call does all semver comparisons (1 FFI crossing, not N).\n const results = JSON.parse(\n native.pluginCheckAllUpdates(JSON.stringify(installed), JSON.stringify(this.plugins))\n ) as UpdateResult[]\n for (const r of results) byName.set(r.name, r)\n\n // Preserve registry order.\n return this.plugins.map((p) => byName.get(p.name)).filter((r): r is UpdateResult => r !== undefined)\n }\n}\n\nconst _state = { defaultRegistry: null as PluginRegistry | null }\n\nexport function getRegistry(): PluginRegistry {\n if (!_state.defaultRegistry) {\n const registryData = require(\"../registry.json\") as RegistryData\n _state.defaultRegistry = new PluginRegistry(registryData)\n }\n return _state.defaultRegistry\n}\n\nexport const registry = getRegistry()"]}
|
|
1
|
+
{"version":3,"sources":["../packages/domain/plugin-registry/registry.json","../packages/domain/plugin-registry/src/index.ts"],"sourcesContent":["{\n \"version\": \"5.0.0\",\n \"updatedAt\": \"2026-03-23\",\n \"official\": [\n {\n \"name\": \"@tailwind-styled/plugin-animation\",\n \"description\": \"Animation presets and keyframes — enter/exit transitions, spring physics, scroll-triggered\",\n \"version\": \"5.0.0\",\n \"tags\": [\"animation\", \"motion\", \"transition\", \"keyframes\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/packages/animate\",\n \"install\": \"npm install @tailwind-styled/plugin-animation@5.0.0\",\n \"integrity\": \"sha256-abc123\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-typography\",\n \"description\": \"Prose and typography utilities — headings, body, code blocks, with dark mode\",\n \"version\": \"5.0.0\",\n \"tags\": [\"typography\", \"prose\", \"markdown\", \"content\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-typography@5.0.0\",\n \"integrity\": \"sha256-def456\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-forms\",\n \"description\": \"Form input styling helpers — reset, validation states, custom checkboxes/radios\",\n \"version\": \"5.0.0\",\n \"tags\": [\"forms\", \"inputs\", \"validation\", \"checkbox\", \"radio\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-forms@5.0.0\",\n \"integrity\": \"sha256-ghi789\"\n },\n {\n \"name\": \"@tailwind-styled/plugin-container-queries\",\n \"description\": \"Container query utilities — @container breakpoints for component-level responsiveness\",\n \"version\": \"5.0.0\",\n \"tags\": [\"container-queries\", \"responsive\", \"layout\"],\n \"docs\": \"https://github.com/tailwind-styled/tailwind-styled-v5/tree/main/docs/plugins\",\n \"install\": \"npm install @tailwind-styled/plugin-container-queries@5.0.0\",\n \"integrity\": \"sha256-jkl012\"\n }\n ],\n \"community\": [\n {\n \"name\": \"tailwind-styled-animate\",\n \"description\": \"Community animation variants — bounce, pulse, wiggle, and more\",\n \"version\": \"0.1.0\",\n \"tags\": [\"animation\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-animate\"\n },\n {\n \"name\": \"tailwind-styled-icons\",\n \"description\": \"SVG icon system integrated with tw() variant API\",\n \"version\": \"0.1.0\",\n \"tags\": [\"icons\", \"svg\", \"community\"],\n \"author\": \"community\",\n \"install\": \"npm install tailwind-styled-icons\"\n }\n ]\n}\n","import { spawnSync } from \"node:child_process\"\nimport { existsSync, readFileSync } from \"node:fs\"\nimport { createRequire } from \"node:module\"\nimport { join, resolve } from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\n\n// ── Native bridge (lazy-loaded to avoid circular deps) ──────────────────────\ntype NativePluginRegistry = {\n pluginSearch: (pluginsJson: string, query: string) => string\n pluginValidateName: (name: string) => boolean\n pluginVerifyIntegrity: (content: string, expectedIntegrity: string) => boolean\n pluginSemverHasUpdate: (current: string, latest: string) => boolean\n pluginCheckAllUpdates: (installedJson: string, registryJson: string) => string\n}\nlet _native: NativePluginRegistry | null | undefined = undefined\nfunction getNative(): NativePluginRegistry | null {\n if (_native !== undefined) return _native\n try {\n const runtimeDir = typeof __dirname === \"string\" && __dirname.length > 0\n ? __dirname\n : typeof import.meta !== \"undefined\" && import.meta.url\n ? fileURLToPath(new URL(\".\", import.meta.url))\n : process.cwd()\n const req = createRequire(join(runtimeDir, \"noop.cjs\"))\n const _pa = `${process.platform}-${process.arch}`\n const _paGnu = _pa === \"linux-x64\" ? \"linux-x64-gnu\" : _pa === \"linux-arm64\" ? \"linux-arm64-gnu\" : _pa\n const candidates = [\n // npm install case: dist/../native/\n resolve(runtimeDir, \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_pa}.node`),\n resolve(runtimeDir, \"..\", \"native\", `tailwind-styled-native.${_paGnu}.node`),\n resolve(runtimeDir, \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // cwd fallback\n resolve(process.cwd(), \"native\", \"tailwind-styled-native.node\"),\n resolve(process.cwd(), \"native\", \"tailwind_styled_parser.node\"),\n // monorepo dev: 4-level up\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n // 3-level fallback\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind-styled-native.node\"),\n resolve(runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"),\n ]\n for (const c of candidates) {\n try {\n const mod = req(c) as Record<string, unknown>\n if (typeof mod?.pluginSearch === \"function\") {\n return (_native = mod as unknown as NativePluginRegistry)\n }\n } catch { /* continue */ }\n }\n } catch { /* ignore */ }\n return (_native = null)\n}\n\nconst NATIVE_UNAVAILABLE_MESSAGE =\n \"[tailwind-styled/plugin-registry] Native binding is required but not available.\\n\" +\n \"Please ensure you have run: npm run build:rust\"\n\n/**\n * Native-only accessor. Throws if the Rust binding is missing.\n * The TS layer is a thin wrapper — no JS fallbacks (native-first philosophy).\n */\nfunction requireNative(): NativePluginRegistry {\n const native = getNative()\n if (!native) throw new Error(NATIVE_UNAVAILABLE_MESSAGE)\n return native\n}\n\nconst PLUGIN_NAME_REGEX = /^(@[a-z0-9-]+\\/)?[a-z0-9-]+(@[0-9]+\\.[0-9]+\\.[0-9]+)?$/\n\nexport interface PluginInfo {\n name: string\n description: string\n version: string\n tags: string[]\n official?: boolean\n docs?: string\n install?: string\n integrity?: string\n}\n\ninterface RegistryData {\n version: string\n official: PluginInfo[]\n community: PluginInfo[]\n}\n\nexport interface InstallResult {\n plugin: string\n installed: boolean\n command: string\n exitCode: number\n}\n\nexport type PluginRegistryErrorCode =\n | \"INVALID_PLUGIN_NAME\"\n | \"PLUGIN_NOT_FOUND\"\n | \"EXTERNAL_CONFIRMATION_REQUIRED\"\n | \"INSTALL_COMMAND_FAILED\"\n | \"INSTALL_FAILED\"\n | \"NETWORK_ERROR\"\n | \"REGISTRY_LOAD_FAILED\"\n\nexport interface PluginRegistryErrorPayload {\n code: PluginRegistryErrorCode\n message: string\n context?: Record<string, unknown>\n}\n\nexport class PluginRegistryError extends Error {\n readonly code: PluginRegistryErrorCode\n readonly context?: Record<string, unknown>\n\n constructor(payload: PluginRegistryErrorPayload) {\n super(payload.message)\n this.name = \"PluginRegistryError\"\n this.code = payload.code\n this.context = payload.context\n }\n\n toObject(): PluginRegistryErrorPayload {\n return {\n code: this.code,\n message: this.message,\n context: this.context,\n }\n }\n}\n\nexport interface InstallOptions {\n dryRun?: boolean\n npmBin?: string\n allowExternal?: boolean\n confirmExternal?: boolean\n}\n\nexport interface RegistryOptions {\n registryUrl?: string\n}\n\nexport class PluginRegistry {\n private readonly plugins: PluginInfo[]\n private readonly registryVersion: string\n\n constructor(registryData?: RegistryData, options: RegistryOptions = {}) {\n if (options.registryUrl) {\n this.plugins = []\n this.registryVersion = \"0.0.0\"\n } else {\n const data = registryData\n const version = data?.version ?? \"4.2.0\"\n const official = (data?.official ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: true,\n docs: item.docs,\n install: item.install,\n integrity: item.integrity,\n }))\n const community = (data?.community ?? []).map((item) => ({\n name: item.name,\n description: item.description,\n version: item.version,\n tags: [...item.tags],\n official: false,\n }))\n this.plugins = [...official, ...community]\n this.registryVersion = version\n }\n }\n\n static async loadFromUrl(url: string): Promise<PluginRegistry> {\n try {\n const response = await fetch(url)\n if (!response.ok) {\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to fetch registry: ${response.status} ${response.statusText}`,\n context: { url, status: response.status },\n })\n }\n const data = (await response.json()) as RegistryData\n return new PluginRegistry(data, { registryUrl: url })\n } catch (error) {\n if (error instanceof PluginRegistryError) throw error\n throw new PluginRegistryError({\n code: \"NETWORK_ERROR\",\n message: `Failed to load registry: ${error instanceof Error ? error.message : String(error)}`,\n context: { url },\n })\n }\n }\n\n getVersion(): string {\n return this.registryVersion\n }\n\n search(query: string): PluginInfo[] {\n const native = requireNative()\n return JSON.parse(native.pluginSearch(JSON.stringify(this.plugins), query)) as PluginInfo[]\n }\n\n getAll(): PluginInfo[] {\n return [...this.plugins]\n }\n\n getByName(pluginName: string): PluginInfo | undefined {\n const nameWithoutVersion = pluginName.split(\"@\").slice(0, 2).join(\"@\")\n return this.plugins.find((plugin) => plugin.name === nameWithoutVersion)\n }\n\n install(pluginName: string, options: InstallOptions = {}): InstallResult {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n\n const native = requireNative()\n const isValidName = native.pluginValidateName(pluginName)\n\n if (!isValidName) {\n throw new PluginRegistryError({\n code: \"INVALID_PLUGIN_NAME\",\n message: `Nama plugin tidak valid: '${pluginName}'.`,\n context: {\n pluginName,\n expectedPattern: String(PLUGIN_NAME_REGEX),\n },\n })\n }\n\n const knownPlugin = this.getByName(pluginName)\n const isExternal = !knownPlugin\n\n if (isExternal && !options.allowExternal) {\n throw new PluginRegistryError({\n code: \"PLUGIN_NOT_FOUND\",\n message: `Plugin '${pluginName}' tidak ditemukan di registry. Coba cari dengan 'tw-plugin search <keyword>'.`,\n context: {\n pluginName,\n allowExternal: false,\n },\n })\n }\n\n if (isExternal && options.allowExternal && !options.confirmExternal) {\n throw new PluginRegistryError({\n code: \"EXTERNAL_CONFIRMATION_REQUIRED\",\n message: `Plugin eksternal '${pluginName}' butuh konfirmasi. Jalankan ulang dengan --allow-external --yes.`,\n context: {\n pluginName,\n allowExternal: true,\n },\n })\n }\n\n const command = `${npmBin} install ${pluginName}`\n if (options.dryRun) {\n return { plugin: pluginName, installed: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"install\", pluginName], { stdio: \"inherit\" })\n if (child.error) {\n throw new PluginRegistryError({\n code: \"INSTALL_COMMAND_FAILED\",\n message: `Gagal menjalankan perintah install: ${command}`,\n context: {\n pluginName,\n command,\n reason: child.error.message,\n },\n })\n }\n\n if (child.status !== 0) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Install gagal (${child.status ?? 1}): ${command}`,\n context: {\n pluginName,\n command,\n exitCode: child.status ?? 1,\n },\n })\n }\n\n return {\n plugin: pluginName,\n installed: true,\n command,\n exitCode: 0,\n }\n }\n\n uninstall(\n pluginName: string,\n options: { dryRun?: boolean; npmBin?: string } = {}\n ): {\n plugin: string\n uninstalled: boolean\n command: string\n exitCode: number\n } {\n const npmBin = options.npmBin ?? process.env.TW_PLUGIN_NPM_BIN ?? \"npm\"\n const command = `${npmBin} uninstall ${pluginName}`\n\n if (options.dryRun) {\n return { plugin: pluginName, uninstalled: true, command, exitCode: 0 }\n }\n\n const child = spawnSync(npmBin, [\"uninstall\", pluginName], { stdio: \"inherit\" })\n if (child.status !== 0 && child.status !== null) {\n throw new PluginRegistryError({\n code: \"INSTALL_FAILED\",\n message: `Uninstall gagal (${child.status}): ${command}`,\n context: { pluginName, command, exitCode: child.status },\n })\n }\n\n return {\n plugin: pluginName,\n uninstalled: true,\n command,\n exitCode: child.status ?? 0,\n }\n }\n\n verifyIntegrity(pluginName: string): { ok: boolean; reason?: string } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { ok: false, reason: `Plugin '${pluginName}' not in registry` }\n if (!plugin.integrity) {\n return { ok: true, reason: \"no checksum registered (skip)\" }\n }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { ok: false, reason: \"plugin not installed\" }\n const content = readFileSync(pkgPath, \"utf8\")\n const native = requireNative()\n const ok = native.pluginVerifyIntegrity(content, plugin.integrity!)\n return ok ? { ok: true } : { ok: false, reason: `Integrity mismatch: expected ${plugin.integrity}` }\n } catch (e: unknown) {\n return {\n ok: false,\n reason: `Integrity check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkForUpdate(pluginName: string): {\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n } {\n const plugin = this.getByName(pluginName)\n if (!plugin) return { hasUpdate: false, error: `Plugin '${pluginName}' not in registry` }\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", pluginName, \"package.json\")\n if (!existsSync(pkgPath)) return { hasUpdate: false, error: \"plugin not installed\" }\n const current = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n const latest = plugin.version\n const native = requireNative()\n const hasUpdate = native.pluginSemverHasUpdate(current as string, latest)\n return { hasUpdate, current: current as string, latest }\n } catch (e: unknown) {\n return {\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n }\n }\n }\n\n checkAllUpdates(): Array<{\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }> {\n type UpdateResult = {\n name: string\n hasUpdate: boolean\n current?: string\n latest?: string\n error?: string\n }\n const native = requireNative()\n\n // FS I/O stays in JS — gather installed versions for every registry plugin.\n const installed: Array<{ name: string; version: string }> = []\n const byName = new Map<string, UpdateResult>()\n for (const p of this.plugins) {\n try {\n const pkgPath = join(process.cwd(), \"node_modules\", p.name, \"package.json\")\n if (!existsSync(pkgPath)) {\n byName.set(p.name, { name: p.name, hasUpdate: false, error: \"plugin not installed\" })\n continue\n }\n const version = JSON.parse(readFileSync(pkgPath, \"utf8\")).version ?? \"0.0.0\"\n installed.push({ name: p.name, version: version as string })\n } catch (e: unknown) {\n byName.set(p.name, {\n name: p.name,\n hasUpdate: false,\n error: `Update check failed: ${e instanceof Error ? e.message : String(e)}`,\n })\n }\n }\n\n // Single native batch call does all semver comparisons (1 FFI crossing, not N).\n const results = JSON.parse(\n native.pluginCheckAllUpdates(JSON.stringify(installed), JSON.stringify(this.plugins))\n ) as UpdateResult[]\n for (const r of results) byName.set(r.name, r)\n\n // Preserve registry order.\n return this.plugins.map((p) => byName.get(p.name)).filter((r): r is UpdateResult => r !== undefined)\n }\n}\n\nconst _state = { defaultRegistry: null as PluginRegistry | null }\n\nexport function getRegistry(): PluginRegistry {\n if (!_state.defaultRegistry) {\n const registryData = require(\"../registry.json\") as RegistryData\n _state.defaultRegistry = new PluginRegistry(registryData)\n }\n return _state.defaultRegistry\n}\n\nexport const registry = getRegistry()"],"mappings":";;;;;;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-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
6
20
|
|
|
21
|
+
// src/umbrella/plugin.ts
|
|
22
|
+
var plugin_exports = {};
|
|
23
|
+
__export(plugin_exports, {
|
|
24
|
+
PluginManifestSchema: () => PluginManifestSchema,
|
|
25
|
+
TokenRegistrationSchema: () => TokenRegistrationSchema,
|
|
26
|
+
TransformRegistrationSchema: () => TransformRegistrationSchema,
|
|
27
|
+
TwPluginOptionsSchema: () => TwPluginOptionsSchema,
|
|
28
|
+
applyHooks: () => applyHooks,
|
|
29
|
+
createGlobalPluginContext: () => createGlobalPluginContext,
|
|
30
|
+
createPluginContext: () => createPluginContext,
|
|
31
|
+
createPluginRegistry: () => createPluginRegistry,
|
|
32
|
+
createTw: () => createTw,
|
|
33
|
+
createTwPlugin: () => createTwPlugin,
|
|
34
|
+
getGlobalRegistry: () => getGlobalRegistry,
|
|
35
|
+
getPluginHooks: () => getPluginHooks,
|
|
36
|
+
parsePluginManifest: () => parsePluginManifest,
|
|
37
|
+
parseTokenRegistration: () => parseTokenRegistration,
|
|
38
|
+
parseTwPluginOptions: () => parseTwPluginOptions,
|
|
39
|
+
presetScrollbar: () => presetScrollbar,
|
|
40
|
+
presetTokens: () => presetTokens,
|
|
41
|
+
presetVariants: () => presetVariants,
|
|
42
|
+
readToken: () => readToken,
|
|
43
|
+
registerPluginHooks: () => registerPluginHooks,
|
|
44
|
+
registerToken: () => registerToken,
|
|
45
|
+
registerTransform: () => registerTransform,
|
|
46
|
+
resetGlobalRegistry: () => resetGlobalRegistry,
|
|
47
|
+
resolveTokenEngine: () => resolveTokenEngine,
|
|
48
|
+
use: () => use
|
|
49
|
+
});
|
|
50
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
51
|
+
|
|
52
|
+
// packages/domain/plugin-api/src/schemas.ts
|
|
53
|
+
var import_zod = require("zod");
|
|
7
54
|
var formatIssues = (error) => error.issues.map((issue) => {
|
|
8
55
|
const p = issue.path.length > 0 ? issue.path.join(".") : "<root>";
|
|
9
56
|
return `${p}: ${issue.message}`;
|
|
@@ -13,44 +60,44 @@ var parseWithSchema = (schema, data, label) => {
|
|
|
13
60
|
if (parsed.success) return parsed.data;
|
|
14
61
|
throw new TypeError(`${label}: ${formatIssues(parsed.error)}`);
|
|
15
62
|
};
|
|
16
|
-
var DesignTokensSchema =
|
|
17
|
-
var TwClassResultSchema =
|
|
18
|
-
css:
|
|
19
|
-
classes:
|
|
63
|
+
var DesignTokensSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.union([import_zod.z.string(), import_zod.z.number(), import_zod.z.lazy(() => DesignTokensSchema)]));
|
|
64
|
+
var TwClassResultSchema = import_zod.z.object({
|
|
65
|
+
css: import_zod.z.string(),
|
|
66
|
+
classes: import_zod.z.array(import_zod.z.string())
|
|
20
67
|
});
|
|
21
|
-
var TwPluginOptionsSchema =
|
|
22
|
-
classProcessor:
|
|
68
|
+
var TwPluginOptionsSchema = import_zod.z.object({
|
|
69
|
+
classProcessor: import_zod.z.function({ input: [import_zod.z.array(import_zod.z.string())], output: TwClassResultSchema }).optional(),
|
|
23
70
|
tokens: DesignTokensSchema.optional(),
|
|
24
|
-
debug:
|
|
25
|
-
minify:
|
|
71
|
+
debug: import_zod.z.boolean().optional(),
|
|
72
|
+
minify: import_zod.z.boolean().optional()
|
|
26
73
|
});
|
|
27
|
-
var PluginManifestSchema =
|
|
28
|
-
name:
|
|
29
|
-
setup:
|
|
74
|
+
var PluginManifestSchema = import_zod.z.object({
|
|
75
|
+
name: import_zod.z.string().min(1),
|
|
76
|
+
setup: import_zod.z.function({ input: [import_zod.z.unknown()], output: import_zod.z.unknown() })
|
|
30
77
|
});
|
|
31
|
-
var TransformRegistrationSchema =
|
|
32
|
-
var TokenRegistrationSchema =
|
|
33
|
-
name:
|
|
34
|
-
value:
|
|
78
|
+
var TransformRegistrationSchema = import_zod.z.function({ input: [import_zod.z.unknown()], output: import_zod.z.unknown() });
|
|
79
|
+
var TokenRegistrationSchema = import_zod.z.object({
|
|
80
|
+
name: import_zod.z.string().min(1),
|
|
81
|
+
value: import_zod.z.string()
|
|
35
82
|
});
|
|
36
83
|
var parseTwPluginOptions = (options) => parseWithSchema(TwPluginOptionsSchema, options ?? {}, "plugin options are invalid");
|
|
37
84
|
var parsePluginManifest = (plugin) => parseWithSchema(PluginManifestSchema, plugin, "plugin manifest is invalid");
|
|
38
85
|
var parseTokenRegistration = (data) => parseWithSchema(TokenRegistrationSchema, data, "token registration is invalid");
|
|
39
|
-
var PluginNameSchema =
|
|
86
|
+
var PluginNameSchema = import_zod.z.string().min(1, "Plugin name cannot be empty").regex(
|
|
40
87
|
/^(@[a-z0-9-]+\/)?[a-z0-9][a-z0-9-]*[a-z0-9]$/,
|
|
41
88
|
"Plugin name must follow npm naming: lowercase, hyphens allowed, no leading/trailing hyphens"
|
|
42
89
|
);
|
|
43
|
-
var SemverSchema =
|
|
90
|
+
var SemverSchema = import_zod.z.string().regex(/^\d+\.\d+\.\d+(-[a-z0-9.]+)?$/, "Version must follow semver: x.y.z or x.y.z-prerelease");
|
|
44
91
|
var FullPluginManifestSchema = PluginManifestSchema.extend({
|
|
45
92
|
name: PluginNameSchema,
|
|
46
93
|
version: SemverSchema.optional(),
|
|
47
|
-
description:
|
|
48
|
-
keywords:
|
|
94
|
+
description: import_zod.z.string().max(200).optional(),
|
|
95
|
+
keywords: import_zod.z.array(import_zod.z.string()).max(10).optional()
|
|
49
96
|
});
|
|
50
|
-
|
|
97
|
+
var PluginRegistrationPayloadSchema = import_zod.z.object({
|
|
51
98
|
plugin: FullPluginManifestSchema,
|
|
52
|
-
config:
|
|
53
|
-
priority:
|
|
99
|
+
config: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional(),
|
|
100
|
+
priority: import_zod.z.number().int().min(0).max(100).optional()
|
|
54
101
|
});
|
|
55
102
|
|
|
56
103
|
// packages/domain/plugin-api/src/index.ts
|
|
@@ -259,31 +306,32 @@ function createTwPlugin(options = {}) {
|
|
|
259
306
|
}
|
|
260
307
|
};
|
|
261
308
|
}
|
|
262
|
-
|
|
263
|
-
exports
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
309
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
310
|
+
0 && (module.exports = {
|
|
311
|
+
PluginManifestSchema,
|
|
312
|
+
TokenRegistrationSchema,
|
|
313
|
+
TransformRegistrationSchema,
|
|
314
|
+
TwPluginOptionsSchema,
|
|
315
|
+
applyHooks,
|
|
316
|
+
createGlobalPluginContext,
|
|
317
|
+
createPluginContext,
|
|
318
|
+
createPluginRegistry,
|
|
319
|
+
createTw,
|
|
320
|
+
createTwPlugin,
|
|
321
|
+
getGlobalRegistry,
|
|
322
|
+
getPluginHooks,
|
|
323
|
+
parsePluginManifest,
|
|
324
|
+
parseTokenRegistration,
|
|
325
|
+
parseTwPluginOptions,
|
|
326
|
+
presetScrollbar,
|
|
327
|
+
presetTokens,
|
|
328
|
+
presetVariants,
|
|
329
|
+
readToken,
|
|
330
|
+
registerPluginHooks,
|
|
331
|
+
registerToken,
|
|
332
|
+
registerTransform,
|
|
333
|
+
resetGlobalRegistry,
|
|
334
|
+
resolveTokenEngine,
|
|
335
|
+
use
|
|
336
|
+
});
|
|
289
337
|
//# sourceMappingURL=plugin.js.map
|