@easy-editor/core 0.0.15 → 0.0.16
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/dist/cjs/index.development.js +4 -1
- package/dist/cjs/index.development.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.production.js +4 -1
- package/dist/cjs/index.production.js.map +1 -1
- package/dist/esm/index.development.js +4 -2
- package/dist/esm/index.development.js.map +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.production.js +4 -2
- package/dist/esm/index.production.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/dist/types/data-source.d.ts +20 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/schema.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -11143,9 +11143,11 @@ const createEasyEditor = config => {
|
|
|
11143
11143
|
return new Editor(config);
|
|
11144
11144
|
};
|
|
11145
11145
|
|
|
11146
|
-
const DEV = '
|
|
11146
|
+
const DEV = 'false';
|
|
11147
11147
|
configure({
|
|
11148
11148
|
enforceActions: 'always'
|
|
11149
11149
|
});
|
|
11150
|
+
const version = '0.0.16';
|
|
11151
|
+
console.log(`%c EasyEditor %c v${version} `, 'padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;', 'padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;');
|
|
11150
11152
|
|
|
11151
|
-
export { AutoFit, COMPONENT_META_EVENT, ComponentMeta, ComponentMetaManager, DESIGNER_EVENT, DETECTING_EVENT, DEV, DOCUMENT_EVENT, DRAGON_EVENT, Designer, Detecting, Document, DragObject, DragObjectType, Dragon, DropLocation, EDITOR_EVENT, Editor, EventBus, GLOBAL_EVENT, HISTORY_EVENT, History, Hotkey, LocationDetailType, NODE_CHILDREN_EVENT, NODE_EVENT, Node$1 as Node, NodeChildren, OffsetObserver, PROJECT_EVENT, PluginContext, PluginManager, PluginRuntime, PositionNO, Project, Prop, PropValueChangedType, Props, SELECTION_EVENT, Selection, Session, SetterManager, SettingField, SettingPropEntry, SettingTopEntry, SettingsManager, Simulator, TRANSFORM_STAGE, UNSET, Viewport, clipboard, cloneDeep, comparePosition, contains, createEasyEditor, createEventBus, createLogger, createOffsetObserver, ensureNode, generateSessionId, getClosestClickableNode, getClosestNode, getConvertedExtraKey, getOriginalExtraKey, getSourceSensor, getWindow, getZLevelTop, insertChild, insertChildren, isComponentMeta, isDocument, isDocumentElem, isDragAnyObject, isDragEvent, isDragNodeDataObject, isDragNodeObject, isDynamicSetter, isElement, isExtraKey, isInvalidPoint, isJSExpression, isJSFunction, isLocateEvent, isLocationChildrenDetail, isLocationData, isLowCodeComponentType, isNode, isNodeSchema, isObject, isPlainObject, isProCodeComponentType, isProp, isPurgeable, isRegisterOptions, isSameAs, isSetterConfig, isSettingField, isShaken, isSimulator, isText, isValidArrayIndex, logger, makeEventsHandler, setShaken, splitPath, uniqueId };
|
|
11153
|
+
export { AutoFit, COMPONENT_META_EVENT, ComponentMeta, ComponentMetaManager, DESIGNER_EVENT, DETECTING_EVENT, DEV, DOCUMENT_EVENT, DRAGON_EVENT, Designer, Detecting, Document, DragObject, DragObjectType, Dragon, DropLocation, EDITOR_EVENT, Editor, EventBus, GLOBAL_EVENT, HISTORY_EVENT, History, Hotkey, LocationDetailType, NODE_CHILDREN_EVENT, NODE_EVENT, Node$1 as Node, NodeChildren, OffsetObserver, PROJECT_EVENT, PluginContext, PluginManager, PluginRuntime, PositionNO, Project, Prop, PropValueChangedType, Props, SELECTION_EVENT, Selection, Session, SetterManager, SettingField, SettingPropEntry, SettingTopEntry, SettingsManager, Simulator, TRANSFORM_STAGE, UNSET, Viewport, clipboard, cloneDeep, comparePosition, contains, createEasyEditor, createEventBus, createLogger, createOffsetObserver, ensureNode, generateSessionId, getClosestClickableNode, getClosestNode, getConvertedExtraKey, getOriginalExtraKey, getSourceSensor, getWindow, getZLevelTop, insertChild, insertChildren, isComponentMeta, isDocument, isDocumentElem, isDragAnyObject, isDragEvent, isDragNodeDataObject, isDragNodeObject, isDynamicSetter, isElement, isExtraKey, isInvalidPoint, isJSExpression, isJSFunction, isLocateEvent, isLocationChildrenDetail, isLocationData, isLowCodeComponentType, isNode, isNodeSchema, isObject, isPlainObject, isProCodeComponentType, isProp, isPurgeable, isRegisterOptions, isSameAs, isSetterConfig, isSettingField, isShaken, isSimulator, isText, isValidArrayIndex, logger, makeEventsHandler, setShaken, splitPath, uniqueId, version };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JSExpression, JSONObject } from '../document';
|
|
2
|
+
export interface DataSourceItem {
|
|
3
|
+
id: string;
|
|
4
|
+
isInit?: boolean | JSExpression;
|
|
5
|
+
type?: string;
|
|
6
|
+
options?: {
|
|
7
|
+
uri: string | JSExpression;
|
|
8
|
+
params?: JSONObject | JSExpression;
|
|
9
|
+
method?: string | JSExpression;
|
|
10
|
+
shouldFetch?: string;
|
|
11
|
+
willFetch?: string;
|
|
12
|
+
fit?: string;
|
|
13
|
+
didFetch?: string;
|
|
14
|
+
};
|
|
15
|
+
dataHandler?: JSExpression;
|
|
16
|
+
}
|
|
17
|
+
export interface DataSource {
|
|
18
|
+
list?: DataSourceItem[];
|
|
19
|
+
dataHandler?: JSExpression;
|
|
20
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/schema.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CompositeValue, JSExpression, JSFunction, JSONObject, PropsMap } from '../document';
|
|
2
|
+
import type { DataSource } from './data-source';
|
|
2
3
|
export interface ProjectSchema<T = RootSchema> {
|
|
3
4
|
id?: string;
|
|
4
5
|
version: string;
|
|
@@ -40,6 +41,10 @@ export interface RootSchema extends NodeSchema {
|
|
|
40
41
|
* 样式文件
|
|
41
42
|
*/
|
|
42
43
|
css?: string;
|
|
44
|
+
/**
|
|
45
|
+
* 异步数据源配置
|
|
46
|
+
*/
|
|
47
|
+
dataSource?: DataSource;
|
|
43
48
|
}
|
|
44
49
|
export interface NodeSchema {
|
|
45
50
|
id?: string;
|