From df6b01480380bd69461a4dc9d97800a2d3a34352 Mon Sep 17 00:00:00 2001 From: IhorKaleniuk666 Date: Tue, 20 Jan 2026 13:39:41 +0200 Subject: [PATCH] fix build --- docs/api/assets.md | 2 ++ docs/api/datasources.md | 21 +++++++++++++++---- docs/api/device.md | 2 +- docs/api/editor.md | 18 ++++++++++++++++ docs/api/selector.md | 2 +- .../core/src/asset_manager/model/Assets.ts | 4 +++- 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/docs/api/assets.md b/docs/api/assets.md index 637d1fef3..37a235080 100644 --- a/docs/api/assets.md +++ b/docs/api/assets.md @@ -85,6 +85,8 @@ editor.on('asset:custom', ({ container, assets, ... }) => { ... }); editor.on('asset', ({ event, model, ... }) => { ... }); ``` +* AssetsEventCallback + ## Methods * [open][2] diff --git a/docs/api/datasources.md b/docs/api/datasources.md index 108caa2e3..ae853a24b 100644 --- a/docs/api/datasources.md +++ b/docs/api/datasources.md @@ -113,6 +113,18 @@ const ds = dsm.get('my_data_source_id'); Returns **[DataSource]** Data source. +## getAll + +Return all data sources. + +### Examples + +```javascript +const ds = dsm.getAll(); +``` + +Returns **[Array][8]<[DataSource]>** + ## getValue Get value from data sources by path. @@ -121,6 +133,7 @@ Get value from data sources by path. * `path` **[String][7]** Path to value. * `defValue` **any** Default value if the path is not found. +* `opts` **{context: Record<[string][7], any>?}?** Returns **any** const value = dsm.getValue('ds\_id.record\_id.propName', 'defaultValue'); @@ -139,7 +152,7 @@ Set value in data sources by path. dsm.setValue('ds_id.record_id.propName', 'new value'); ``` -Returns **[Boolean][8]** Returns true if the value was set successfully +Returns **[Boolean][9]** Returns true if the value was set successfully ## remove @@ -183,7 +196,7 @@ data record, and optional property path. Store data sources to a JSON object. -Returns **[Array][9]** Stored data sources. +Returns **[Array][8]** Stored data sources. ## load @@ -209,6 +222,6 @@ Returns **[Object][6]** Loaded data sources. [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array -[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array +[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean diff --git a/docs/api/device.md b/docs/api/device.md index dca116c9e..e1a77add2 100644 --- a/docs/api/device.md +++ b/docs/api/device.md @@ -2,7 +2,7 @@ ## Device - +**Extends ModelWithPatches** ### Properties diff --git a/docs/api/editor.md b/docs/api/editor.md index 35b30e20b..49466fa2e 100644 --- a/docs/api/editor.md +++ b/docs/api/editor.md @@ -30,6 +30,24 @@ editor.on('undo', () => { ... }); editor.on('redo', () => { ... }); ``` +* `patch:update` Patch finalized. + +```javascript +editor.on('patch:update', (patch) => { ... }); +``` + +* `patch:undo` Patch undo executed. + +```javascript +editor.on('patch:undo', (patch) => { ... }); +``` + +* `patch:redo` Patch redo executed. + +```javascript +editor.on('patch:redo', (patch) => { ... }); +``` + * `load` Editor is loaded. At this stage, the project is loaded in the editor and elements in the canvas are rendered. ```javascript diff --git a/docs/api/selector.md b/docs/api/selector.md index ac3df821a..3c61e9a58 100644 --- a/docs/api/selector.md +++ b/docs/api/selector.md @@ -2,7 +2,7 @@ ## Selector - +**Extends ModelWithPatches** ### Properties diff --git a/packages/core/src/asset_manager/model/Assets.ts b/packages/core/src/asset_manager/model/Assets.ts index 7af0a5649..9d369c371 100644 --- a/packages/core/src/asset_manager/model/Assets.ts +++ b/packages/core/src/asset_manager/model/Assets.ts @@ -4,7 +4,7 @@ import AssetImage from './AssetImage'; import AssetImageView from '../view/AssetImageView'; import TypeableCollection from '../../domain_abstract/model/TypeableCollection'; -export default class Assets extends CollectionWithPatches { +export class Assets extends CollectionWithPatches { constructor(models?: any, options?: any) { super(models, options); } @@ -39,3 +39,5 @@ Assets.prototype.types = [ }, }, ]; + +export default Assets;