Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/blocks/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -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<CommandPalette registry={registry} navigate={(href) => 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"
],
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion apps/registry/scripts/compiler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 8 additions & 1 deletion apps/registry/scripts/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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/<registry item>` 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;
Expand Down
4 changes: 2 additions & 2 deletions apps/registry/scripts/smoke-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
],
Expand Down
20 changes: 10 additions & 10 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions packages/schema-builder/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
10 changes: 7 additions & 3 deletions packages/schema-builder/scripts/build-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)), '..');
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion packages/sheets/scripts/build-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)), '..');
Expand All @@ -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',
Expand Down
44 changes: 27 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions scripts/check-registry-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down