@almadar/std 3.4.1 → 3.4.3

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.
@@ -7664,7 +7664,7 @@ function resolve45(params) {
7664
7664
  { name: "x", type: "number", default: 0 },
7665
7665
  { name: "y", type: "number", default: 0 },
7666
7666
  { name: "frame", type: "number", default: 0 },
7667
- { name: "spritesheet", type: "string", default: "" }
7667
+ { name: "spritesheet", type: "string", default: "https://almadar-kflow-assets.web.app/shared/sprite-sheets/amir-sprite-sheet-se.png" }
7668
7668
  ];
7669
7669
  const userFieldNames = new Set(baseFields.map((f) => f.name));
7670
7670
  const fields = [...baseFields, ...domainFields.filter((f) => !userFieldNames.has(f.name))];
@@ -7687,14 +7687,51 @@ function buildEntity43(c) {
7687
7687
  function buildTrait44(c) {
7688
7688
  const { entityName, frameWidth, frameHeight, scale } = c;
7689
7689
  const spriteView = {
7690
- type: "sprite",
7691
- spritesheet: `@${entityName}.spritesheet`,
7692
- frameWidth,
7693
- frameHeight,
7694
- frame: `@${entityName}.frame`,
7695
- x: `@${entityName}.x`,
7696
- y: `@${entityName}.y`,
7697
- scale
7690
+ type: "stack",
7691
+ direction: "vertical",
7692
+ gap: "md",
7693
+ children: [
7694
+ {
7695
+ type: "stack",
7696
+ direction: "horizontal",
7697
+ gap: "sm",
7698
+ align: "center",
7699
+ children: [
7700
+ { type: "icon", name: "image", size: "lg" },
7701
+ { type: "typography", content: `${entityName} Sprite`, variant: "h2" }
7702
+ ]
7703
+ },
7704
+ { type: "divider" },
7705
+ {
7706
+ type: "box",
7707
+ className: "relative bg-gray-900 rounded-lg overflow-hidden",
7708
+ style: { width: `${frameWidth * scale * 4}px`, height: `${frameHeight * scale * 4}px`, margin: "0 auto" },
7709
+ children: [
7710
+ {
7711
+ type: "sprite",
7712
+ spritesheet: `@${entityName}.spritesheet`,
7713
+ frameWidth,
7714
+ frameHeight,
7715
+ frame: `@${entityName}.frame`,
7716
+ x: frameWidth * scale,
7717
+ y: frameHeight * scale,
7718
+ scale
7719
+ }
7720
+ ]
7721
+ },
7722
+ {
7723
+ type: "stack",
7724
+ direction: "horizontal",
7725
+ gap: "md",
7726
+ justify: "center",
7727
+ children: [
7728
+ { type: "typography", content: `Frame: `, variant: "caption", color: "muted" },
7729
+ { type: "badge", content: `@${entityName}.frame`, variant: "default" },
7730
+ { type: "typography", content: `Position: `, variant: "caption", color: "muted" },
7731
+ { type: "badge", content: ["concat", `@${entityName}.x`, ",", `@${entityName}.y`], variant: "default" }
7732
+ ]
7733
+ }
7734
+ ]
7698
7735
  };
7699
7736
  return {
7700
7737
  name: c.traitName,
@@ -7753,12 +7790,80 @@ function buildEntity44(c) {
7753
7790
  }
7754
7791
  function buildTrait45(c) {
7755
7792
  const { entityName, initialMuted } = c;
7793
+ const audioControls = {
7794
+ type: "stack",
7795
+ direction: "vertical",
7796
+ gap: "lg",
7797
+ className: "max-w-md mx-auto",
7798
+ children: [
7799
+ {
7800
+ type: "stack",
7801
+ direction: "horizontal",
7802
+ gap: "sm",
7803
+ align: "center",
7804
+ children: [
7805
+ { type: "icon", name: "volume-2", size: "lg" },
7806
+ { type: "typography", content: "Audio Controls", variant: "h2" }
7807
+ ]
7808
+ },
7809
+ { type: "divider" },
7810
+ {
7811
+ type: "card",
7812
+ children: [
7813
+ {
7814
+ type: "stack",
7815
+ direction: "vertical",
7816
+ gap: "md",
7817
+ children: [
7818
+ { type: "typography", content: initialMuted ? "Audio Muted" : "Audio Active", variant: "h4" },
7819
+ { type: "typography", content: "Toggle mute to control game audio playback.", variant: "body", color: "muted" },
7820
+ {
7821
+ type: "stack",
7822
+ direction: "horizontal",
7823
+ gap: "sm",
7824
+ children: [
7825
+ { type: "button", label: "Toggle Mute", icon: initialMuted ? "volume-x" : "volume-2", event: "TOGGLE_MUTE", variant: "primary" }
7826
+ ]
7827
+ }
7828
+ ]
7829
+ }
7830
+ ]
7831
+ },
7832
+ {
7833
+ type: "card",
7834
+ children: [
7835
+ {
7836
+ type: "stack",
7837
+ direction: "vertical",
7838
+ gap: "sm",
7839
+ children: [
7840
+ { type: "typography", content: "Sound Effects", variant: "h4" },
7841
+ {
7842
+ type: "stack",
7843
+ direction: "horizontal",
7844
+ gap: "sm",
7845
+ children: [
7846
+ { type: "button", label: "Play Click", icon: "play", variant: "outline" },
7847
+ { type: "button", label: "Play Confirm", icon: "play", variant: "outline" },
7848
+ { type: "button", label: "Play Drop", icon: "play", variant: "outline" }
7849
+ ]
7850
+ }
7851
+ ]
7852
+ }
7853
+ ]
7854
+ }
7855
+ ]
7856
+ };
7756
7857
  const audioView = {
7757
7858
  type: "game-audio-provider",
7758
- manifest: {},
7759
- baseUrl: "",
7859
+ manifest: {
7860
+ click: "https://almadar-kflow-assets.web.app/shared/audio/sfx/close_001.ogg",
7861
+ confirm: "https://almadar-kflow-assets.web.app/shared/audio/sfx/confirmation_001.ogg",
7862
+ drop: "https://almadar-kflow-assets.web.app/shared/audio/sfx/drop_001.ogg"
7863
+ },
7864
+ baseUrl: "https://almadar-kflow-assets.web.app/shared/audio",
7760
7865
  initialMuted,
7761
- children: []
7866
+ children: [audioControls]
7762
7867
  };
7763
7868
  return {
7764
7869
  name: c.traitName,