crankscript 0.16.0 → 0.16.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # crankscript
2
2
 
3
+ ## 0.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a10781b`](https://github.com/crankscript/crankscript/commit/a10781ba378686468d51dda68b65480b7af56934) Thanks [@alberteddu](https://github.com/alberteddu)! - fix bug where keyboard must be always imported
8
+
3
9
  ## 0.16.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,6 @@
1
1
  export declare class ImportMap {
2
2
  private imports;
3
+ constructor();
3
4
  toArray(): string[];
4
5
  map(callback: Parameters<ReturnType<typeof this.toArray>['map']>[0]): unknown[];
5
6
  add(importName: string): void;
@@ -27,6 +27,8 @@ let ImportMap = class ImportMap {
27
27
  }
28
28
  constructor(){
29
29
  this.imports = new Set();
30
+ // Needed for now: https://github.com/crankscript/crankscript/issues/67
31
+ this.add('keyboard');
30
32
  }
31
33
  };
32
34
  ImportMap.map = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/tstl-plugin/src/ImportMap/ImportMap.ts"],"sourcesContent":["export class ImportMap {\n private imports = new Set<string>();\n\n toArray() {\n return Array.from(this.imports);\n }\n\n map(callback: Parameters<ReturnType<typeof this.toArray>['map']>[0]) {\n return this.toArray().map(callback);\n }\n\n add(importName: string) {\n this.imports.add(importName);\n }\n\n processName(name: string) {\n for (const [key, value] of Object.entries(ImportMap.map)) {\n if (value.has(name)) {\n this.add(key);\n }\n }\n }\n\n private static map = {\n graphics: new Set(['graphics']),\n sprites: new Set(['sprite']),\n crank: new Set(['getCrankTicks']),\n object: new Set(['printTable']),\n 'utilities/where': new Set(['where']),\n easing: new Set(['easingFunctions']),\n nineSlice: new Set(['nineSlice']),\n qrcode: new Set(['generateQRCode']),\n animation: new Set(['animation']),\n animator: new Set(['animator']),\n keyboard: new Set(['keyboard']),\n math: new Set(['math']),\n string: new Set(['string']),\n timer: new Set(['timer']),\n frameTimer: new Set(['frameTimer']),\n ui: new Set(['ui']),\n };\n}\n"],"names":["ImportMap","toArray","Array","from","imports","map","callback","add","importName","processName","name","key","value","Object","entries","has","Set","graphics","sprites","crank","object","easing","nineSlice","qrcode","animation","animator","keyboard","math","string","timer","frameTimer","ui"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,IAAA,AAAMA,YAAN,MAAMA;IAGTC,UAAU;QACN,OAAOC,MAAMC,IAAI,CAAC,IAAI,CAACC,OAAO;IAClC;IAEAC,IAAIC,QAA+D,EAAE;QACjE,OAAO,IAAI,CAACL,OAAO,GAAGI,GAAG,CAACC;IAC9B;IAEAC,IAAIC,UAAkB,EAAE;QACpB,IAAI,CAACJ,OAAO,CAACG,GAAG,CAACC;IACrB;IAEAC,YAAYC,IAAY,EAAE;QACtB,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACd,UAAUK,GAAG,EAAG;YACtD,IAAIO,MAAMG,GAAG,CAACL,OAAO;gBACjB,IAAI,CAACH,GAAG,CAACI;YACb;QACJ;IACJ;;aApBQP,UAAU,IAAIY;;AAwC1B;AAzCahB,UAuBMK,MAAM;IACjBY,UAAU,IAAID,IAAI;QAAC;KAAW;IAC9BE,SAAS,IAAIF,IAAI;QAAC;KAAS;IAC3BG,OAAO,IAAIH,IAAI;QAAC;KAAgB;IAChCI,QAAQ,IAAIJ,IAAI;QAAC;KAAa;IAC9B,mBAAmB,IAAIA,IAAI;QAAC;KAAQ;IACpCK,QAAQ,IAAIL,IAAI;QAAC;KAAkB;IACnCM,WAAW,IAAIN,IAAI;QAAC;KAAY;IAChCO,QAAQ,IAAIP,IAAI;QAAC;KAAiB;IAClCQ,WAAW,IAAIR,IAAI;QAAC;KAAY;IAChCS,UAAU,IAAIT,IAAI;QAAC;KAAW;IAC9BU,UAAU,IAAIV,IAAI;QAAC;KAAW;IAC9BW,MAAM,IAAIX,IAAI;QAAC;KAAO;IACtBY,QAAQ,IAAIZ,IAAI;QAAC;KAAS;IAC1Ba,OAAO,IAAIb,IAAI;QAAC;KAAQ;IACxBc,YAAY,IAAId,IAAI;QAAC;KAAa;IAClCe,IAAI,IAAIf,IAAI;QAAC;KAAK;AACtB"}
1
+ {"version":3,"sources":["../../../../../libs/tstl-plugin/src/ImportMap/ImportMap.ts"],"sourcesContent":["export class ImportMap {\n private imports = new Set<string>();\n\n constructor() {\n // Needed for now: https://github.com/crankscript/crankscript/issues/67\n this.add('keyboard');\n }\n\n toArray() {\n return Array.from(this.imports);\n }\n\n map(callback: Parameters<ReturnType<typeof this.toArray>['map']>[0]) {\n return this.toArray().map(callback);\n }\n\n add(importName: string) {\n this.imports.add(importName);\n }\n\n processName(name: string) {\n for (const [key, value] of Object.entries(ImportMap.map)) {\n if (value.has(name)) {\n this.add(key);\n }\n }\n }\n\n private static map = {\n graphics: new Set(['graphics']),\n sprites: new Set(['sprite']),\n crank: new Set(['getCrankTicks']),\n object: new Set(['printTable']),\n 'utilities/where': new Set(['where']),\n easing: new Set(['easingFunctions']),\n nineSlice: new Set(['nineSlice']),\n qrcode: new Set(['generateQRCode']),\n animation: new Set(['animation']),\n animator: new Set(['animator']),\n keyboard: new Set(['keyboard']),\n math: new Set(['math']),\n string: new Set(['string']),\n timer: new Set(['timer']),\n frameTimer: new Set(['frameTimer']),\n ui: new Set(['ui']),\n };\n}\n"],"names":["ImportMap","toArray","Array","from","imports","map","callback","add","importName","processName","name","key","value","Object","entries","has","constructor","Set","graphics","sprites","crank","object","easing","nineSlice","qrcode","animation","animator","keyboard","math","string","timer","frameTimer","ui"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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