pixelon 0.5.3 → 0.5.4

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/dist/index.esm.js CHANGED
@@ -16911,7 +16911,8 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16911
16911
  () => livePoints.length === 1 ? livePoints[0].id : void 0,
16912
16912
  [livePoints]
16913
16913
  );
16914
- return /* @__PURE__ */ jsx("div", { className: fill ? `${CLASS$6} ${CLASS$6}--fill` : CLASS$6, children: rows === null ? /* @__PURE__ */ jsx("p", { className: `${CLASS$6}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
16914
+ const nadaQueDibujar = rows !== null && allPoints.length === 0 && route.length === 0;
16915
+ return /* @__PURE__ */ jsx("div", { className: fill ? `${CLASS$6} ${CLASS$6}--fill` : CLASS$6, children: rows === null ? /* @__PURE__ */ jsx("p", { className: `${CLASS$6}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsx("p", { className: `${CLASS$6}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
16915
16916
  /* @__PURE__ */ jsx(
16916
16917
  MapView,
16917
16918
  {
@@ -16943,6 +16944,16 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16943
16944
  ] }) });
16944
16945
  };
16945
16946
  ServicesMap.displayName = "ServicesMap";
16947
+ function lineaSinMapa(labels, missing, failed) {
16948
+ if (failed) return "No se pudieron cargar las ubicaciones.";
16949
+ if (missing === 1) {
16950
+ return (labels.missingTextOne ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", "1");
16951
+ }
16952
+ if (missing > 1) {
16953
+ return (labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing));
16954
+ }
16955
+ return labels.emptyText ?? "Sin ubicaciones para mostrar";
16956
+ }
16946
16957
 
16947
16958
  const CLASS$5 = `${COMPONENT_PREFIX$1}service-shortcuts`;
16948
16959
  const ICONS = {
package/dist/index.js CHANGED
@@ -16932,7 +16932,8 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16932
16932
  () => livePoints.length === 1 ? livePoints[0].id : void 0,
16933
16933
  [livePoints]
16934
16934
  );
16935
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: fill ? `${CLASS$6} ${CLASS$6}--fill` : CLASS$6, children: rows === null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16935
+ const nadaQueDibujar = rows !== null && allPoints.length === 0 && route.length === 0;
16936
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: fill ? `${CLASS$6} ${CLASS$6}--fill` : CLASS$6, children: rows === null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16936
16937
  /* @__PURE__ */ jsxRuntime.jsx(
16937
16938
  MapView,
16938
16939
  {
@@ -16964,6 +16965,16 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16964
16965
  ] }) });
16965
16966
  };
16966
16967
  ServicesMap.displayName = "ServicesMap";
16968
+ function lineaSinMapa(labels, missing, failed) {
16969
+ if (failed) return "No se pudieron cargar las ubicaciones.";
16970
+ if (missing === 1) {
16971
+ return (labels.missingTextOne ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", "1");
16972
+ }
16973
+ if (missing > 1) {
16974
+ return (labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing));
16975
+ }
16976
+ return labels.emptyText ?? "Sin ubicaciones para mostrar";
16977
+ }
16967
16978
 
16968
16979
  const CLASS$5 = `${COMPONENT_PREFIX$1}service-shortcuts`;
16969
16980
  const ICONS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelon",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Design system de la marca goluti",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,7 +26,8 @@
26
26
  "get:ip": "ipconfig getifaddr en0",
27
27
  "gen:ux-types": "node scripts/gen-ux-types.mjs",
28
28
  "gen:ux-types:check": "node scripts/gen-ux-types.mjs --check",
29
- "prepublishOnly": "npm run build:lib"
29
+ "prepublishOnly": "npm run build:lib",
30
+ "publicar": "bash scripts/publicar.sh"
30
31
  },
31
32
  "keywords": [
32
33
  "pixelon",