@atscript/moost-ui-presets 0.1.132 → 0.1.133

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.d.mts CHANGED
@@ -102,12 +102,12 @@ declare class AsPresetEntry {
102
102
  "id": string;
103
103
  "type": "preset" | "userConf" | "appConf";
104
104
  "app": string;
105
- "tableKey"?: string;
105
+ "tableKey"?: string | null;
106
106
  "user": string;
107
- "userLabel"?: string;
108
- "public"?: boolean;
109
- "label"?: string;
110
- "publicLabel"?: string;
107
+ "userLabel"?: string | null;
108
+ "public"?: boolean | null;
109
+ "label"?: string | null;
110
+ "publicLabel"?: string | null;
111
111
  "aspects"?: never;
112
112
  "data": string;
113
113
  "createdAt": number;
@@ -117,12 +117,12 @@ declare class AsPresetEntry {
117
117
  "id": string;
118
118
  "type": "preset" | "userConf" | "appConf";
119
119
  "app": string;
120
- "tableKey"?: string;
120
+ "tableKey"?: string | null;
121
121
  "user": string;
122
- "userLabel"?: string;
123
- "public"?: boolean;
124
- "label"?: string;
125
- "publicLabel"?: string;
122
+ "userLabel"?: string | null;
123
+ "public"?: boolean | null;
124
+ "label"?: string | null;
125
+ "publicLabel"?: string | null;
126
126
  "aspects"?: never;
127
127
  "data": string;
128
128
  "createdAt": number;
@@ -145,7 +145,7 @@ declare abstract class AsPresetsController<T extends TAtscriptAnnotatedType = ty
145
145
  protected getUserLabel(_user: string): Promise<string | undefined>;
146
146
  private get hooks();
147
147
  private get presetTable();
148
- capabilities(query: AsCapabilitiesQuery): Promise<PresetCapabilities$1>;
148
+ getCapabilities(query: AsCapabilitiesQuery): Promise<PresetCapabilities$1>;
149
149
  protected transformFilter(filter: FilterExpr): Promise<FilterExpr>;
150
150
  protected onWrite(action: WriteAction, data: unknown): Promise<unknown>;
151
151
  protected onRemove(id: unknown): Promise<unknown>;
package/dist/index.mjs CHANGED
@@ -196,7 +196,7 @@ async function processCreateRow(ctx, row) {
196
196
  assertNotReservedId(next.id);
197
197
  if (typeof next.id !== "string" || next.id.length === 0) next.id = globalThis.crypto.randomUUID();
198
198
  next.label = readPresetLabel(next.data);
199
- next.publicLabel = next.public === true ? next.label : void 0;
199
+ next.publicLabel = next.public === true ? next.label : null;
200
200
  const capCheck = assertWithinCap(ctx, next.app, next.tableKey);
201
201
  const publicCheck = next.public === true ? gatePublicPreset(ctx, next.app, next.tableKey, null, {
202
202
  public: true,
@@ -268,7 +268,7 @@ async function processUpdateRow(ctx, row) {
268
268
  const prevLabel = existing.label ?? readPresetLabel(existing.data);
269
269
  const nextLabel = readPresetLabel(mergedData);
270
270
  next.label = nextLabel;
271
- next.publicLabel = willBePublic ? nextLabel : void 0;
271
+ next.publicLabel = willBePublic ? nextLabel : null;
272
272
  const [, userLabel] = await Promise.all([gatePublicPreset(ctx, app, tableKey, {
273
273
  public: wasPublic,
274
274
  label: prevLabel
@@ -412,7 +412,7 @@ let AsPresetsController = class AsPresetsController extends AsDbController {
412
412
  get presetTable() {
413
413
  return this.table;
414
414
  }
415
- async capabilities(query) {
415
+ async getCapabilities(query) {
416
416
  const user = await this.getCurrentUser();
417
417
  return buildCapabilities(query.app, query.tableKey, user, this.hooks);
418
418
  }
@@ -434,7 +434,7 @@ __decorate([
434
434
  __decorateMetadata("design:type", Function),
435
435
  __decorateMetadata("design:paramtypes", [typeof (_ref = typeof AsCapabilitiesQuery !== "undefined" && AsCapabilitiesQuery) === "function" ? _ref : Object]),
436
436
  __decorateMetadata("design:returntype", Promise)
437
- ], AsPresetsController.prototype, "capabilities", null);
437
+ ], AsPresetsController.prototype, "getCapabilities", null);
438
438
  AsPresetsController = __decorate([Inherit()], AsPresetsController);
439
439
  //#endregion
440
440
  export { APP_CONF_PREFIX, AsPresetEntry, AsPresetsController, PRESET_ASPECTS, RESERVED_ID_PREFIXES, SYSTEM_PRESET_PREFIX, USER_CONF_PREFIX, appConfId, userConfId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/moost-ui-presets",
3
- "version": "0.1.132",
3
+ "version": "0.1.133",
4
4
  "description": "Moost controller and atscript schema for table-preset persistence — server-side persistence layer for atscript-ui table presets",
5
5
  "keywords": [
6
6
  "atscript",
@@ -41,29 +41,29 @@
41
41
  "access": "public"
42
42
  },
43
43
  "devDependencies": {
44
- "@atscript/core": "^0.1.89",
45
- "@atscript/db": "^0.1.127",
46
- "@atscript/db-sqlite": "^0.1.127",
47
- "@atscript/moost-db": "^0.1.127",
48
- "@atscript/typescript": "^0.1.89",
49
- "@moostjs/event-http": "^0.6.35",
44
+ "@atscript/core": "^0.1.93",
45
+ "@atscript/db": "^0.1.129",
46
+ "@atscript/db-sqlite": "^0.1.129",
47
+ "@atscript/moost-db": "^0.1.129",
48
+ "@atscript/typescript": "^0.1.93",
49
+ "@moostjs/event-http": "^0.6.37",
50
50
  "@swc/core": "^1.15.40",
51
- "@uniqu/core": "^0.1.7",
52
- "@wooksjs/event-http": "^0.7.22",
53
- "moost": "^0.6.35",
54
- "unplugin-atscript": "^0.1.89",
51
+ "@uniqu/core": "^0.1.8",
52
+ "@wooksjs/event-http": "^0.7.23",
53
+ "moost": "^0.6.37",
54
+ "unplugin-atscript": "^0.1.93",
55
55
  "unplugin-swc": "^1.5.9",
56
56
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
57
- "@atscript/ui-table": "0.1.132"
57
+ "@atscript/ui-table": "0.1.133"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atscript/core": "^0.1.89",
61
- "@atscript/db": "^0.1.127",
62
- "@atscript/moost-db": "^0.1.127",
63
- "@atscript/typescript": "^0.1.89",
64
- "@moostjs/event-http": "^0.6.35",
65
- "moost": "^0.6.35",
66
- "@atscript/ui-table": "^0.1.132"
60
+ "@atscript/core": "^0.1.93",
61
+ "@atscript/db": "^0.1.129",
62
+ "@atscript/moost-db": "^0.1.129",
63
+ "@atscript/typescript": "^0.1.93",
64
+ "@moostjs/event-http": "^0.6.37",
65
+ "moost": "^0.6.37",
66
+ "@atscript/ui-table": "^0.1.133"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "vp pack",