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
13 changes: 13 additions & 0 deletions .storybook/test-runner.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @type {import('@storybook/test-runner').TestRunnerConfig}
*/
module.exports = {
async preVisit(page) {
// Inject __test global to prevent ReferenceError during test execution
// This addresses the error: "page.evaluate: ReferenceError: __test is not defined"
// that occurs when running Storybook test-runner smoke tests
await page.evaluate(() => {
window.__test = true;
});
},
};
23 changes: 0 additions & 23 deletions .storybook/test-runner.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@object-ui/types": "workspace:*",
"@objectstack/spec": "^0.4.1",
"@objectstack/spec": "^0.6.1",
"lodash": "^4.17.23",
"zod": "^4.3.6"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@object-ui/core": "workspace:*",
"@objectstack/spec": "^0.3.3",
"@objectstack/spec": "^0.6.1",
"react-hook-form": "^7.71.1"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"directory": "packages/types"
},
"dependencies": {
"@objectstack/spec": "^0.3.3",
"@objectstack/spec": "^0.6.1",
"zod": "^4.3.6"
},
"devDependencies": {
Expand Down
80 changes: 80 additions & 0 deletions packages/types/src/__tests__/namespace-exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/**
* Test to verify ObjectStack Spec v0.6.1 namespace exports
*/
import { describe, it, expect } from 'vitest';
import type { Data, UI, System, AI, API, Auth, Hub, Automation, Permission, Shared } from '../index';

describe('ObjectStack Spec v0.6.1 Namespace Exports', () => {
it('should export Data namespace', () => {
// Type check only - this verifies the namespace is exported
const field: Data.Field = {
name: 'test',
type: 'text',
label: 'Test Field',
};
expect(field.name).toBe('test');
});

it('should export UI namespace', () => {
// Type check only - verify UI namespace exists
type UITest = UI.Component | undefined;
const uiComponent: UITest = undefined;
expect(uiComponent).toBeUndefined();
});

it('should export System namespace', () => {
// Type check only - verify System namespace exists
type SystemTest = System.Environment | undefined;
const systemEnv: SystemTest = undefined;
expect(systemEnv).toBeUndefined();
});

it('should export AI namespace', () => {
// Type check only - verify AI namespace exists
type AITest = AI.Model | undefined;
const aiModel: AITest = undefined;
expect(aiModel).toBeUndefined();
});

it('should export API namespace', () => {
// Type check only - verify API namespace exists
type APITest = API.Endpoint | undefined;
const apiEndpoint: APITest = undefined;
expect(apiEndpoint).toBeUndefined();
});

it('should export Auth namespace', () => {
// Type check only - verify Auth namespace exists
type AuthTest = Auth.User | undefined;
const authUser: AuthTest = undefined;
expect(authUser).toBeUndefined();
});

it('should export Hub namespace', () => {
// Type check only - verify Hub namespace exists
type HubTest = Hub.Tenant | undefined;
const hubTenant: HubTest = undefined;
expect(hubTenant).toBeUndefined();
});

it('should export Automation namespace', () => {
// Type check only - verify Automation namespace exists
type AutomationTest = Automation.Workflow | undefined;
const workflow: AutomationTest = undefined;
expect(workflow).toBeUndefined();
});

it('should export Permission namespace', () => {
// Type check only - verify Permission namespace exists
type PermissionTest = Permission.PermissionSet | undefined;
const permissionSet: PermissionTest = undefined;
expect(permissionSet).toBeUndefined();
});

it('should export Shared namespace', () => {
// Type check only - verify Shared namespace exists
type SharedTest = Shared.ObjectId | undefined;
const objectId: SharedTest = undefined;
expect(objectId).toBeUndefined();
});
});
19 changes: 19 additions & 0 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,22 @@ export type {
SchemaRegistry,
ComponentType,
} from './registry';

// ============================================================================
// ObjectStack Protocol Namespaces - Protocol Re-exports
// ============================================================================
/**
* Re-export ObjectStack Protocol namespaces for convenience.
*
* This allows consumers to access the full ObjectStack protocol through
* @object-ui/types without needing to install @objectstack/spec separately.
*
* @example
* ```typescript
* import { Data, UI, System, AI, API } from '@object-ui/types';
*
* const field: Data.Field = { name: 'task_name', type: 'text' };
* const component: UI.Component = { type: 'button', label: 'Click me' };
* ```
*/
export type { Data, UI, System, AI, API, Auth, Hub, Automation, Permission, Shared } from '@objectstack/spec';
20 changes: 6 additions & 14 deletions pnpm-lock.yaml

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

Loading