diff --git a/.changeset/tame-crews-wave.md b/.changeset/tame-crews-wave.md new file mode 100644 index 00000000..2abbeabb --- /dev/null +++ b/.changeset/tame-crews-wave.md @@ -0,0 +1,5 @@ +--- +'@blinkk/root-cms': patch +--- + +refactor: move richtext into core folder diff --git a/packages/root-cms/richtext/richtext.tsx b/packages/root-cms/core/richtext.tsx similarity index 96% rename from packages/root-cms/richtext/richtext.tsx rename to packages/root-cms/core/richtext.tsx index a41a1f4b..60d0b16e 100644 --- a/packages/root-cms/richtext/richtext.tsx +++ b/packages/root-cms/core/richtext.tsx @@ -1,6 +1,15 @@ import {useTranslations} from '@blinkk/root'; import {FunctionalComponent} from 'preact'; -import {RichTextData} from './types.js'; + +export interface RichTextBlock { + type: string; + data?: any; +} + +export interface RichTextData { + [key: string]: any; + blocks: any[]; +} export type RichTextBlockComponent = FunctionalComponent; diff --git a/packages/root-cms/core/tsup.config.ts b/packages/root-cms/core/tsup.config.ts index 84935c49..b9e5e113 100644 --- a/packages/root-cms/core/tsup.config.ts +++ b/packages/root-cms/core/tsup.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ functions: './core/functions.ts', plugin: './core/plugin.ts', project: './core/project.ts', - richtext: './richtext/richtext.tsx', + richtext: './core/richtext.tsx', }, sourcemap: 'inline', target: 'node16', @@ -22,7 +22,7 @@ export default defineConfig({ './core/functions.ts', './core/plugin.ts', './core/project.ts', - './richtext/richtext.tsx', + './core/richtext.tsx', ], }, format: ['esm'], diff --git a/packages/root-cms/richtext/tsconfig.json b/packages/root-cms/richtext/tsconfig.json deleted file mode 100644 index 428be5d8..00000000 --- a/packages/root-cms/richtext/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "compilerOptions": { - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "declaration": true, - "forceConsistentCasingInFileNames": true, - "lib": ["esnext"], - "module": "nodenext", - "noEmitOnError": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "pretty": true, - "sourceMap": true, - "strict": true, - "target": "es2020", - "outDir": "dist", - "types": [ - "node", - "vite/client" - ], - "useUnknownInCatchVariables": false, - "esModuleInterop": true, - "resolveJsonModule": true, - "moduleResolution": "nodenext", - "jsx": "react-jsx", - "jsxImportSource": "preact" - }, - "include": [ - "*.ts", - "**/*.ts", - "*.tsx", - "**/*.tsx", - ] -} diff --git a/packages/root-cms/richtext/types.ts b/packages/root-cms/richtext/types.ts deleted file mode 100644 index 2289aafd..00000000 --- a/packages/root-cms/richtext/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface RichTextBlock { - type: string; - data?: any; -} - -export interface RichTextData { - [key: string]: any; - blocks: any[]; -}