@industry-theme/file-city-panel 0.3.13 → 0.3.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"TourPlayer.d.ts","sourceRoot":"","sources":["../../src/components/TourPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAgBxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,IAAI,EAAE,gBAAgB,CAAC;IAEvB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEvE,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAE1E,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,qIAAqI;IACrI,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAE3D,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,yDAAyD;IACzD,aAAa,CAA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AAO,CAAC;IAGtB,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,iEAAiE;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkhChD,CAAC"}
@@ -51449,7 +51449,7 @@ const TourPlayer = ({
51449
51449
  });
51450
51450
  }
51451
51451
  }, [isAudioPaused]);
51452
- const handleReadAloud = useCallback(() => {
51452
+ useCallback(() => {
51453
51453
  if (!audioUrls) return;
51454
51454
  const audioUrl = audioUrls.get(currentStep.id);
51455
51455
  if (!audioUrl) return;
@@ -51869,38 +51869,70 @@ const TourPlayer = ({
51869
51869
  ]
51870
51870
  }
51871
51871
  ),
51872
- /* @__PURE__ */ jsxs(
51873
- "button",
51874
- {
51875
- onClick: handleExit,
51876
- style: {
51877
- display: "flex",
51878
- alignItems: "center",
51879
- gap: "4px",
51880
- padding: "6px 12px",
51881
- backgroundColor: "transparent",
51882
- color: theme2.colors.textSecondary,
51883
- border: `1px solid ${theme2.colors.border}`,
51884
- borderRadius: "6px",
51885
- fontSize: theme2.fontSizes[1],
51886
- fontFamily: theme2.fonts.body,
51887
- cursor: "pointer",
51888
- transition: "all 0.2s"
51889
- },
51890
- onMouseEnter: (e) => {
51891
- e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
51892
- e.currentTarget.style.borderColor = theme2.colors.text;
51893
- },
51894
- onMouseLeave: (e) => {
51895
- e.currentTarget.style.backgroundColor = "transparent";
51896
- e.currentTarget.style.borderColor = theme2.colors.border;
51897
- },
51898
- children: [
51899
- /* @__PURE__ */ jsx(X, { size: 14 }),
51900
- "Exit Tour"
51901
- ]
51902
- }
51903
- )
51872
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
51873
+ canAutoPlay && currentStepHasAudio && /* @__PURE__ */ jsxs(
51874
+ "button",
51875
+ {
51876
+ onClick: toggleAutoPlay,
51877
+ style: {
51878
+ display: "flex",
51879
+ alignItems: "center",
51880
+ gap: "4px",
51881
+ padding: "6px 12px",
51882
+ backgroundColor: isAutoPlaying ? theme2.colors.primary : "transparent",
51883
+ color: isAutoPlaying ? "#ffffff" : theme2.colors.text,
51884
+ border: `1px solid ${isAutoPlaying ? theme2.colors.primary : theme2.colors.border}`,
51885
+ borderRadius: "6px",
51886
+ fontSize: theme2.fontSizes[1],
51887
+ fontFamily: theme2.fonts.body,
51888
+ cursor: "pointer",
51889
+ transition: "all 0.2s"
51890
+ },
51891
+ onMouseEnter: (e) => {
51892
+ e.currentTarget.style.opacity = "0.8";
51893
+ },
51894
+ onMouseLeave: (e) => {
51895
+ e.currentTarget.style.opacity = "1";
51896
+ },
51897
+ children: [
51898
+ isAutoPlaying ? /* @__PURE__ */ jsx(Pause, { size: 14 }) : /* @__PURE__ */ jsx(Play, { size: 14 }),
51899
+ isAutoPlaying ? "Pause" : "Play"
51900
+ ]
51901
+ }
51902
+ ),
51903
+ /* @__PURE__ */ jsxs(
51904
+ "button",
51905
+ {
51906
+ onClick: handleExit,
51907
+ style: {
51908
+ display: "flex",
51909
+ alignItems: "center",
51910
+ gap: "4px",
51911
+ padding: "6px 12px",
51912
+ backgroundColor: "transparent",
51913
+ color: theme2.colors.textSecondary,
51914
+ border: `1px solid ${theme2.colors.border}`,
51915
+ borderRadius: "6px",
51916
+ fontSize: theme2.fontSizes[1],
51917
+ fontFamily: theme2.fonts.body,
51918
+ cursor: "pointer",
51919
+ transition: "all 0.2s"
51920
+ },
51921
+ onMouseEnter: (e) => {
51922
+ e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
51923
+ e.currentTarget.style.borderColor = theme2.colors.text;
51924
+ },
51925
+ onMouseLeave: (e) => {
51926
+ e.currentTarget.style.backgroundColor = "transparent";
51927
+ e.currentTarget.style.borderColor = theme2.colors.border;
51928
+ },
51929
+ children: [
51930
+ /* @__PURE__ */ jsx(X, { size: 14 }),
51931
+ "Exit Tour"
51932
+ ]
51933
+ }
51934
+ )
51935
+ ] })
51904
51936
  ]
51905
51937
  }
51906
51938
  ),
@@ -52049,113 +52081,47 @@ const TourPlayer = ({
52049
52081
  ] })
52050
52082
  }
52051
52083
  ),
