@object-ui/plugin-editor 0.3.0 → 0.5.0

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/package.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "name": "@object-ui/plugin-editor",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
+ "description": "Rich text editor plugin for Object UI, powered by Monaco Editor",
7
+ "homepage": "https://www.objectui.org",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/objectstack-ai/objectui.git",
11
+ "directory": "packages/plugin-editor"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/objectstack-ai/objectui/issues"
15
+ },
6
16
  "main": "dist/index.umd.cjs",
7
17
  "module": "dist/index.js",
8
18
  "types": "dist/index.d.ts",
@@ -15,19 +25,19 @@
15
25
  },
16
26
  "dependencies": {
17
27
  "@monaco-editor/react": "^4.6.0",
18
- "@object-ui/components": "0.3.0",
19
- "@object-ui/core": "0.3.0",
20
- "@object-ui/react": "0.3.0",
21
- "@object-ui/types": "0.3.0"
28
+ "@object-ui/components": "0.5.0",
29
+ "@object-ui/core": "0.5.0",
30
+ "@object-ui/react": "0.5.0",
31
+ "@object-ui/types": "0.5.0"
22
32
  },
23
33
  "peerDependencies": {
24
34
  "react": "^18.0.0 || ^19.0.0",
25
35
  "react-dom": "^18.0.0 || ^19.0.0"
26
36
  },
27
37
  "devDependencies": {
28
- "@types/react": "^18.3.12",
29
- "@types/react-dom": "^18.3.1",
30
- "@vitejs/plugin-react": "^4.2.1",
38
+ "@types/react": "^19.2.10",
39
+ "@types/react-dom": "^19.2.3",
40
+ "@vitejs/plugin-react": "^5.1.3",
31
41
  "typescript": "^5.9.3",
32
42
  "vite": "^7.3.1",
33
43
  "vite-plugin-dts": "^4.5.4"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import Editor from '@monaco-editor/react';
2
10
 
3
11
  export interface MonacoImplProps {
package/src/index.test.ts CHANGED
@@ -1,11 +1,20 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import { describe, it, expect, beforeAll } from 'vitest';
2
10
  import { ComponentRegistry } from '@object-ui/core';
3
11
 
4
12
  describe('Plugin Editor', () => {
5
13
  // Import all renderers to register them
14
+ // Note: Monaco Editor is a heavy library that takes time to load
6
15
  beforeAll(async () => {
7
16
  await import('./index');
8
- });
17
+ }, 30000); // 30 second timeout for Monaco Editor initialization
9
18
 
10
19
  describe('code-editor component', () => {
11
20
  it('should be registered in ComponentRegistry', () => {
package/src/index.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import React, { Suspense } from 'react';
2
10
  import { ComponentRegistry } from '@object-ui/core';
3
11
  import { Skeleton } from '@object-ui/components';
@@ -50,6 +58,7 @@ ComponentRegistry.register(
50
58
  'code-editor',
51
59
  CodeEditorRenderer,
52
60
  {
61
+ namespace: 'plugin-editor',
53
62
  label: 'Code Editor',
54
63
  category: 'plugin',
55
64
  inputs: [
package/src/types.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  /**
2
10
  * TypeScript type definitions for @object-ui/plugin-editor
3
11
  *
package/vite.config.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import { defineConfig } from 'vite';
2
10
  import react from '@vitejs/plugin-react';
3
11
  import dts from 'vite-plugin-dts';
@@ -14,6 +22,13 @@ export default defineConfig({
14
22
  resolve: {
15
23
  alias: {
16
24
  '@': resolve(__dirname, './src'),
25
+ '@object-ui/core': resolve(__dirname, '../core/src'),
26
+ '@object-ui/types': resolve(__dirname, '../types/src'),
27
+ '@object-ui/react': resolve(__dirname, '../react/src'),
28
+ '@object-ui/components': resolve(__dirname, '../components/src'),
29
+ '@object-ui/fields': resolve(__dirname, '../fields/src'),
30
+ '@object-ui/plugin-dashboard': resolve(__dirname, '../plugin-dashboard/src'),
31
+ '@object-ui/plugin-grid': resolve(__dirname, '../plugin-grid/src'),
17
32
  },
18
33
  },
19
34
  build: {
@@ -35,4 +50,10 @@ export default defineConfig({
35
50
  },
36
51
  },
37
52
  },
53
+ test: {
54
+ globals: true,
55
+ environment: 'happy-dom',
56
+ setupFiles: ['../../vitest.setup.tsx'],
57
+ passWithNoTests: true,
58
+ },
38
59
  });