jaml-ui 7.0.0 → 8.0.0

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.
Files changed (45) hide show
  1. package/dist/components/DeckStakePicker.d.ts +1 -1
  2. package/dist/components/JamlCodeEditor.d.ts +1 -1
  3. package/dist/components/JamlyzerBulk.d.ts +2 -2
  4. package/dist/components/JamlyzerView.d.ts +1 -1
  5. package/dist/components/SeedCalculus.d.ts +1 -1
  6. package/dist/components/SeedLab.d.ts +7 -2
  7. package/dist/components/filterStory/FilterStory.d.ts +1 -1
  8. package/dist/components/jamlyzer/JamlyzerAnteDetails.d.ts +3 -3
  9. package/dist/components/jamlyzer/JamlyzerErraticDeck.d.ts +1 -1
  10. package/dist/components/jamlyzer/JamlyzerEvents.d.ts +1 -1
  11. package/dist/components/jamlyzer/JamlyzerItemCard.d.ts +1 -1
  12. package/dist/components/jamlyzer/JamlyzerPackSection.d.ts +1 -1
  13. package/dist/components/jamlyzer/JamlyzerPulls.d.ts +1 -1
  14. package/dist/index.js +4015 -3963
  15. package/dist/index.js.map +1 -1
  16. package/dist/motely.js +98 -92
  17. package/dist/motely.js.map +1 -1
  18. package/dist/ui/JimboApp.d.ts +1 -1
  19. package/dist/ui/JimboButton.d.ts +1 -1
  20. package/dist/ui/JimboCodeSurface.d.ts +1 -1
  21. package/dist/ui/JimboDivider.d.ts +1 -1
  22. package/dist/ui/JimboDock.d.ts +1 -1
  23. package/dist/ui/JimboErrorBlock.d.ts +1 -1
  24. package/dist/ui/JimboGrid.d.ts +1 -1
  25. package/dist/ui/JimboInset.d.ts +1 -1
  26. package/dist/ui/JimboLayout.d.ts +2 -2
  27. package/dist/ui/JimboListItem.d.ts +1 -1
  28. package/dist/ui/JimboMascot.d.ts +1 -1
  29. package/dist/ui/JimboOrbitalMenu.d.ts +1 -1
  30. package/dist/ui/JimboOuterTab.d.ts +1 -1
  31. package/dist/ui/JimboPanel.d.ts +1 -1
  32. package/dist/ui/JimboPanelSpinner.d.ts +1 -1
  33. package/dist/ui/JimboPicker.d.ts +8 -8
  34. package/dist/ui/JimboSectionHeader.d.ts +1 -1
  35. package/dist/ui/JimboShopBelt.d.ts +1 -1
  36. package/dist/ui/JimboSpacer.d.ts +1 -1
  37. package/dist/ui/JimboStatusPill.d.ts +1 -1
  38. package/dist/ui/JimboTextArea.d.ts +1 -1
  39. package/dist/ui/JimboTextInput.d.ts +1 -1
  40. package/dist/ui/JimboWordmark.d.ts +1 -1
  41. package/dist/ui/jimboTabs.d.ts +1 -1
  42. package/dist/ui/jimboText.d.ts +1 -1
  43. package/dist/ui/panel.d.ts +2 -2
  44. package/dist/ui/sprites.d.ts +1 -1
  45. package/package.json +20 -19
