@media-quest/builder 0.0.10 → 0.0.12

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.
@@ -167,15 +167,26 @@ declare class BuilderMainText extends BuilderObject<"builder-main-text", Builder
167
167
  set audioFile(audioFile: AudioFile | false);
168
168
  }
169
169
 
170
- type SchemaPrefixValue = string & {
171
- __SCHEMA_PREFIX__: true;
172
- };
173
170
  type PagePrefixValue = string & {
174
171
  __PAGE_PREFIX__: true;
175
172
  };
176
- type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
177
- declare const VarID: {
178
- create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
173
+ declare class PagePrefix {
174
+ private _value;
175
+ static readonly MIN_LENGTH = 1;
176
+ private static randomLen;
177
+ static readonly MAX_LENGTH = 16;
178
+ static create: () => PagePrefix;
179
+ static fromString: (value: string) => PagePrefix | false;
180
+ static fromStringOrThrow: (value: string) => PagePrefixValue;
181
+ static castOrCreateRandom: (value: string) => PagePrefix;
182
+ static isValid: (prefix: string | 999) => prefix is PagePrefixValue;
183
+ get value(): PagePrefixValue;
184
+ set value(value: string);
185
+ private constructor();
186
+ }
187
+
188
+ type SchemaPrefixValue = string & {
189
+ __SCHEMA_PREFIX__: true;
179
190
  };
180
191
  declare class SchemaPrefix {
181
192
  private _value;
@@ -187,25 +198,17 @@ declare class SchemaPrefix {
187
198
  static fromString: (value: string) => SchemaPrefix | false;
188
199
  static castOrCreateRandom: (value: string) => SchemaPrefix;
189
200
  static isValid: (prefix: string | 999) => prefix is SchemaPrefixValue;
201
+ toJSON(): void;
190
202
  get value(): SchemaPrefixValue;
203
+ get isValid(): boolean;
191
204
  set value(value: string);
192
205
  private constructor();
193
206
  }
194
- declare class PagePrefix {
195
- private _value;
196
- static readonly MIN_LENGTH = 1;
197
- private static randomLen;
198
- static readonly MAX_LENGTH = 16;
199
- static fromValue: (value: PagePrefixValue) => PagePrefix;
200
- static create: () => PagePrefix;
201
- static fromString: (value: string) => PagePrefix | false;
202
- static fromStringOrThrow: (value: string) => PagePrefixValue;
203
- static castOrCreateRandom: (value: string) => PagePrefix;
204
- static isValid: (prefix: string | 999) => prefix is PagePrefixValue;
205
- get value(): PagePrefixValue;
206
- set value(value: string);
207
- private constructor();
208
- }
207
+
208
+ type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
209
+ declare const VarID: {
210
+ create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
211
+ };
209
212
 
210
213
  declare const BuilderVariableType: {
211
214
  readonly numericWithOptions: true;
@@ -567,7 +570,7 @@ interface BuilderRuleDto {
567
570
  readonly name: string;
568
571
  readonly conditions: ReadonlyArray<BuilderConditionDto | BuilderConditionGroupDto>;
569
572
  readonly excludeTags: ReadonlyArray<string>;
570
- readonly excludePages: ReadonlyArray<string>;
573
+ readonly excludePages: ReadonlyArray<PageID>;
571
574
  readonly jumpToPage: string | false;
572
575
  }
573
576
  declare class BuilderRule extends BuilderObject<"builder-rule", BuilderRuleDto> {
@@ -602,7 +605,7 @@ declare class PageActionManager {
602
605
  private readonly _initialSelection;
603
606
  readonly selectItems: ReadonlyArray<ExcludeByPageIdSelectItem>;
604
607
  constructor(validOptions: RuleInput["_pageIdActions"], initialSelection: ReadonlyArray<string>);
605
- getCurrentSelection(): ReadonlyArray<string>;
608
+ getCurrentSelection(): ReadonlyArray<PageID>;
606
609
  getEngineAction(): ReadonlyArray<ExcludeByPageAction>;
607
610
  }
608
611
 
@@ -636,7 +639,7 @@ interface SchemaBuildOutput {
636
639
  declare class BuilderSchema {
637
640
  readonly id: SchemaID;
638
641
  name: string;
639
- private readonly _prefix;
642
+ readonly prefix: SchemaPrefix;
640
643
  baseHeight: number;
641
644
  baseWidth: number;
642
645
  backgroundColor: string;
@@ -644,7 +647,6 @@ declare class BuilderSchema {
644
647
  mainImage: ImageFile | false;
645
648
  private _rules;
646
649
  get rules(): ReadonlyArray<BuilderRule>;
647
- get prefix(): SchemaPrefixValue;
648
650
  private readonly _tagCollection;
649
651
  get tags(): ReadonlyArray<BuilderTag>;
650
652
  static create(id: SchemaID, name: string, prefix: SchemaPrefixValue): BuilderSchema;
@@ -167,15 +167,26 @@ declare class BuilderMainText extends BuilderObject<"builder-main-text", Builder
167
167
  set audioFile(audioFile: AudioFile | false);
168
168
  }
169
169
 
170
- type SchemaPrefixValue = string & {
171
- __SCHEMA_PREFIX__: true;
172
- };
173
170
  type PagePrefixValue = string & {
174
171
  __PAGE_PREFIX__: true;
175
172
  };
176
- type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
177
- declare const VarID: {
178
- create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
173
+ declare class PagePrefix {
174
+ private _value;
175
+ static readonly MIN_LENGTH = 1;
176
+ private static randomLen;
177
+ static readonly MAX_LENGTH = 16;
178
+ static create: () => PagePrefix;
179
+ static fromString: (value: string) => PagePrefix | false;
180
+ static fromStringOrThrow: (value: string) => PagePrefixValue;
181
+ static castOrCreateRandom: (value: string) => PagePrefix;
182
+ static isValid: (prefix: string | 999) => prefix is PagePrefixValue;
183
+ get value(): PagePrefixValue;
184
+ set value(value: string);
185
+ private constructor();
186
+ }
187
+
188
+ type SchemaPrefixValue = string & {
189
+ __SCHEMA_PREFIX__: true;
179
190
  };
180
191
  declare class SchemaPrefix {
181
192
  private _value;
@@ -187,25 +198,17 @@ declare class SchemaPrefix {
187
198
  static fromString: (value: string) => SchemaPrefix | false;
188
199
  static castOrCreateRandom: (value: string) => SchemaPrefix;
189
200
  static isValid: (prefix: string | 999) => prefix is SchemaPrefixValue;
201
+ toJSON(): void;
190
202
  get value(): SchemaPrefixValue;
203
+ get isValid(): boolean;
191
204
  set value(value: string);
192
205
  private constructor();
193
206
  }
194
- declare class PagePrefix {
195
- private _value;
196
- static readonly MIN_LENGTH = 1;
197
- private static randomLen;
198
- static readonly MAX_LENGTH = 16;
199
- static fromValue: (value: PagePrefixValue) => PagePrefix;
200
- static create: () => PagePrefix;
201
- static fromString: (value: string) => PagePrefix | false;
202
- static fromStringOrThrow: (value: string) => PagePrefixValue;
203
- static castOrCreateRandom: (value: string) => PagePrefix;
204
- static isValid: (prefix: string | 999) => prefix is PagePrefixValue;
205
- get value(): PagePrefixValue;
206
- set value(value: string);
207
- private constructor();
208
- }
207
+
208
+ type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
209
+ declare const VarID: {
210
+ create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
211
+ };
209
212
 
210
213
  declare const BuilderVariableType: {
211
214
  readonly numericWithOptions: true;
@@ -567,7 +570,7 @@ interface BuilderRuleDto {
567
570
  readonly name: string;
568
571
  readonly conditions: ReadonlyArray<BuilderConditionDto | BuilderConditionGroupDto>;
569
572
  readonly excludeTags: ReadonlyArray<string>;
570
- readonly excludePages: ReadonlyArray<string>;
573
+ readonly excludePages: ReadonlyArray<PageID>;
571
574
  readonly jumpToPage: string | false;
572
575
  }
573
576
  declare class BuilderRule extends BuilderObject<"builder-rule", BuilderRuleDto> {
@@ -602,7 +605,7 @@ declare class PageActionManager {
602
605
  private readonly _initialSelection;
603
606
  readonly selectItems: ReadonlyArray<ExcludeByPageIdSelectItem>;
604
607
  constructor(validOptions: RuleInput["_pageIdActions"], initialSelection: ReadonlyArray<string>);
605
- getCurrentSelection(): ReadonlyArray<string>;
608
+ getCurrentSelection(): ReadonlyArray<PageID>;
606
609
  getEngineAction(): ReadonlyArray<ExcludeByPageAction>;
607
610
  }
608
611
 
@@ -636,7 +639,7 @@ interface SchemaBuildOutput {
636
639
  declare class BuilderSchema {
637
640
  readonly id: SchemaID;
638
641
  name: string;
639
- private readonly _prefix;
642
+ readonly prefix: SchemaPrefix;
640
643
  baseHeight: number;
641
644
  baseWidth: number;
642
645
  backgroundColor: string;
@@ -644,7 +647,6 @@ declare class BuilderSchema {
644
647
  mainImage: ImageFile | false;
645
648
  private _rules;
646
649
  get rules(): ReadonlyArray<BuilderRule>;
647
- get prefix(): SchemaPrefixValue;
648
650
  private readonly _tagCollection;
649
651
  get tags(): ReadonlyArray<BuilderTag>;
650
652
  static create(id: SchemaID, name: string, prefix: SchemaPrefixValue): BuilderSchema;