x-block-lib 0.4.1 → 0.4.3

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/index.js CHANGED
@@ -270,8 +270,11 @@ const ht = {
270
270
  if (o && ft(o.type, e.oldInputName))
271
271
  try {
272
272
  f.disable();
273
- const n = (t = o.getInput(e.oldInputName)) == null ? void 0 : t.connection, i = Ae(this.workspace, this.key, this.name);
274
- n.connect(i.outputConnection);
273
+ const n = (t = o.getInput(e.oldInputName)) == null ? void 0 : t.connection;
274
+ if (n) {
275
+ const i = Ae(this.workspace, this.key, this.name);
276
+ n.connect(i.outputConnection);
277
+ }
275
278
  } finally {
276
279
  f.enable();
277
280
  }
@@ -3259,7 +3262,7 @@ Ce.setPrompt(async (e, o, t) => {
3259
3262
  title: "",
3260
3263
  value: o
3261
3264
  });
3262
- t(n);
3265
+ t(String(n));
3263
3266
  });
3264
3267
  async function Oe(e) {
3265
3268
  const o = await import(
@@ -3502,7 +3505,6 @@ class Ne extends ie {
3502
3505
  * rendered. Colour fields are statically sized, and only need to be
3503
3506
  * rendered at initialization.
3504
3507
  */
3505
- // eslint-disable-next-line @typescript-eslint/naming-convention
3506
3508
  C(this, "isDirty_", !1);
3507
3509
  /**
3508
3510
  * An array of colour strings for the palette.
@@ -4077,7 +4079,6 @@ class Ne extends ie {
4077
4079
  C(this, "columns", 14);
4078
4080
  t !== ie.SKIP_SETUP && (i && this.configure_(i), this.setValue(t), n && this.setValidator(n));
4079
4081
  }
4080
- // eslint-disable-next-line @typescript-eslint/naming-convention
4081
4082
  configure_(t) {
4082
4083
  super.configure_(t), t.colourOptions && (this.colours = t.colourOptions), t.colourTitles && (this.titles = t.colourTitles), t.columns && (this.columns = t.columns);
4083
4084
  }
@@ -4115,21 +4116,18 @@ class Ne extends ie {
4115
4116
  var t;
4116
4117
  return (t = this.getConstants()) != null && t.FIELD_COLOUR_FULL_BLOCK && (this.render_(), this.isDirty_ = !1), super.getSize();
4117
4118
  }
4118
- // eslint-disable-next-line @typescript-eslint/naming-convention
4119
4119
  render_() {
4120
4120
  super.render_();
4121
4121
  const t = this.getSourceBlock();
4122
4122
  if (!t) throw new F();
4123
4123
  t.applyColour();
4124
4124
  }
4125
- // eslint-disable-next-line @typescript-eslint/naming-convention
4126
4125
  updateSize_(t) {
4127
4126
  const n = this.getConstants();
4128
4127
  if (!n) return;
4129
4128
  let i, a;
4130
4129
  this.isFullBlockField() ? (i = (t ?? 0) * 2, a = n.FIELD_TEXT_HEIGHT) : (i = n.FIELD_COLOUR_DEFAULT_WIDTH, a = n.FIELD_COLOUR_DEFAULT_HEIGHT), this.size_.height = a, this.size_.width = i, this.positionBorderRect_();
4131
4130
  }
4132
- // eslint-disable-next-line @typescript-eslint/naming-convention
4133
4131
  doClassValidation_(t) {
4134
4132
  return typeof t != "string" ? null : u.colour.parse(t);
4135
4133
  }
@@ -4143,7 +4141,6 @@ class Ne extends ie {
4143
4141
  setColumns(t) {
4144
4142
  return this.columns = t, this;
4145
4143
  }
4146
- // eslint-disable-next-line @typescript-eslint/naming-convention
4147
4144
  showEditor_() {
4148
4145
  if (this.dropdownCreate(), !this.picker)
4149
4146
  throw Error("Picker not found");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.4.1",
4
+ "version": "0.4.3",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -12,45 +12,45 @@
12
12
  "dev": "vite",
13
13
  "build": "vue-tsc && vite build",
14
14
  "preview": "vite preview",
15
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
15
+ "lint": "eslint --fix --ignore-pattern dist/ --ignore-pattern public/ .",
16
16
  "format": "prettier --write .",
17
17
  "lint-staged": "lint-staged",
18
18
  "prepare": "husky"
19
19
  },
20
20
  "lint-staged": {
21
- "*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --fix",
21
+ "*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --fix --ignore-pattern dist/ --ignore-pattern public/ .",
22
22
  "*": "prettier --write ."
23
23
  },
24
24
  "peerDependencies": {
25
- "axios": "^1.7.2",
25
+ "axios": "^1.7.7",
26
26
  "blockly": "^11.1.1",
27
- "vue": "^3.5.5",
28
- "vuetify": "^3.7.1",
29
- "x-essential-lib": "^0.7.1",
30
- "x-runtime-lib": "^0.4.1"
27
+ "vue": "^3.5.12",
28
+ "vuetify": "^3.7.2",
29
+ "x-essential-lib": "^0.7.3",
30
+ "x-runtime-lib": "^0.4.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@rushstack/eslint-patch": "^1.10.3",
33
+ "@eslint/js": "^10.0.0",
34
34
  "@types/lodash-es": "^4.17.12",
35
- "@types/node": "^20.14.10",
36
- "@vitejs/plugin-vue": "^5.0.5",
37
- "@vue/eslint-config-prettier": "^9.0.0",
38
- "@vue/eslint-config-typescript": "^13.0.0",
39
- "eslint": "^8.57.0",
40
- "eslint-plugin-vue": "^9.27.0",
41
- "husky": "^9.0.11",
42
- "lint-staged": "^15.2.7",
43
- "pinia": "^2.2.2",
44
- "pinia-plugin-persistedstate": "^3.2.1",
35
+ "@types/node": "^22.7.6",
36
+ "@vitejs/plugin-vue": "^5.1.4",
37
+ "eslint": "^9.12.0",
38
+ "eslint-config-prettier": "^9.1.0",
39
+ "eslint-plugin-prettier": "^5.2.1",
40
+ "eslint-plugin-vue": "^9.29.0",
41
+ "husky": "^9.1.6",
42
+ "lint-staged": "^15.2.10",
43
+ "pinia-plugin-persistedstate": "^4.1.1",
45
44
  "prettier": "3.3.3",
46
- "sass": "^1.77.7",
47
- "typescript": "^5.5.3",
48
- "vite": "^5.3.3",
49
- "vite-plugin-css-injected-by-js": "^3.5.1",
50
- "vite-plugin-vuetify": "^2.0.3",
51
- "vue-i18n": "^9.14.0",
52
- "vue-router": "4.4.3",
53
- "vue-tsc": "^2.0.26"
45
+ "sass": "^1.80.0",
46
+ "typescript": "^5.6.3",
47
+ "typescript-eslint": "^8.9.0",
48
+ "vite": "^5.4.9",
49
+ "vite-plugin-css-injected-by-js": "^3.5.2",
50
+ "vite-plugin-vuetify": "^2.0.4",
51
+ "vue-i18n": "^10.0.4",
52
+ "vue-router": "4.4.5",
53
+ "vue-tsc": "^2.1.6"
54
54
  },
55
55
  "dependencies": {
56
56
  "@mdi/js": "^7.4.47",
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- import * as Blockly from 'blockly/core';
2
- interface SpaceInfo {
3
- id: string;
4
- name: string;
5
- sort?: number;
6
- }
7
- export declare function getAllSpaceInfos(): SpaceInfo[];
8
- export declare function getSpaceInfo(id: string): SpaceInfo | null;
9
- interface DirInfo {
10
- id: string;
11
- name: string;
12
- }
13
- export declare function getAllDirInfos(spaceid: string): DirInfo[];
14
- export declare function getDirInfo(spaceid: string, id: string): DirInfo | undefined;
15
- interface AssetInfo {
16
- id: string;
17
- name: string;
18
- }
19
- export declare function getAllAssetInfos(spaceid: string, dirid: string): AssetInfo[];
20
- export declare function getAssetInfo(spaceid: string, id: string): AssetInfo | null;
21
- export declare function genSpaceOpts(): Blockly.MenuOption[];
22
- export declare function genDirOpts(spaceid: string): Blockly.MenuOption[];
23
- export declare function genAssetOpts(spaceid: string, dirid: string): Blockly.MenuOption[];
24
- export {};
@@ -1,17 +0,0 @@
1
- import * as Blockly from 'blockly/core';
2
- interface SpaceInfo {
3
- id: string;
4
- name: string;
5
- sort?: number;
6
- }
7
- export declare function getAllSpaceInfos(): SpaceInfo[];
8
- export declare function getSpaceInfo(id: string): SpaceInfo | null;
9
- export declare function genSpaceOpts(): Blockly.MenuOption[];
10
- interface FuncInfo {
11
- id: string;
12
- name: string;
13
- }
14
- export declare function getAllFuncInfos(spaceid: string): FuncInfo[];
15
- export declare function getFuncInfo(spaceid: string, id: string): FuncInfo | null;
16
- export declare function genFuncOpts(spaceid: string): Blockly.MenuOption[];
17
- export {};