@orca-pt/orca-components 1.0.6 → 1.0.7

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,11 +1,10 @@
1
- import { computed, unref, ref, watch, onMounted, nextTick, defineComponent, createElementBlock, openBlock, createElementVNode, createStaticVNode, createVNode, Fragment, renderList, toDisplayString, createTextVNode, onUnmounted, createBlock, withCtx, createCommentVNode, normalizeStyle, normalizeClass, createSlots, useCssVars, Transition, isRef, withModifiers } from "vue";
1
+ import { computed, unref, ref, watch, onMounted, nextTick, defineComponent, createElementBlock, openBlock, createElementVNode, createStaticVNode, createVNode, Fragment, renderList, toDisplayString, createTextVNode, createBlock, withCtx, createCommentVNode, normalizeStyle, normalizeClass, createSlots, useCssVars, onUnmounted, Transition, isRef, withModifiers } from "vue";
2
2
  import { VCard, VImg, VCardItem, VCardTitle, VBtn, VIcon, VExpandTransition, VProgressCircular, VDialog } from "vuetify/components";
3
3
  import MarkdownIt from "markdown-it";
4
4
  import hljs from "highlight.js";
5
5
  import markdownItLinkAttributes from "markdown-it-link-attributes";
6
6
  import markdownItKatex from "markdown-it-katex";
7
7
  import { VideoPlayer } from "@videojs-player/vue";
8
- import mapboxgl from "mapbox-gl";
9
8
  import { components } from "vuetify/dist/vuetify-labs.esm.js";
10
9
  function isImageFile(url) {
11
10
  const imageExtensions = [
@@ -2029,7 +2028,7 @@ const OrcaYouTube = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "dat
2029
2028
  const _hoisted_1$c = { class: "orca-audio-container" };
2030
2029
  const _hoisted_2$8 = { class: "audio-list" };
2031
2030
  const _hoisted_3$6 = { class: "audio-content" };
2032
- const _hoisted_4$4 = { class: "audio-label" };
2031
+ const _hoisted_4$3 = { class: "audio-label" };
2033
2032
  const _hoisted_5 = ["type"];
2034
2033
  const _hoisted_6 = ["src", "type"];
2035
2034
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
@@ -2062,7 +2061,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2062
2061
  ])
2063
2062
  ], -1)),
