@powerhousedao/codegen 0.7.0 → 0.8.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.
@@ -4,7 +4,7 @@ unless_exists: true
4
4
  ---
5
5
  <% if(!documentTypes.length){ %>import { Action, EditorProps } from 'document-model/document';<% } else { %>import { EditorProps } from 'document-model/document';<% } %>
6
6
  <% documentTypes.forEach(type => { _%>
7
- import { <%= documentTypesMap[type] %>State, <%= documentTypesMap[type] %>Action, <%= documentTypesMap[type] %>LocalState } from "../.<%= documentModelsDir %>/<%= h.changeCase.param(documentTypesMap[type]) %>";
7
+ import { <%= documentTypesMap[type] %>State, <%= documentTypesMap[type] %>Action, <%= documentTypesMap[type] %>LocalState, actions } from "../.<%= documentModelsDir %>/<%= h.changeCase.param(documentTypesMap[type]) %>";
8
8
  %><% }); _%>
9
9
 
10
10
  export type IProps = <% if(!documentTypes.length){ %>EditorProps<unknown, Action><% } else { %><% documentTypes.forEach((type, index) => { _%>EditorProps<<%= documentTypesMap[type] %>State, <%= documentTypesMap[type] %>Action, <%= documentTypesMap[type] %>LocalState%>%>><% if(index < documentTypes.length - 1){ %> | <% }%><% }); _%> <% } %>;
@@ -2,15 +2,20 @@
2
2
  to: "<%= rootDir %>/<%= h.changeCase.param(name) %>/index.ts"
3
3
  force: true
4
4
  ---
5
- import { type Editor as EditorModule<% if(!documentTypes.length){ %>, Action<% } %> } from 'document-model/document';
5
+ import { ExtendedEditor, EditorContextProps } from 'document-model-libs';
6
6
  import Editor from './editor';
7
7
  <% documentTypes.forEach(type => { _%>
8
8
  import { <%= documentTypesMap[type] %>State, <%= documentTypesMap[type] %>Action, <%= documentTypesMap[type] %>LocalState } from "../.<%= documentModelsDir %>/<%= h.changeCase.param(documentTypesMap[type]) %>";
9
9
  %><% }); _%>
10
10
 
11
- export const module: <% if(!documentTypes.length){ %>EditorModule<unknown, Action><% } else { %><% documentTypes.forEach((type, index) => { _%>EditorModule<<%= documentTypesMap[type] %>State, <%= documentTypesMap[type] %>Action, <%= documentTypesMap[type] %>LocalState%>%>> <% if(index < documentTypes.length - 1){ %>| <% }%><% }); _%> <% } %>= {
11
+ export const module: <% if(!documentTypes.length){ %>ExtendedEditor<unknown, Action, unknown, unknown><% } else { %><% documentTypes.forEach((type, index) => { _%>ExtendedEditor<<%= documentTypesMap[type] %>State, <%= documentTypesMap[type] %>Action, <%= documentTypesMap[type] %>LocalState, EditorContextProps%>%>> <% if(index < documentTypes.length - 1){ %>| <% }%><% }); _%> <% } %>= {
12
12
  Component: Editor,
13
13
  documentTypes: [<% if(!documentTypes.length){ %>'*'<% } else { %><% documentTypes.forEach(type => { _%>"<%= type %>", %><% }); _%> <% } %>],
14
+ config: {
15
+ id: 'editor-id',
16
+ disableExternalControls: true,
17
+ documentToolbarEnabled: true,
18
+ },
14
19
  };
15
20
 
16
21
  export default module;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/codegen",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "private": false,
6
6
  "main": "dist/index.js",