script-box-mc 0.1.0 → 0.1.2

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/main.d.ts CHANGED
@@ -225,4 +225,5 @@ declare namespace ScoreboardUtils {
225
225
  function resetScore(target: ScoreboardIdentity | Entity$1 | string, objective: string): boolean;
226
226
  }
227
227
  //#endregion
228
- export { ActionFormBox, ItemStackUtils, MessageFormBox, ModalFormBox, ScoreboardUtils };
228
+ export { ActionFormBox, ItemStackUtils, MessageFormBox, ModalFormBox, ScoreboardUtils };
229
+ export {};
package/dist/main.js CHANGED
@@ -151,21 +151,22 @@ Object.defineProperties(ItemStack.prototype, { enchantment: {
151
151
  //#endregion
152
152
  //#region package/form/action.ts
153
153
  var ActionFormBox = class ActionFormBox {
154
- static {
155
- this.config = {
156
- back: {
157
- text: "Back",
158
- iconPath: "textures/ui/arrowLeft.png"
159
- },
160
- close: {
161
- enabled: true,
162
- text: "Close",
163
- iconPath: "textures/ui/redX1.png"
164
- }
165
- };
166
- }
154
+ form;
155
+ callbacks = [];
156
+ backCallback;
157
+ cancelledCallback;
158
+ static config = {
159
+ back: {
160
+ text: "Back",
161
+ iconPath: "textures/ui/arrowLeft.png"
162
+ },
163
+ close: {
164
+ enabled: true,
165
+ text: "Close",
166
+ iconPath: "textures/ui/redX1.png"
167
+ }
168
+ };
167
169
  constructor(title) {
168
- this.callbacks = [];
169
170
  this.form = new ActionFormData();
170
171
  if (title) this.form.title(title);
171
172
  }
@@ -223,8 +224,11 @@ var ActionFormBox = class ActionFormBox {
223
224
  //#endregion
224
225
  //#region package/form/message.ts
225
226
  var MessageFormBox = class {
227
+ form = new MessageFormData();
228
+ upperCallback;
229
+ lowerCallback;
230
+ cancelCallback;
226
231
  constructor(title) {
227
- this.form = new MessageFormData();
228
232
  if (title !== void 0) this.form.title(title);
229
233
  }
230
234
  title(titleText) {
@@ -266,10 +270,9 @@ var MessageFormBox = class {
266
270
  //#endregion
267
271
  //#region package/form/modal.ts
268
272
  var ModalFormBox = class {
269
- constructor() {
270
- this.form = new ModalFormData();
271
- this.callbacks = [];
272
- }
273
+ form = new ModalFormData();
274
+ callbacks = [];
275
+ cancelCallback;
273
276
  cancel(callback) {
274
277
  this.cancelCallback = callback;
275
278
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "script-box-mc",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -13,13 +13,13 @@
13
13
  "prepublishOnly": "scriptup build --release && node .github/workflows/ensure-dts-export.js",
14
14
  "repository": "https://github.com/Unknown-Creators-Team/ScriptBoxMC",
15
15
  "dependencies": {
16
- "@minecraft/server": "2.6.0-beta.1.26.3-stable",
17
- "@minecraft/server-ui": "2.1.0-beta.1.26.3-stable"
16
+ "@minecraft/server": "2.7.0-beta.1.26.10-stable",
17
+ "@minecraft/server-ui": "2.1.0-beta.1.26.10-stable"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@bedrock-apis/env-types": "^1.0.0-beta.6",
21
- "mc-chalk": "^1.0.2",
22
21
  "@nano191225/scriptup": "^1.3.2",
22
+ "mc-chalk": "^1.0.2",
23
23
  "tsdown": "^0.21.2",
24
24
  "typescript": "^5.9.3"
25
25
  },