2064
2063
  createElementVNode("div", _hoisted_3$6, [
2065
- createElementVNode("p", _hoisted_4$4, toDisplayString(audio.label), 1),
2064
+ createElementVNode("p", _hoisted_4$3, toDisplayString(audio.label), 1),
2066
2065
  createElementVNode("audio", {
2067
2066
  controls: "",
2068
2067
  class: "audio-player",
@@ -2084,9 +2083,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2084
2083
  });
2085
2084
  const OrcaAudio = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-ade9342b"]]);
2086
2085
  const _hoisted_1$b = { class: "orca-location-container" };
2087
- const _hoisted_2$7 = { class: "map-wrapper" };
2088
- const _hoisted_3$5 = { class: "location-info" };
2089
- const _hoisted_4$3 = { class: "location-text" };
2086
+ const _hoisted_2$7 = { class: "location-info" };
2087
+ const _hoisted_3$5 = { class: "location-text" };
2090
2088
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
2091
2089
  __name: "OrcaLocation",
2092
2090
  props: {
@@ -2095,70 +2093,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2095
2093
  mapboxToken: {}
2096
2094
  },
2097
2095
  setup(__props) {
2098
- const props = __props;
2099
- const mapInstance = ref(null);
2100
- const mapLoading = ref(false);
2101
- const onMapContainerReady = (el) => {
2102
- const htmlEl = el && "tagName" in el ? el : null;
2103
- if (!htmlEl) return;
2104
- if (!el) return;
2105
- mapLoading.value = true;
2106
- nextTick(() => {
2107
- try {
2108
- mapboxgl.accessToken = props.mapboxToken || "pk.eyJ1IjoicG91cnlhYnpwIiwiYSI6ImNsZ3Vuanl4YzF2NXkzZW1tcnR0MTlxNXEifQ.I3RdtfiL0ObnXbWVKxW1gQ";
2109
- if (mapInstance.value) {
2110
- mapInstance.value.remove();
2111
- mapInstance.value = null;
2112
- }
2113
- const containerId = `map-${props.latitude}-${props.longitude}`;
2114
- htmlEl.id = containerId;
2115
- const newMap = new mapboxgl.Map({
2116
- container: htmlEl,
2117
- style: "mapbox://styles/mapbox/streets-v11",
2118
- center: [props.longitude, props.latitude],
2119
- zoom: 12,
2120
- attributionControl: false
2121
- });
2122
- mapInstance.value = newMap;
2123
- newMap.on("load", () => {
2124
- new mapboxgl.Marker({
2125
- color: "#0D5FD6"
2126
- }).setLngLat([props.longitude, props.latitude]).addTo(newMap);
2127
- newMap.addControl(new mapboxgl.NavigationControl());
2128
- setTimeout(() => {
2129
- newMap.resize();
2130
- }, 100);
2131
- mapLoading.value = false;
2132
- });
2133
- newMap.on("error", (e) => {
2134
- console.error("Mapbox error:", e);
2135
- mapLoading.value = false;
2136
- });
2137
- newMap.on("render", () => {
2138
- newMap.resize();
2139
- });
2140
- } catch (error) {
2141
- console.error("Error initializing map:", error);
2142
- mapLoading.value = false;
2143
- }
2144
- });
2145
- };
2146
- onUnmounted(() => {
2147
- if (mapInstance.value) {
2148
- mapInstance.value.remove();
2149
- mapInstance.value = null;
2150
- }
2151
- });
2152
2096
  return (_ctx, _cache) => {
2153
2097
  return openBlock(), createElementBlock("div", _hoisted_1$b, [
2098
+ _cache[1] || (_cache[1] = createStaticVNode('<div class="map-placeholder" data-v-2d752e0f><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="1.5" data-v-2d752e0f><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" data-v-2d752e0f></path><circle cx="12" cy="10" r="3" data-v-2d752e0f></circle></svg><span class="placeholder-text" data-v-2d752e0f>Map view temporarily unavailable</span></div>', 1)),
2154
2099
  createElementVNode("div", _hoisted_2$7, [
2155
- (openBlock(), createElementBlock("div", {
2156
- ref: (el) => onMapContainerReady(el),
2157
- class: "map-container",
2158
- key: `map-${__props.latitude}-${__props.longitude}`
2159
- }))
2160
- ]),
2161
- createElementVNode("div", _hoisted_3$5, [
2162
2100
  _cache[0] || (_cache[0] = createElementVNode("div", { class: "location-icon" }, [
2163
2101
  createElementVNode("svg", {
2164
2102
  width: "16",
@@ -2176,13 +2114,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2176
2114
  })
2177
2115
  ])
2178
2116
  ], -1)),
2179
- createElementVNode("span", _hoisted_4$3, toDisplayString(__props.latitude.toFixed(6)) + ", " + toDisplayString(__props.longitude.toFixed(6)), 1)
2117
+ createElementVNode("span", _hoisted_3$5, toDisplayString(__props.latitude.toFixed(6)) + ", " + toDisplayString(__props.longitude.toFixed(6)), 1)
2180
2118
  ])
2181
2119
  ]);
2182
2120
  };
2183
2121
  }
2184
2122
  });
2185
- const OrcaLocation = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-99a42606"]]);
2123
+ const OrcaLocation = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-2d752e0f"]]);
2186
2124
  const _hoisted_1$a = { class: "orca-card-container" };
2187
2125
  const _hoisted_2$6 = {
2188
2126
  key: 0,