Updated package imports
This commit is contained in:
parent
f54546259b
commit
d11d52160b
|
@ -8,6 +8,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/lib/main.ts"></script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
6
lerna-debug.log
Normal file
6
lerna-debug.log
Normal file
|
@ -0,0 +1,6 @@
|
|||
0 silly argv { _: [ 'bootstrap' ], lernaVersion: '3.22.1', '$0': 'lerna' }
|
||||
1 notice cli v3.22.1
|
||||
2 verbose rootPath /home/ben/Workspace/schlechtenburg
|
||||
3 error JSONError: Unexpected string in JSON at position 503 while parsing '{ "name": "@schlechtenburg/core", "v' in core/package.json
|
||||
3 error at module.exports (/home/ben/.local/share/nvm/versions/node/v14.5.0/lib/node_modules/lerna/node_modules/parse-json/index.js:26:19)
|
||||
3 error at parse (/home/ben/.local/share/nvm/versions/node/v14.5.0/lib/node_modules/lerna/node_modules/load-json-file/index.js:15:9)
|
10104
package-lock.json
generated
Normal file
10104
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
@ -1,4 +1,21 @@
|
|||
{
|
||||
"name": "schlechtenburg",
|
||||
"version": "0.0.0"
|
||||
"version": "0.0.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vuedx-typecheck . && vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/compiler-sfc": "^3.0.4",
|
||||
"@vuedx/typecheck": "^0.3.1-insiders-1606311019.0",
|
||||
"@vuedx/typescript-plugin-vue": "^0.3.1-insiders-1606311019.0",
|
||||
"lerna": "^3.22.1",
|
||||
"sass": "^1.30.0",
|
||||
"typescript": "^4.1.2",
|
||||
"vite": "^1.0.0-rc.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,13 +6,13 @@ import {
|
|||
ref,
|
||||
Ref,
|
||||
} from 'vue';
|
||||
import { Block } from '/@/blocks';
|
||||
import { SbMode } from '/@/mode';
|
||||
import { useResizeObserver, BlockDimensions } from '/@/use-resize-observer';
|
||||
import { useActivation } from '/@/use-activation';
|
||||
import { useDynamicBlocks } from '/@/use-dynamic-blocks';
|
||||
import { Block } from '../blocks';
|
||||
import { SbMode } from '../mode';
|
||||
import { useResizeObserver, BlockDimensions } from '../use-resize-observer';
|
||||
import { useActivation } from '../use-activation';
|
||||
import { useDynamicBlocks } from '../use-dynamic-blocks';
|
||||
|
||||
import SbBlockOrdering from './BlockOrdering';
|
||||
import { SbBlockOrdering } from './BlockOrdering';
|
||||
|
||||
import './Block.scss';
|
||||
|
||||
|
@ -27,7 +27,7 @@ interface BlockProps {
|
|||
sortable: string;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
export const SbBlock = defineComponent({
|
||||
name: 'sb-block',
|
||||
|
||||
props: {
|
|
@ -5,13 +5,13 @@ import {
|
|||
computed,
|
||||
defineComponent,
|
||||
} from 'vue';
|
||||
import { useBlockSizing } from '/@/use-resize-observer';
|
||||
import { useBlockSizing } from '../use-resize-observer';
|
||||
|
||||
import SbButton from './Button';
|
||||
|
||||
import './BlockOrdering.scss';
|
||||
|
||||
export default defineComponent({
|
||||
export const SbBlockOrdering = defineComponent({
|
||||
name: 'sb-block-ordering',
|
||||
|
||||
props: {
|
|
@ -6,14 +6,14 @@ import {
|
|||
import {
|
||||
useDynamicBlocks,
|
||||
BlockDefinition,
|
||||
} from '/@/use-dynamic-blocks';
|
||||
} from '../use-dynamic-blocks';
|
||||
|
||||
import SbButton from '/@internal/Button';
|
||||
import SbModal from '/@internal/Modal';
|
||||
import SbButton from './Button';
|
||||
import SbModal from './Modal';
|
||||
|
||||
import './BlockPicker.scss';
|
||||
|
||||
export default defineComponent({
|
||||
export const SbBlockPicker = defineComponent({
|
||||
name: 'sb-block-picker',
|
||||
|
||||
props: {},
|
|
@ -1,16 +1,17 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import { BlockDefinition } from '/@/blocks';
|
||||
import BlockPicker from '/@internal/BlockPicker';
|
||||
import { BlockDefinition } from '../blocks';
|
||||
|
||||
import SbBlockPicker from './BlockPicker';
|
||||
|
||||
import './BlockPlaceholder.scss';
|
||||
|
||||
export default defineComponent({
|
||||
export const BlockPlaceholder = defineComponent({
|
||||
name: 'sb-block-placeholder',
|
||||
|
||||
setup(props, context) {
|
||||
return () => (
|
||||
<div class="sb-block-placeholder">
|
||||
<BlockPicker
|
||||
<SbBlockPicker
|
||||
onPickedBlock={(block: BlockDefinition) => context.emit('insert-block', block)}
|
||||
/>
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import './Button.scss';
|
||||
|
||||
export default defineComponent({
|
||||
export const SbButton = defineComponent({
|
||||
name: 'sb-button',
|
||||
|
||||
inheritAttrs: false,
|
|
@ -10,7 +10,7 @@ interface ModalProps {
|
|||
eventClose: () => void;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
export const SbModal = defineComponent({
|
||||
name: 'sb-modal',
|
||||
|
||||
props: {
|
|
@ -11,18 +11,13 @@ import {
|
|||
Block,
|
||||
BlockDefinition,
|
||||
BlockLibraryDefinition,
|
||||
} from '/@/blocks';
|
||||
import { Mode, SbMode } from '/@/mode';
|
||||
import { BlockLibrary } from '/@/use-dynamic-blocks';
|
||||
import { EditorDimensions, useResizeObserver } from '/@/use-resize-observer';
|
||||
import { ActiveBlock } from '/@/use-activation';
|
||||
} from '../blocks';
|
||||
import { Mode, SbMode } from '../mode';
|
||||
import { BlockLibrary } from '../use-dynamic-blocks';
|
||||
import { EditorDimensions, useResizeObserver } from '../use-resize-observer';
|
||||
import { ActiveBlock } from '../use-activation';
|
||||
|
||||
import SbBlock from '/@internal/Block';
|
||||
|
||||
import SbLayout from '/@user/Layout/index';
|
||||
import SbParagraph from '/@user/Paragraph/index';
|
||||
import SbImage from '/@user/Image/index';
|
||||
import SbHeading from '/@user/Heading/index';
|
||||
import SbBlock from './Block';
|
||||
|
||||
import './Schlechtenburg.scss';
|
||||
|
||||
|
@ -33,7 +28,7 @@ export interface SchlechtenburgProps {
|
|||
mode: SbMode;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
export const Schlechtenburg = defineComponent({
|
||||
name: 'schlechtenburg-main',
|
||||
|
||||
model,
|
||||
|
@ -62,10 +57,6 @@ export default defineComponent({
|
|||
provide(ActiveBlock, activeBlock);
|
||||
|
||||
const blockLibrary: BlockLibraryDefinition = shallowReactive({
|
||||
'sb-layout': SbLayout,
|
||||
'sb-image': SbImage,
|
||||
'sb-paragraph': SbParagraph,
|
||||
'sb-heading': SbHeading,
|
||||
...props.customBlocks.reduce(
|
||||
(blocks: {[name: string]: Block<any>}, block: Block<any>) => ({ ...blocks, [block.name]: block }),
|
||||
{},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import './Select.scss';
|
||||
|
||||
export default defineComponent({
|
||||
export const SbSelect = defineComponent({
|
||||
name: 'sb-select',
|
||||
|
||||
inheritAttrs: false,
|
|
@ -4,11 +4,11 @@ import {
|
|||
watch,
|
||||
reactive,
|
||||
} from 'vue';
|
||||
import { useBlockSizing } from '/@/use-resize-observer';
|
||||
import { useBlockSizing } from '../use-resize-observer';
|
||||
|
||||
import './Toolbar.scss';
|
||||
|
||||
export default defineComponent({
|
||||
export const SbToolbar = defineComponent({
|
||||
name: 'sb-toolbar',
|
||||
|
||||
setup(_, context) {
|
14
packages/core/lib/index.ts
Normal file
14
packages/core/lib/index.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
export * from './mode';
|
||||
export * from './blocks';
|
||||
|
||||
export * from './use-activation';
|
||||
export * from './use-dynamic-blocks';
|
||||
export * from './use-resize-observer';
|
||||
|
||||
export * from './directives/activation-cover.js';
|
||||
|
||||
export * from './components/Schlechtenburg';
|
||||
export * from './components/Block';
|
||||
export * from './components/BlockPicker';
|
||||
export * from './components/BlockOrdering';
|
||||
export * from './components/BlockPlaceholder';
|
|
@ -3,8 +3,8 @@ import {
|
|||
inject,
|
||||
reactive,
|
||||
} from 'vue';
|
||||
import { BlockLibraryDefinition } from '/@/blocks';
|
||||
import { Mode, SbMode } from '/@/mode';
|
||||
import { BlockLibraryDefinition } from './blocks';
|
||||
import { Mode, SbMode } from './mode';
|
||||
|
||||
export const BlockLibrary = Symbol('Schlechtenburg block library');
|
||||
export function useDynamicBlocks() {
|
||||
|
|
9950
packages/core/package-lock.json
generated
9950
packages/core/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,8 +4,8 @@
|
|||
"description": "> TODO: description",
|
||||
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||
"homepage": "",
|
||||
"license": "GPLv3",
|
||||
"main": "lib/core.js",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
|
@ -20,21 +20,11 @@
|
|||
"type": "git",
|
||||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vuedx-typecheck . && vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.0.4"
|
||||
"vue": "^3.0.4",
|
||||
"lodash-es": "^4.17.20"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/compiler-sfc": "^3.0.4",
|
||||
"@vuedx/typecheck": "^0.3.1-insiders-1606311019.0",
|
||||
"@vuedx/typescript-plugin-vue": "^0.3.1-insiders-1606311019.0",
|
||||
"lerna": "^3.22.1",
|
||||
"lodash-es": "^4.17.20",
|
||||
"sass": "^1.30.0",
|
||||
"typescript": "^4.1.2",
|
||||
"vite": "^1.0.0-rc.13"
|
||||
"peerDependencies": {
|
||||
"vue": "3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname);
|
||||
const SRC_DIR = path.resolve(ROOT_DIR, 'lib');
|
||||
|
||||
module.exports = {
|
||||
alias: {
|
||||
'/@/': SRC_DIR,
|
||||
'/@components/': path.join(SRC_DIR, 'components'),
|
||||
'/@internal/': path.join(SRC_DIR, 'components/internal'),
|
||||
'/@user/': path.join(SRC_DIR, 'components/user'),
|
||||
},
|
||||
};
|
11
packages/heading/README.md
Normal file
11
packages/heading/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# `@schlechtenburg/heading`
|
||||
|
||||
> TODO: description
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
const heading = require('@schlechtenburg/heading');
|
||||
|
||||
// TODO: DEMONSTRATE API
|
||||
```
|
7
packages/heading/__tests__/heading.test.js
Normal file
7
packages/heading/__tests__/heading.test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const heading = require('..');
|
||||
|
||||
describe('@schlechtenburg/heading', () => {
|
||||
it('needs tests');
|
||||
});
|
23
packages/heading/package-lock.json
generated
Normal file
23
packages/heading/package-lock.json
generated
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "@schlechtenburg/heading",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
},
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
32
packages/heading/package.json
Normal file
32
packages/heading/package.json
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@schlechtenburg/heading",
|
||||
"version": "0.0.0",
|
||||
"description": "> TODO: description",
|
||||
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||
"homepage": "",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@schlechtenburg/core": "^0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3"
|
||||
}
|
||||
}
|
11
packages/image/README.md
Normal file
11
packages/image/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# `@schlechtenburg/image`
|
||||
|
||||
> TODO: description
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
const image = require('@schlechtenburg/image');
|
||||
|
||||
// TODO: DEMONSTRATE API
|
||||
```
|
7
packages/image/__tests__/image.test.js
Normal file
7
packages/image/__tests__/image.test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const image = require('..');
|
||||
|
||||
describe('@schlechtenburg/image', () => {
|
||||
it('needs tests');
|
||||
});
|
|
@ -2,9 +2,8 @@ import { defineComponent, PropType } from 'vue';
|
|||
import {
|
||||
model,
|
||||
blockProps,
|
||||
} from '/@/blocks';
|
||||
|
||||
import SbBlock from '/@internal/block';
|
||||
SbBlock,
|
||||
} from '@schlechtenburg/core';
|
||||
|
||||
import {
|
||||
getDefaultData,
|
|
@ -9,11 +9,10 @@ import {
|
|||
import {
|
||||
model,
|
||||
blockProps,
|
||||
} from '/@/blocks';
|
||||
|
||||
import SbToolbar from '/@internal/Toolbar';
|
||||
import SbButton from '/@internal/Button';
|
||||
import SbBlock from '/@internal/Block';
|
||||
SbToolbar,
|
||||
SbButton,
|
||||
SbBlock
|
||||
} from '@schlechtenburg/core';
|
||||
|
||||
import {
|
||||
getDefaultData,
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
ParagraphData,
|
||||
getDefaultData as getDefaultParagraphData
|
||||
} from '/@user/Paragraph/util';
|
||||
} from '@schlechtenburg/paragraph';
|
||||
import { BlockData, BlockProps } from '/@/blocks';
|
||||
|
||||
export interface ImageData {
|
14
packages/image/package-lock.json
generated
Normal file
14
packages/image/package-lock.json
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "@schlechtenburg/image",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
33
packages/image/package.json
Normal file
33
packages/image/package.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "@schlechtenburg/image",
|
||||
"version": "0.0.0",
|
||||
"description": "> TODO: description",
|
||||
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||
"homepage": "",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@schlechtenburg/core": "^0.0.0",
|
||||
"@schlechtenburg/paragraph": "^0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3"
|
||||
}
|
||||
}
|
11
packages/layout/README.md
Normal file
11
packages/layout/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# `@schlechtenburg/layout`
|
||||
|
||||
> TODO: description
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
const layout = require('@schlechtenburg/layout');
|
||||
|
||||
// TODO: DEMONSTRATE API
|
||||
```
|
7
packages/layout/__tests__/layout.test.js
Normal file
7
packages/layout/__tests__/layout.test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const layout = require('..');
|
||||
|
||||
describe('@schlechtenburg/layout', () => {
|
||||
it('needs tests');
|
||||
});
|
|
@ -6,9 +6,8 @@ import {
|
|||
import {
|
||||
model,
|
||||
blockProps,
|
||||
} from '/@/blocks';
|
||||
|
||||
import SbBlock from '/@internal/Block';
|
||||
SbBlock,
|
||||
} from '@schlechtenburg/core';
|
||||
|
||||
import {
|
||||
LayoutData,
|
|
@ -9,14 +9,14 @@ import {
|
|||
model,
|
||||
Block,
|
||||
blockProps,
|
||||
} from '/@/blocks';
|
||||
import { useActivation } from '/@/use-activation';
|
||||
useActivation,
|
||||
|
||||
import SbBlock from '/@internal/Block';
|
||||
import SbButton from '/@internal/Button';
|
||||
import SbToolbar from '/@internal/Toolbar';
|
||||
import SbBlockPlaceholder from '/@internal/BlockPlaceholder';
|
||||
import SbBlockOrdering from '/@internal/BlockOrdering';
|
||||
SbBlock,
|
||||
SbButton,
|
||||
SbToolbar,
|
||||
SbBlockPlaceholder,
|
||||
SbBlockOrdering,
|
||||
} from '@schlechtenburg/core';
|
||||
|
||||
import {
|
||||
LayoutData,
|
23
packages/layout/package-lock.json
generated
Normal file
23
packages/layout/package-lock.json
generated
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "@schlechtenburg/layout",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
},
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
32
packages/layout/package.json
Normal file
32
packages/layout/package.json
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@schlechtenburg/layout",
|
||||
"version": "0.0.0",
|
||||
"description": "> TODO: description",
|
||||
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||
"homepage": "",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@schlechtenburg/core": "^0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3"
|
||||
}
|
||||
}
|
11
packages/paragraph/README.md
Normal file
11
packages/paragraph/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# `@schlechtenburg/paragraph`
|
||||
|
||||
> TODO: description
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
const paragraph = require('@schlechtenburg/paragraph');
|
||||
|
||||
// TODO: DEMONSTRATE API
|
||||
```
|
7
packages/paragraph/__tests__/paragraph.test.js
Normal file
7
packages/paragraph/__tests__/paragraph.test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const paragraph = require('..');
|
||||
|
||||
describe('@schlechtenburg/paragraph', () => {
|
||||
it('needs tests');
|
||||
});
|
|
@ -7,7 +7,7 @@ import {
|
|||
model,
|
||||
blockProps,
|
||||
BlockProps,
|
||||
} from '/@/blocks';
|
||||
} from '@schlechtenburg/core';
|
||||
|
||||
import {
|
||||
getDefaultData,
|
|
@ -13,11 +13,11 @@ import {
|
|||
blockProps,
|
||||
BlockProps,
|
||||
BlockData,
|
||||
} from '/@/blocks';
|
||||
import { useActivation } from '/@/use-activation';
|
||||
useActivation,
|
||||
|
||||
import SbToolbar from '/@internal/Toolbar';
|
||||
import SbSelect from '/@internal/Select';
|
||||
SbToolbar,
|
||||
SbSelect,
|
||||
} from '@schlechtenburg/core';
|
||||
|
||||
import {
|
||||
getDefaultData,
|
23
packages/paragraph/package-lock.json
generated
Normal file
23
packages/paragraph/package-lock.json
generated
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "@schlechtenburg/paragraph",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
},
|
||||
"dependencies": {
|
||||
"undefined": {
|
||||
"version": "file:../blocks",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undefined": "file:../blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
32
packages/paragraph/package.json
Normal file
32
packages/paragraph/package.json
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@schlechtenburg/paragraph",
|
||||
"version": "0.0.0",
|
||||
"description": "> TODO: description",
|
||||
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||
"homepage": "",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@schlechtenburg/core": "^0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1,4 +1,4 @@
|
|||
export default {
|
||||
{
|
||||
"name": "sb-layout",
|
||||
"blockId": "1590592097800",
|
||||
"data": {
|
|
@ -1,9 +1,11 @@
|
|||
import { defineComponent, reactive, ref } from 'vue';
|
||||
import Schlechtenburg from '/@components/Schlechtenburg';
|
||||
import { Block } from '/@/blocks';
|
||||
import { SbMode } from '/@/mode';
|
||||
|
||||
import initialData from './initial-data';
|
||||
import { Schlechtenburg, Block, SbMode } from '../packages/core/lib';
|
||||
|
||||
import SbParagraph from '../packages/paragraph/lib';
|
||||
import SbHeading from '../packages/heading/lib';
|
||||
import SbLayout from '../packages/layout/lib';
|
||||
import SbImage from '../packages/image/lib';
|
||||
|
||||
import './App.scss';
|
||||
|
||||
|
@ -12,7 +14,15 @@ export default defineComponent({
|
|||
|
||||
setup() {
|
||||
const activeTab = ref('edit');
|
||||
const block: Block<any> = reactive(initialData);
|
||||
const block: Block<any>|{} = reactive({});
|
||||
|
||||
fetch('/initial-data.json')
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
block.name = data.name;
|
||||
block.blockId = data.blockId;
|
||||
block.data = data.data;
|
||||
});
|
||||
|
||||
return () => (
|
||||
<div id="app">
|
||||
|
@ -35,6 +45,12 @@ export default defineComponent({
|
|||
eventUpdate={(newBlock: Block<any>) => {
|
||||
block.data = newBlock.data;
|
||||
}}
|
||||
customBlocks={[
|
||||
SbLayout,
|
||||
SbHeading,
|
||||
SbImage,
|
||||
SbParagraph,
|
||||
]}
|
||||
key="edit"
|
||||
mode="edit"
|
||||
/>;
|
|
@ -10,12 +10,7 @@
|
|||
"plugins": [ { "name": "@vuedx/typescript-plugin-vue" } ],
|
||||
"resolveJsonModule": true,
|
||||
// "noErrorTruncation": true,
|
||||
"paths": {
|
||||
"/@/*": [ "./lib/*" ],
|
||||
"/@components/*": [ "./lib/components/*" ],
|
||||
"/@internal/*": [ "./lib/components/internal/*" ],
|
||||
"/@user/*": [ "./lib/components/user/*" ]
|
||||
}
|
||||
"paths": {}
|
||||
},
|
||||
"include": [ "lib/**/*.ts", "lib/**/*.d.ts", "lib/**/*.tsx", "lib/**/*.vue" ]
|
||||
}
|
3
vite.config.js
Normal file
3
vite.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
alias: {},
|
||||
};
|
Loading…
Reference in a new issue