diff --git a/apps/blocks/registry.json b/apps/blocks/registry.json index c3a6225..a1296c6 100644 --- a/apps/blocks/registry.json +++ b/apps/blocks/registry.json @@ -269,7 +269,7 @@ ], "docs": "## Usage\n\nCreate one registry for the application, adapt navigation at the host boundary, and render the palette near the root layout. Pages can register commands while mounted with `usePageCommands`.\n\n```tsx\nimport { createCommandRegistry, kbd } from '@constructive-io/command-palette';\nimport { CommandPalette } from '@/blocks/command-palette/command-palette';\n\nconst registry = createCommandRegistry({\n groups: [{ id: 'navigation', label: 'Navigation', priority: 1 }],\n commands: [{\n id: 'settings',\n label: 'Open settings',\n type: 'navigation',\n group: 'navigation',\n href: '/settings',\n shortcut: kbd(',', 'mod')\n }]\n});\n\n router.push(href)} />;\n```\n\nThe installed block owns presentation and keyboard interaction. The headless package owns command registration, execution, multi-step state, and background-task lifecycle. Route authorization, action permissions, errors, and business workflows remain the host application's responsibility.", "dependencies": [ - "@constructive-io/command-palette@^0.3.0", + "@constructive-io/command-palette@^0.4.0", "lucide-react", "motion" ], @@ -436,7 +436,7 @@ "description": "The leaf-independent Console Kit shell, runtime, discovery, and single modular Zustand store.", "docs": "`console-kit-core` installed the shell, runtime, semantic routing, callback boundary, and one per-instance modular Zustand store. Core intentionally includes no feature view, so add selected `console-module-*` items.\n\nDegraded states: explicit endpoint, current `_meta`, introspection, capability, and adapter evidence fail closed independently; installation never grants authority.\n\nGuide: https://constructive-io.github.io/blocks/blocks/console-kit/", "dependencies": [ - "@constructive-io/data@^0.4.0", + "@constructive-io/data@^0.5.0", "@tanstack/react-query", "graphql", "lucide-react", @@ -566,7 +566,7 @@ "description": "A current-_meta-only application data explorer with application-table filtering and spreadsheet CRUD.", "docs": "`feature-pack-data` installed a provider-neutral view and `.constructive/feature-packs/data.json`. Import from `@/blocks/feature-packs/data/data-feature-pack`. The host must supply the view resource, policy, and actions; add `console-module-data` when Console Kit should own discovery and Constructive integration.\n\nDegraded states: The host owns Sheets state and endpoint binding; incompatible metadata stays explicit, and PostgreSQL privileges and RLS decide every query and mutation.\n\nGuide: https://constructive-io.github.io/blocks/blocks/features/data/", "dependencies": [ - "@constructive-io/data@^0.4.0", + "@constructive-io/data@^0.5.0", "lucide-react" ], "registryDependencies": [ diff --git a/apps/registry/scripts/compiler.test.ts b/apps/registry/scripts/compiler.test.ts index dc433fc..1bd4f9e 100644 --- a/apps/registry/scripts/compiler.test.ts +++ b/apps/registry/scripts/compiler.test.ts @@ -56,7 +56,7 @@ test('rewrites the source-owned Sheets package to the local registry block', () new Set(), ); - assert.match(result.source, /from '@\/components\/ui\/sheets'/); + assert.match(result.source, /from '@\/components\/ui\/sheets\/index'/); assert.deepEqual(result.registryDependencies, ['sheets']); assert.throws( () => rewriteConstructiveUiImports( diff --git a/apps/registry/scripts/compiler.ts b/apps/registry/scripts/compiler.ts index 633bf7a..eb2029b 100644 --- a/apps/registry/scripts/compiler.ts +++ b/apps/registry/scripts/compiler.ts @@ -5,6 +5,9 @@ export const CONSTRUCTIVE_UI_PACKAGE = '@constructive-io/ui'; export const CONSTRUCTIVE_SHEETS_PACKAGE = '@constructive-io/sheets'; export const CONSTRUCTIVE_NAMESPACE = '@constructive/'; export const CONSTRUCTIVE_THEME_DEPENDENCY = '@constructive/constructive-theme'; +export const CONSTRUCTIVE_DATA_DEPENDENCY = '@constructive-io/data@^0.5.0'; +export const CONSTRUCTIVE_COMMAND_PALETTE_DEPENDENCY = '@constructive-io/command-palette@^0.4.0'; +export const NODE_TYPE_REGISTRY_DEPENDENCY = 'node-type-registry@^1.11.0'; export const FEATURE_PACK_IDS = [ 'data', @@ -436,7 +439,11 @@ export function rewriteConstructiveUiImports( edits.push({ start: literal.getStart() + 1, end: literal.getEnd() - 1, - replacement: '@/components/ui/sheets', + // Keep the barrel explicit. shadcn treats an exact + // `@/components/ui/` import as an item alias and + // rewrites it to that item's primary file during installation. + // Sheets exports its public surface from index.ts, not grid/sheets.tsx. + replacement: '@/components/ui/sheets/index', }); dependencies.add('sheets'); continue; diff --git a/apps/registry/scripts/smoke-install.ts b/apps/registry/scripts/smoke-install.ts index b1100c4..754b17a 100644 --- a/apps/registry/scripts/smoke-install.ts +++ b/apps/registry/scripts/smoke-install.ts @@ -172,10 +172,10 @@ function forbiddenFeaturePacks(ids: readonly FeaturePackId[]): string[] { const standaloneFeaturePackCases: SmokeCase[] = featurePackIds.map((id) => ({ name: `feature-pack-${id}`, expectedPackages: id === 'data' - ? ['@constructive-io/data'] + ? ['@constructive-io/data', 'zustand'] : [], forbiddenPackages: [ - 'zustand', + ...(id === 'data' ? [] : ['zustand']), '@constructive-io/sheets', ...(id === 'data' ? [] : ['@constructive-io/data']), ], diff --git a/docs/RELEASING.md b/docs/RELEASING.md index c94d2c0..d1a9786 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -17,11 +17,11 @@ and tags but has no npm credentials and does not run `npm publish`. For the repository cutover, the intended releases are: -- `@constructive-io/ui@0.7.0` -- `@constructive-io/data@0.4.0` -- `@constructive-io/sheets@0.7.0` -- `@constructive-io/command-palette@0.3.0` -- `@constructive-io/schema-builder@0.3.0` +- `@constructive-io/ui@0.8.0` +- `@constructive-io/data@0.5.0` +- `@constructive-io/sheets@0.8.0` +- `@constructive-io/command-palette@0.4.0` +- `@constructive-io/schema-builder@0.4.0` ## Verify the exact publish inputs @@ -53,11 +53,11 @@ Publish the tarballs themselves so npm receives the exact files that passed the local checks: ```bash -npm publish .artifacts/npm/constructive-io-ui-0.7.0.tgz --access public -npm publish .artifacts/npm/constructive-io-data-0.4.0.tgz --access public -npm publish .artifacts/npm/constructive-io-sheets-0.7.0.tgz --access public -npm publish .artifacts/npm/constructive-io-command-palette-0.3.0.tgz --access public -npm publish .artifacts/npm/constructive-io-schema-builder-0.3.0.tgz --access public +npm publish .artifacts/npm/constructive-io-ui-0.8.0.tgz --access public +npm publish .artifacts/npm/constructive-io-data-0.5.0.tgz --access public +npm publish .artifacts/npm/constructive-io-sheets-0.8.0.tgz --access public +npm publish .artifacts/npm/constructive-io-command-palette-0.4.0.tgz --access public +npm publish .artifacts/npm/constructive-io-schema-builder-0.4.0.tgz --access public ``` Verify all five packages with `npm view` and a clean consumer install. Published diff --git a/packages/schema-builder/package.json b/packages/schema-builder/package.json index 60e3cde..fb74b50 100644 --- a/packages/schema-builder/package.json +++ b/packages/schema-builder/package.json @@ -155,7 +155,7 @@ "clsx": "^2.1.1", "lucide-react": "^0.525.0", "motion": "^12.40.0", - "node-type-registry": "0.48.0", + "node-type-registry": "^1.11.0", "pg-ast": "^2.11.3", "tailwind-merge": "^3.4.0", "zustand": "^5.0.9" diff --git a/packages/schema-builder/registry.json b/packages/schema-builder/registry.json index 5a84120..62b536c 100644 --- a/packages/schema-builder/registry.json +++ b/packages/schema-builder/registry.json @@ -14,7 +14,7 @@ "schema" ], "dependencies": [ - "@constructive-io/data@^0.4.0", + "@constructive-io/data@^0.5.0", "@dnd-kit/core", "@dnd-kit/utilities", "@fluentui/react-context-selector", @@ -24,7 +24,7 @@ "clsx", "lucide-react", "motion", - "node-type-registry@0.48.0", + "node-type-registry@^1.11.0", "pg-ast@2.11.3", "tailwind-merge", "zustand" diff --git a/packages/schema-builder/scripts/build-registry.ts b/packages/schema-builder/scripts/build-registry.ts index 4300111..4884345 100644 --- a/packages/schema-builder/scripts/build-registry.ts +++ b/packages/schema-builder/scripts/build-registry.ts @@ -3,7 +3,11 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { collectModuleSpecifiers } from '../../../apps/registry/scripts/compiler'; +import { + CONSTRUCTIVE_DATA_DEPENDENCY, + NODE_TYPE_REGISTRY_DEPENDENCY, + collectModuleSpecifiers, +} from '../../../apps/registry/scripts/compiler'; import { buildSourceRegistry } from '../../../apps/registry/scripts/build-source-registry'; const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); @@ -58,7 +62,7 @@ buildSourceRegistry({ registrySubdirectory: 'blocks/schema-builder', targetPrefix: '@components/schema-builder', dependencies: [ - '@constructive-io/data@^0.4.0', + CONSTRUCTIVE_DATA_DEPENDENCY, '@dnd-kit/core', '@dnd-kit/utilities', '@fluentui/react-context-selector', @@ -68,7 +72,7 @@ buildSourceRegistry({ 'clsx', 'lucide-react', 'motion', - 'node-type-registry@0.48.0', + NODE_TYPE_REGISTRY_DEPENDENCY, 'pg-ast@2.11.3', 'tailwind-merge', 'zustand', diff --git a/packages/sheets/registry.json b/packages/sheets/registry.json index 2054f9a..dcbbc2b 100644 --- a/packages/sheets/registry.json +++ b/packages/sheets/registry.json @@ -14,7 +14,7 @@ "data" ], "dependencies": [ - "@constructive-io/data@^0.4.0", + "@constructive-io/data@^0.5.0", "@internationalized/date", "@remixicon/react", "@tanstack/react-form", diff --git a/packages/sheets/scripts/build-registry.ts b/packages/sheets/scripts/build-registry.ts index 8b52009..4baf8f2 100644 --- a/packages/sheets/scripts/build-registry.ts +++ b/packages/sheets/scripts/build-registry.ts @@ -3,6 +3,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; +import { CONSTRUCTIVE_DATA_DEPENDENCY } from '../../../apps/registry/scripts/compiler'; import { buildSourceRegistry } from '../../../apps/registry/scripts/build-source-registry'; const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); @@ -20,7 +21,7 @@ buildSourceRegistry({ registrySubdirectory: 'blocks/sheets', targetPrefix: '@ui/sheets', dependencies: [ - '@constructive-io/data@^0.4.0', + CONSTRUCTIVE_DATA_DEPENDENCY, '@internationalized/date', '@remixicon/react', '@tanstack/react-form', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db22f2a..666108b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -251,8 +251,8 @@ importers: specifier: ^12.40.0 version: 12.42.2(@emotion/is-prop-valid@1.4.0)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) node-type-registry: - specifier: 0.48.0 - version: 0.48.0 + specifier: ^1.11.0 + version: 1.11.1 pg-ast: specifier: ^2.11.3 version: 2.21.0 @@ -2174,11 +2174,17 @@ packages: '@pgsql/quotes@17.1.0': resolution: {integrity: sha512-J/H+LcrENBpYgL45WW6aTjb5Yk4tX4+AmB2/k8KZa+Zh3wiCtqmNIag+HZz5HmWaF6EZK9ZGC95NBD1fs+rUvg==} + '@pgsql/quotes@18.1.0': + resolution: {integrity: sha512-wZcMP1QHiQbWWKOw4nfvZ74xUSz/9jqeSUXVnoR1saI5M0D+iYbiuOlfNDyYmziLwgEkCuSJLZK1dZ+eQCwgAA==} + '@pgsql/types@17.6.2': resolution: {integrity: sha512-1UtbELdbqNdyOShhrVfSz3a1gDi0s9XXiQemx+6QqtsrXe62a6zOGU+vjb2GRfG5jeEokI1zBBcfD42enRv0Rw==} - '@pgsql/utils@17.8.18': - resolution: {integrity: sha512-w8o4Frey+Ndb/Ltue6uzB1upQTyAo5xRM0G4Ik97IL1SO/u6GwxgHfxOUehtPRppD63qmii2pv71f+AUjDIt9w==} + '@pgsql/types@18.0.0': + resolution: {integrity: sha512-jtAY4JU7jdVYZ/Vv3zlZqVP+FRWZokyCLKPPCnAApiaJAElpyyiMC3HRiquBu29kSrVs+rkqZD50SUIb/zyEGw==} + + '@pgsql/utils@18.1.1': + resolution: {integrity: sha512-ltmbZOQQXKyPs94DDbDl+SQT9Wvf3B6oyT6vDf0dPbv/LOiGm5vD5SiUOofVPh9cTlX/QRVpOVJkhRsknIK8lg==} '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} @@ -5945,8 +5951,8 @@ packages: resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==} engines: {node: '>=18'} - node-type-registry@0.48.0: - resolution: {integrity: sha512-Cam4naFvP1y1ugwMa7OceYKZwbDvhNJWL8I+U7b5f1QM1PouOhKCVekCiXspvwymJRbfn+qFojFgwP5Ychs7zA==} + node-type-registry@1.11.1: + resolution: {integrity: sha512-4MYUJR8luHjxundn5bT7MN1CNK4in7ndeN5EqCmugCBARS7yswncyVB7GCa9TOV6L9jsHg4uKXCVDVH6rqYc7Q==} nopt@7.2.1: resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} @@ -6288,8 +6294,8 @@ packages: pgpass@1.0.5: resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} - pgsql-deparser@17.18.4: - resolution: {integrity: sha512-YdkHNvJTAEc1DZ76VjMEEWOhIVjCHqQjIj91nXAum4OzezINN3zPuVwBfIYm+pTdxnzA1fBuJWsj4EEnVBIR2A==} + pgsql-deparser@18.1.1: + resolution: {integrity: sha512-G+5yj8rGlkW5YUJTKubV3J5YnAvbm8YpzphT1bYkRjAI5MKTVRXwGZJ0gqluqjhLNqDw6d20IFE4J5Z7yEmwWg==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -9710,11 +9716,15 @@ snapshots: '@pgsql/quotes@17.1.0': {} + '@pgsql/quotes@18.1.0': {} + '@pgsql/types@17.6.2': {} - '@pgsql/utils@17.8.18': + '@pgsql/types@18.0.0': {} + + '@pgsql/utils@18.1.1': dependencies: - '@pgsql/types': 17.6.2 + '@pgsql/types': 18.0.0 nested-obj: 0.2.2 '@pkgjs/parseargs@0.11.0': @@ -13634,13 +13644,13 @@ snapshots: node-releases@2.0.51: {} - node-type-registry@0.48.0: + node-type-registry@1.11.1: dependencies: '@babel/generator': 7.29.7 '@babel/types': 7.29.7 - '@pgsql/types': 17.6.2 - '@pgsql/utils': 17.8.18 - pgsql-deparser: 17.18.4 + '@pgsql/types': 18.0.0 + '@pgsql/utils': 18.1.1 + pgsql-deparser: 18.1.1 schema-typescript: 0.14.3 nopt@7.2.1: @@ -14122,10 +14132,10 @@ snapshots: dependencies: split2: 4.2.0 - pgsql-deparser@17.18.4: + pgsql-deparser@18.1.1: dependencies: - '@pgsql/quotes': 17.1.0 - '@pgsql/types': 17.6.2 + '@pgsql/quotes': 18.1.0 + '@pgsql/types': 18.0.0 picocolors@1.1.1: {} diff --git a/scripts/check-registry-contract.ts b/scripts/check-registry-contract.ts index ddeae1d..7ea7fa4 100644 --- a/scripts/check-registry-contract.ts +++ b/scripts/check-registry-contract.ts @@ -3,6 +3,8 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { + CONSTRUCTIVE_COMMAND_PALETTE_DEPENDENCY, + CONSTRUCTIVE_DATA_DEPENDENCY, CONSTRUCTIVE_THEME_DEPENDENCY, CONSTRUCTIVE_SHEETS_PACKAGE, CONSTRUCTIVE_UI_PACKAGE, @@ -16,8 +18,8 @@ const registryPath = path.join(root, 'apps', 'registry', 'registry.json'); const registry = JSON.parse(await readFile(registryPath, 'utf8')) as Registry; const ownNames = new Set(registry.items.map((item) => item.name)); const requiredPackageRanges = new Map([ - ['@constructive-io/data', '@constructive-io/data@^0.4.0'], - ['@constructive-io/command-palette', '@constructive-io/command-palette@^0.3.0'], + ['@constructive-io/data', CONSTRUCTIVE_DATA_DEPENDENCY], + ['@constructive-io/command-palette', CONSTRUCTIVE_COMMAND_PALETTE_DEPENDENCY], ]); assertUniqueRegistryShape(registry.items);