52052
- currentStepHasAudio && /* @__PURE__ */ jsxs(
52084
+ isAudioPlaying && audioDuration > 0 && /* @__PURE__ */ jsxs(
52053
52085
  "div",
52054
52086
  {
52055
52087
  style: {
52056
- padding: "12px 16px",
52088
+ padding: "8px 16px",
52057
52089
  borderTop: `1px solid ${theme2.colors.border}`,
52058
52090
  flexShrink: 0,
52059
52091
  display: "flex",
52060
- flexDirection: "column",
52092
+ alignItems: "center",
52061
52093
  gap: "8px"
52062
52094
  },
52063
52095
  children: [
52064
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
52065
- /* @__PURE__ */ jsxs(
52066
- "button",
52067
- {
52068
- onClick: handleReadAloud,
52069
- style: {
52070
- display: "flex",
52071
- alignItems: "center",
52072
- gap: "6px",
52073
- padding: "8px 12px",
52074
- backgroundColor: "transparent",
52075
- color: theme2.colors.text,
52076
- border: `1px solid ${theme2.colors.border}`,
52077
- borderRadius: "8px",
52078
- fontSize: theme2.fontSizes[2],
52079
- fontFamily: theme2.fonts.body,
52080
- cursor: "pointer",
52081
- transition: "all 0.2s"
52082
- },
52083
- onMouseEnter: (e) => {
52084
- e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
52085
- },
52086
- onMouseLeave: (e) => {
52087
- e.currentTarget.style.backgroundColor = "transparent";
52088
- },
52089
- children: [
52090
- isAudioPlaying && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
52091
- isAudioPaused && /* @__PURE__ */ jsx(VolumeX, { size: 16 }),
52092
- !isAudioPlaying && !isAudioPaused && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
52093
- /* @__PURE__ */ jsx("span", { children: isAudioPlaying ? "Stop" : isAudioPaused ? "Resume" : "Read Aloud" })
52094
- ]
52095
- }
52096
- ),
52097
- canAutoPlay && /* @__PURE__ */ jsxs(
52098
- "button",
52099
- {
52100
- onClick: toggleAutoPlay,
52101
- style: {
52102
- display: "flex",
52103
- alignItems: "center",
52104
- gap: "6px",
52105
- padding: "8px 12px",
52106
- backgroundColor: isAutoPlaying ? theme2.colors.primary : "transparent",
52107
- color: isAutoPlaying ? "#ffffff" : theme2.colors.text,
52108
- border: `1px solid ${isAutoPlaying ? theme2.colors.primary : theme2.colors.border}`,
52109
- borderRadius: "8px",
52110
- fontSize: theme2.fontSizes[2],
52111
- fontFamily: theme2.fonts.body,
52112
- cursor: "pointer",
52113
- transition: "all 0.2s"
52114
- },
52115
- onMouseEnter: (e) => {
52116
- e.currentTarget.style.opacity = "0.8";
52117
- },
52118
- onMouseLeave: (e) => {
52119
- e.currentTarget.style.opacity = "1";
52120
- },
52121
- children: [
52122
- isAutoPlaying ? /* @__PURE__ */ jsx(Pause, { size: 16 }) : /* @__PURE__ */ jsx(Play, { size: 16 }),
52123
- /* @__PURE__ */ jsx("span", { children: isAutoPlaying ? "Stop Auto-Play" : "Start Auto-Play" })
52124
- ]
52125
- }
52126
- )
52127
- ] }),
52128
- isAudioPlaying && audioDuration > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
52129
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioCurrentTime) }),
52130
- /* @__PURE__ */ jsx(
52131
- "div",
52132
- {
52133
- style: {
52134
- flex: 1,
52135
- height: "4px",
52136
- backgroundColor: theme2.colors.backgroundLight,
52137
- borderRadius: "2px",
52138
- overflow: "hidden"
52139
- },
52140
- children: /* @__PURE__ */ jsx(
52141
- "div",
52142
- {
52143
- style: {
52144
- height: "100%",
52145
- width: `${audioCurrentTime / audioDuration * 100}%`,
52146
- backgroundColor: theme2.colors.primary,
52147
- transition: "width 0.1s linear"
52148
- }
52096
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioCurrentTime) }),
52097
+ /* @__PURE__ */ jsx(
52098
+ "div",
52099
+ {
52100
+ style: {
52101
+ flex: 1,
52102
+ height: "4px",
52103
+ backgroundColor: theme2.colors.backgroundLight,
52104
+ borderRadius: "2px",
52105
+ overflow: "hidden"
52106
+ },
52107
+ children: /* @__PURE__ */ jsx(
52108
+ "div",
52109
+ {
52110
+ style: {
52111
+ height: "100%",
52112
+ width: `${audioCurrentTime / audioDuration * 100}%`,
52113
+ backgroundColor: theme2.colors.primary,
52114
+ transition: "width 0.1s linear"
52149
52115
  }
52150
- )
52151
- }
52152
- ),
52153
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioDuration) })
52154
- ] })
52116
+ }
52117
+ )
52118
+ }
52119
+ ),
52120
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioDuration) })
52155
52121
  ]
52156
52122
  }
52157
52123
  ),
52158
- /* @__PURE__ */ jsxs(
52124
+ !(isAudioPlaying && position === "top") && /* @__PURE__ */ jsxs(
52159
52125
  "div",
52160
52126
  {
52161
52127
  style: {