Skip to content

Commit

Permalink
feat: renamed method connectBlocksFrom to loadFileUploaderFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
egordidenko committed Aug 1, 2024
1 parent 3039eb3 commit d083cb7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { registerFileUploader } from './registerFileUploader.js';
export const UC_WINDOW_KEY = 'UC';

/**
* @param {String} url Blocks pack url
* @param {String} url File Uploader pack url
* @param {Boolean} [register] Register connected package, if it not registered yet
* @returns {Promise<import('../index.js')>}
*/
export async function connectBlocksFrom(url, register = false) {
export async function loadFileUploaderFrom(url, register = false) {
return new Promise((resolve, reject) => {
if (typeof document !== 'object') {
resolve(null);
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export { CloudImageEditor } from './solutions/cloud-image-editor/CloudImageEdito
// Utils:
export { registerFileUploader } from './abstract/registerFileUploader.js';
export { defineLocale } from './abstract/localeRegistry.js';
export { connectBlocksFrom } from './abstract/connectBlocksFrom.js';
export { loadFileUploaderFrom } from './abstract/loadFileUploaderFrom.js';
export { toKebabCase } from './utils/toKebabCase.js';

export * from './env.js';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"browser": "./index.js",
"default": "./index.js"
},
"./abstract/connectBlocksFrom.js": "./abstract/connectBlocksFrom.js",
"./abstract/loadFileUploaderFrom.js": "./abstract/loadFileUploaderFrom.js",
"./env": "./env.js",
"./web/*": "./web/*",
"./types/*": "./types/*",
Expand Down
2 changes: 1 addition & 1 deletion types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UC_WINDOW_KEY } from '../abstract/connectBlocksFrom.js';
import { UC_WINDOW_KEY } from '../abstract/loadFileUploaderFrom.js';
import * as blocks from '../index.js';

declare global {
Expand Down

0 comments on commit d083cb7

Please sign in to comment.