package/dist/motely.js CHANGED
@@ -1,5 +1,5 @@
1
- import { MotelyItemEdition as m, MotelyItemSeal as n, MotelyItemEnhancement as l, MotelyStandardcardRank as o, MotelyStandardcardSuit as d, MotelyItemTypeCategory as k } from "motely-wasm";
2
- import { resolveJamlAssetUrl as v } from "./assets.js";
1
+ import { MotelyItemEdition as m, MotelyItemSeal as n, MotelyItemEnhancement as l, MotelyStandardcardRank as o, MotelyStandardcardSuit as u, MotelyItemTypeCategory as v } from "motely-wasm";
2
+ import { resolveJamlAssetUrl as S } from "./assets.js";
3
3
  const e = Object.freeze({
4
4
  4096: Object.freeze({ value: 4096, enumName: "TwoOfClubs", displayName: "2 of Clubs", category: "Standardcard" }),
5
5
  4097: Object.freeze({ value: 4097, enumName: "ThreeOfClubs", displayName: "3 of Clubs", category: "Standardcard" }),
@@ -524,7 +524,7 @@ Object.freeze({
524
524
  Yorick: e[23554],
525
525
  ZanyJoker: e[20486]
526
526
  });
527
- const S = /* @__PURE__ */ new Map([
527
+ const J = /* @__PURE__ */ new Map([
528
528
  [4096, 65538],
529
529
  [4097, 65794],
530
530
  [4098, 66050],
@@ -779,40 +779,40 @@ const S = /* @__PURE__ */ new Map([
779
779
  [23554, 525568],
780
780
  [23555, 525824],
781
781
  [23556, 526080]
782
- ]), J = ["jokers", "tarots", "deck"], j = [10, 10, 13], z = [16, 6, 4];
783
- function h(a) {
782
+ ]), j = ["jokers", "tarots", "deck"], z = [10, 10, 13], h = [16, 6, 4];
783
+ function T(a) {
784
784
  return { sheet: a & 255, x: a >>> 8 & 255, y: a >>> 16 & 255 };
785
785
  }
786
- function T(a) {
787
- const t = S.get(a);
786
+ function C(a) {
787
+ const t = J.get(a);
788
788
  if (t === void 0) return null;
789
- const { sheet: r, x: c, y } = h(t), u = J[r];
790
- return u ? {
791
- atlasPath: v(u),
789
+ const { sheet: r, x: c, y: N } = T(t), s = j[r];
790
+ return s ? {
791
+ atlasPath: S(s),
792
792
  gridCol: c,
793
- gridRow: y,
794
- gridCols: j[r] ?? 0,
795
- gridRows: z[r] ?? 0
793
+ gridRow: N,
794
+ gridCols: z[r] ?? 0,
795
+ gridRows: h[r] ?? 0
796
796
  } : null;
797
797
  }
798
- function L(a) {
798
+ function U(a) {
799
799
  const t = typeof a == "number" ? a : a.type;
800
- return T(t);
800
+ return C(t);
801
801
  }
802
- const O = {
802
+ const p = {
803
803
  Standardcard: "playing",
804
804
  SpectralCard: "spectral",
805
805
  TarotCard: "tarot",
806
806
  PlanetCard: "planet",
807
807
  Joker: "joker",
808
808
  Invalid: "unknown"
809
- }, C = {
809
+ }, D = {
810
810
  [m.None]: "Base",
811
811
  [m.Foil]: "Foil",
812
812
  [m.Holographic]: "Holographic",
813
813
  [m.Polychrome]: "Polychrome",
814
814
  [m.Negative]: "Negative"
815
- }, D = {
815
+ }, M = {
816
816
  [n.None]: "None",
817
817
  [n.Gold]: "Gold",
818
818
  [n.Red]: "Red",
@@ -828,7 +828,7 @@ const O = {
828
828
  [l.Stone]: "Stone",
829
829
  [l.Gold]: "Gold",
830
830
  [l.Lucky]: "Lucky"
831
- }, M = {
831
+ }, E = {
832
832
  [o.Two]: "2",
833
833
  [o.Three]: "3",
834
834
  [o.Four]: "4",
@@ -843,101 +843,107 @@ const O = {
843
843
  [o.King]: "King",
844
844
  [o.Ace]: "Ace"
845
845
  }, B = {
846
- [d.Clubs]: "Clubs",
847
- [d.Diamonds]: "Diamonds",
848
- [d.Hearts]: "Hearts",
849
- [d.Spades]: "Spades"
846
+ [u.Clubs]: "Clubs",
847
+ [u.Diamonds]: "Diamonds",
848
+ [u.Hearts]: "Hearts",
849
+ [u.Spades]: "Spades"
850
850
  };
851
- function s(a) {
851
+ function i(a) {
852
852
  return e[a];
853
853
  }
854
- function p(a) {
854
+ function g(a) {
855
855
  return a.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
856
856
  }
857
- function g(a) {
857
+ function b(a) {
858
858
  return a == null ? null : typeof a == "number" ? Number.isFinite(a) ? a : null : a.type ?? a.value ?? null;
859
859
  }
860
- function i(a) {
860
+ function y(a) {
861
861
  if (a != null && typeof a == "object" && a.type != null) return a.type;
862
- const t = g(a);
862
+ const t = b(a);
863
863
  return t !== null ? t & 65535 : null;
864
864
  }
865
- function b(a) {
865
+ function k(a) {
866
866
  var r;
867
- const t = i(a);
868
- return t === null ? "Unknown" : ((r = s(t)) == null ? void 0 : r.enumName) ?? `item#${t}`;
867
+ const t = y(a);
868
+ return t === null ? "Unknown" : ((r = i(t)) == null ? void 0 : r.enumName) ?? `item#${t}`;
869
869
  }
870
- function E(a) {
870
+ function A(a) {
871
871
  var r;
872
- const t = (r = s(a)) == null ? void 0 : r.category;
873
- return t ? O[t] ?? "unknown" : "unknown";
872
+ const t = (r = i(a)) == null ? void 0 : r.category;
873
+ return t ? p[t] ?? "unknown" : "unknown";
874
874
  }
875
- function f(a) {
875
+ function O(a) {
876
876
  if (a != null && typeof a == "object" && a.typeCategory != null) {
877
- const r = k[a.typeCategory];
878
- if (r) return O[r] ?? "unknown";
877
+ const r = v[a.typeCategory];
878
+ if (r) return p[r] ?? "unknown";
879
879
  }
880
- const t = i(a);
881
- return t === null ? "unknown" : E(t);
880
+ const t = y(a);
881
+ return t === null ? "unknown" : A(t);
882
882
  }
883
- function W(a) {
883
+ function Y(a) {
884
884
  var r;
885
- const t = i(a);
886
- return t === null ? "Unknown" : ((r = s(t)) == null ? void 0 : r.displayName) ?? p(b(a));
885
+ const t = y(a);
886
+ return t === null ? "Unknown" : ((r = i(t)) == null ? void 0 : r.displayName) ?? g(k(a));
887
+ }
888
+ function d(a) {
889
+ let t = 0;
890
+ for (const r of Object.values(a)) typeof r == "number" && (t |= r);
891
+ return t;
887
892
  }
888
- function N(a, t) {
889
- const r = g(a);
893
+ const F = d(m), I = d(n), P = d(l), R = d(o), w = d(u);
894
+ function f(a, t) {
895
+ const r = b(a);
890
896
  return r === null ? !1 : (r & 1 << t) !== 0;
891
897
  }
892
- function F(a) {
898
+ function G(a) {
893
899
  if (a == null) return null;
894
- const t = typeof a == "number" ? a >>> 23 & 7 : a.edition;
895
- return t == null || t === m.None ? null : C[t];
900
+ const t = typeof a == "number" ? a & F : a.edition;
901
+ return t == null || t === m.None ? null : D[t] ?? null;
896
902
  }
897
- function A(a) {
903
+ function x(a) {
898
904
  if (a == null) return null;
899
- const t = typeof a == "number" ? a >>> 16 & 7 : a.seal;
900
- return t == null || t === n.None ? null : D[t];
905
+ const t = typeof a == "number" ? a & I : a.seal;
906
+ return t == null || t === n.None ? null : M[t] ?? null;
901
907
  }
902
- function P(a) {
908
+ function L(a) {
903
909
  if (a == null) return null;
904
- const t = typeof a == "number" ? a >>> 19 & 15 : a.enhancement;
910
+ const t = typeof a == "number" ? a & P : a.enhancement;
905
911
  return t == null || t === l.None ? null : H[t] ?? null;
906
912
  }
907
- function R(a) {
908
- if (a == null || f(a) !== "playing") return null;
909
- const r = typeof a == "number" ? a & 15 : a.standardcardRank ?? a.rank;
910
- return r == null ? null : M[r] ?? null;
913
+ function W(a) {
914
+ if (a == null || O(a) !== "playing") return null;
915
+ const r = typeof a == "number" ? a & R : a.standardcardRank ?? a.rank;
916
+ return r == null ? null : E[r] ?? null;
911
917
  }
912
- function I(a) {
913
- if (a == null || f(a) !== "playing") return null;
914
- const r = typeof a == "number" ? a >>> 4 & 3 : a.standardcardSuit ?? a.suit;
918
+ function K(a) {
919
+ if (a == null || O(a) !== "playing") return null;
920
+ const r = typeof a == "number" ? a & w : a.standardcardSuit ?? a.suit;
915
921
  return r == null ? null : B[r] ?? null;
916
922
  }
917
- function K(a) {
918
- return b(a);
923
+ function Z(a) {
924
+ return k(a);
919
925
  }
920
- function w(a) {
921
- const t = i(a);
926
+ function _(a) {
927
+ const t = y(a);
922
928
  if (t === null) return null;
923
- const r = s(t), c = (r == null ? void 0 : r.enumName) ?? `Unknown_${t}`, y = f(a), u = (r == null ? void 0 : r.displayName) ?? p(c);
929
+ const r = i(t), c = (r == null ? void 0 : r.enumName) ?? `Unknown_${t}`, N = O(a), s = (r == null ? void 0 : r.displayName) ?? g(c);
924
930
  return {
925
931
  itemType: t,
926
932
  enumKey: c,
927
- displayName: u,
928
- category: y,
929
- edition: F(a),
930
- seal: A(a),
931
- enhancement: P(a),
932
- rank: R(a),
933
- suit: I(a),
934
- isEternal: typeof a == "number" ? (a >>> 30 & 1) !== 0 : (a == null ? void 0 : a.isEternal) ?? N(a, 30),
935
- isPerishable: typeof a == "number" ? (a >>> 31 & 1) !== 0 : (a == null ? void 0 : a.isPerishable) ?? N(a, 31),
936
- isRental: typeof a == "number" ? (a >>> 29 & 1) !== 0 : (a == null ? void 0 : a.isRental) ?? N(a, 29)
933
+ displayName: s,
934
+ category: N,
935
+ edition: G(a),
936
+ seal: x(a),
937
+ enhancement: L(a),
938
+ rank: W(a),
939
+ suit: K(a),
940
+ isEternal: typeof a == "number" ? (a >>> 30 & 1) !== 0 : (a == null ? void 0 : a.isEternal) ?? f(a, 30),
941
+ isPerishable: typeof a == "number" ? (a >>> 31 & 1) !== 0 : (a == null ? void 0 : a.isPerishable) ?? f(a, 31),
942
+ isRental: typeof a == "number" ? (a >>> 29 & 1) !== 0 : (a == null ? void 0 : a.isRental) ?? f(a, 29)
937
943
  };
938
944
  }
939
- function Q(a, t) {
940
- const r = w(a);
945
+ function $(a, t) {
946
+ const r = _(a);
941
947
  return r ? {
942
948
  type: r.category === "joker" ? "joker" : r.category === "playing" ? "playing" : "consumable",
943
949
  card: {
@@ -955,21 +961,21 @@ function Q(a, t) {
955
961
  } : null;
956
962
  }
957
963
  export {
958
- w as decodeMotelyItem,
959
- K as decodeMotelyItemName,
960
- Q as decodeMotelyItemToJamlCard,
961
- E as motelyItemCategory,
962
- W as motelyItemDisplayName,
963
- F as motelyItemEditionName,
964
- P as motelyItemEnhancementName,
965
- f as motelyItemRenderCategory,
966
- A as motelyItemSealName,
967
- L as motelyItemToSprite,
968
- b as motelyItemTypeName,
969
- T as motelyItemTypeToSprite,
970
- R as motelyStandardcardRankName,
971
- I as motelyStandardcardSuitName,
972
- i as resolveMotelyItemType,
973
- h as unpackSpriteCell
964
+ _ as decodeMotelyItem,
965
+ Z as decodeMotelyItemName,
966
+ $ as decodeMotelyItemToJamlCard,
967
+ A as motelyItemCategory,
968
+ Y as motelyItemDisplayName,
969
+ G as motelyItemEditionName,
970
+ L as motelyItemEnhancementName,
971
+ O as motelyItemRenderCategory,
972
+ x as motelyItemSealName,
973
+ U as motelyItemToSprite,
974
+ k as motelyItemTypeName,
975
+ C as motelyItemTypeToSprite,
976
+ W as motelyStandardcardRankName,
977
+ K as motelyStandardcardSuitName,
978
+ y as resolveMotelyItemType,
979
+ T as unpackSpriteCell
974
980
  };
975
981
  //# sourceMappingURL=motely.js.map