@datagouv/components-next 1.0.2-dev.18 → 1.0.2-dev.181

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 (151) hide show
  1. package/README.md +7 -6
  2. package/assets/main.css +4 -0
  3. package/dist/{Control-DuZJdKV_.js → Control-B9WQxlpJ.js} +1 -1
  4. package/dist/{Datafair.client-Ds3VQrRi.js → Datafair.client-CaxMyNif.js} +9 -9
  5. package/dist/{Event--kp8kMdJ.js → Event-iXDrp-fy.js} +31 -31
  6. package/dist/{Image-34hvypZI.js → Image-mNMBOofs.js} +9 -9
  7. package/dist/ImagePreview.client-CPmCyisP.js +36 -0
  8. package/dist/JsonPreview.client-CKOU-LBs.js +40 -0
  9. package/dist/{Map-BjUnLyj8.js → Map-BfqKMw0S.js} +1739 -1599
  10. package/dist/{MapContainer.client-B2BijMx5.js → MapContainer.client-IGYJWP5m.js} +41 -42
  11. package/dist/{OSM-s40W6sQ2.js → OSM-CcrUhItr.js} +15 -23
  12. package/dist/{PdfPreview.client-DJBMzrlC.js → PdfPreview.client-csUebU3A.js} +835 -856
  13. package/dist/Pmtiles.client-CLq7UHBg.js +26333 -0
  14. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-DeoHZXW1.js +60 -0
  15. package/dist/{ScaleLine-KW-nXqp3.js → ScaleLine-VGQ7nkMS.js} +2 -2
  16. package/dist/{Tile-DbNFNPfU.js → Tile-CSpn0Ca8.js} +160 -163
  17. package/dist/{TileImage-BsXBxMtq.js → TileImage-CpbaEFwd.js} +143 -131
  18. package/dist/{View-BR92hTWP.js → View-BYBpt-AU.js} +483 -422
  19. package/dist/XmlPreview.client-C1toAbQ0.js +34 -0
  20. package/dist/{common-PJfpC179.js → common-BoeTUnDZ.js} +52 -52
  21. package/dist/components-next.css +1 -52
  22. package/dist/components-next.js +193 -149
  23. package/dist/components.css +2 -2
  24. package/dist/{index-BFQX7Ccz.js → index-CaUlhl3k.js} +21842 -15810
  25. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-ByYGrf8H.js} +185 -187
  26. package/dist/{main-vqhkVhVS.js → main-DD4ieUAo.js} +41500 -73223
  27. package/dist/{proj-DsetBcW7.js → proj-DxGbobp7.js} +662 -626
  28. package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
  29. package/dist/{tilecoord-Db24Px13.js → tilecoord-DvX7WWiA.js} +273 -264
  30. package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
  31. package/dist/{vue3-xml-viewer.common-BcNJo35o.js → vue3-xml-viewer.common-B1KPK4L4.js} +16 -16
  32. package/package.json +47 -38
  33. package/src/chart.ts +5 -0
  34. package/src/components/ActivityList/ActivityList.vue +3 -2
  35. package/src/components/AppLink.vue +3 -0
  36. package/src/components/BannerAction.vue +6 -2
  37. package/src/components/Chart/ChartViewer.vue +320 -0
  38. package/src/components/Chart/ChartViewerWrapper.vue +182 -0
  39. package/src/components/CopyButton.vue +6 -2
  40. package/src/components/DataserviceCard.vue +9 -0
  41. package/src/components/DataserviceQuality.vue +82 -0
  42. package/src/components/DataserviceQualityInline.vue +31 -0
  43. package/src/components/DataserviceQualityTooltipContent.vue +79 -0
  44. package/src/components/DatasetCard.vue +9 -4
  45. package/src/components/DatasetQuality.vue +11 -11
  46. package/src/components/DatasetQualityInline.vue +2 -2
  47. package/src/components/DatasetQualityTooltipContent.vue +1 -1
  48. package/src/components/Form/Listbox.vue +101 -0
  49. package/src/components/Form/SchemaSelect.vue +2 -0
  50. package/src/components/InfiniteLoader.vue +53 -0
  51. package/src/components/ObjectCardHeader.vue +11 -4
  52. package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
  53. package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
  54. package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
  55. package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
  56. package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
  57. package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
  58. package/src/components/OpenApiViewer/openapi.ts +150 -0
  59. package/src/components/OrganizationNameWithCertificate.vue +3 -2
  60. package/src/components/Pagination.vue +8 -5
  61. package/src/components/RadioInput.vue +7 -2
  62. package/src/components/ResourceAccordion/DataStructure.vue +11 -33
  63. package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
  64. package/src/components/ResourceAccordion/Downloads.vue +160 -0
  65. package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
  66. package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -104
  67. package/src/components/ResourceAccordion/MapContainer.client.vue +2 -11
  68. package/src/components/ResourceAccordion/Metadata.vue +1 -2
  69. package/src/components/ResourceAccordion/PdfPreview.client.vue +58 -97
  70. package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
  71. package/src/components/ResourceAccordion/Pmtiles.client.vue +28 -13
  72. package/src/components/ResourceAccordion/Preview.vue +11 -11
  73. package/src/components/ResourceAccordion/PreviewWrapper.vue +89 -0
  74. package/src/components/ResourceAccordion/ResourceAccordion.vue +23 -114
  75. package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -98
  76. package/src/components/ResourceExplorer/ResourceExplorer.vue +102 -210
  77. package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +74 -0
  78. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +103 -71
  79. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +143 -291
  80. package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
  81. package/src/components/ResourceExplorer/ResourceSelector.vue +51 -0
  82. package/src/components/ResourceExplorer/ResourceViewerHeader.vue +115 -0
  83. package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +94 -0
  84. package/src/components/ResourceListItem.vue +154 -0
  85. package/src/components/ReuseCard.vue +14 -6
  86. package/src/components/ReuseDetails.vue +2 -2
  87. package/src/components/ReuseHorizontalCard.vue +2 -2
  88. package/src/components/SchemaCard.vue +10 -1
  89. package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
  90. package/src/components/Search/GlobalSearch.vue +219 -117
  91. package/src/components/Search/SearchInput.vue +5 -4
  92. package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
  93. package/src/components/TabularExplorer/TabularCell.vue +50 -0
  94. package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
  95. package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
  96. package/src/components/TabularExplorer/TabularExplorer.vue +299 -0
  97. package/src/components/TabularExplorer/TabularFilterContent.vue +362 -0
  98. package/src/components/TabularExplorer/TabularFilterPopover.vue +106 -0
  99. package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
  100. package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
  101. package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
  102. package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
  103. package/src/components/TabularExplorer/TabularTable.vue +481 -0
  104. package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
  105. package/src/components/TabularExplorer/types.ts +81 -0
  106. package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
  107. package/src/components/TabularExplorer/useTabularContext.ts +82 -0
  108. package/src/composables/useActiveDescendant.ts +5 -0
  109. package/src/composables/useDatasetResources.ts +164 -0
  110. package/src/composables/useHasTabularData.ts +15 -1
  111. package/src/composables/useMetrics.ts +1 -1
  112. package/src/composables/useResizable.ts +46 -0
  113. package/src/composables/useResourceCapabilities.ts +47 -21
  114. package/src/composables/useSearchFilter.ts +120 -0
  115. package/src/composables/useStableQueryParams.ts +38 -6
  116. package/src/composables/useTabularProfile.ts +70 -0
  117. package/src/config.ts +21 -3
  118. package/src/functions/activities.ts +3 -3
  119. package/src/functions/api.ts +20 -42
  120. package/src/functions/api.types.ts +1 -0
  121. package/src/functions/charts.ts +99 -0
  122. package/src/functions/datasets.ts +0 -17
  123. package/src/functions/dates.ts +3 -2
  124. package/src/functions/metrics.ts +6 -4
  125. package/src/functions/resources.ts +136 -1
  126. package/src/functions/schemas.ts +27 -0
  127. package/src/functions/tabular.ts +214 -0
  128. package/src/functions/tabularApi.ts +96 -11
  129. package/src/main.ts +117 -14
  130. package/src/types/dataservices.ts +17 -0
  131. package/src/types/organizations.ts +10 -0
  132. package/src/types/pages.ts +0 -5
  133. package/src/types/posts.ts +2 -2
  134. package/src/types/reports.ts +5 -1
  135. package/src/types/resources.ts +0 -1
  136. package/src/types/reuses.ts +12 -1
  137. package/src/types/search.ts +63 -1
  138. package/src/types/site.ts +5 -3
  139. package/src/types/ui.ts +2 -0
  140. package/src/types/users.ts +2 -1
  141. package/src/types/visualizations.ts +93 -0
  142. package/assets/swagger-themes/newspaper.css +0 -1670
  143. package/dist/JsonPreview.client-CYxmz0yV.js +0 -72
  144. package/dist/Pmtiles.client-C_hvRDuy.js +0 -25185
  145. package/dist/Swagger.client-B4y0hXME.js +0 -4
  146. package/dist/XmlPreview.client-LETEfNBH.js +0 -64
  147. package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
  148. package/src/functions/pagination.ts +0 -9
  149. /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
  150. /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
  151. /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
package/README.md CHANGED
@@ -65,7 +65,7 @@ app.vueApp.use(datagouv, {
65
65
  `@datagouv/components` is using [TailwindCSS](https://tailwindcss.com/docs) and some [DSFR](https://www.systeme-de-design.gouv.fr/) right now. The user needs to provide the correct version of the DSFR. Concerning TailwindCSS, there are two modes:
66
66
 
67
67
  1. If the user is using TailwindCSS, it can import a full TailwindCSS config with `@import "@datagouv/components-next/assets/main.css";`, then build the CSS via TailwindCSS CLI or Vite plugin.
68
- 2. If the user is not using TailwindCSS, it can import an already built CSS file with `@import '@datagouv/components-next/dist/components.css';`. Note @dev, this file should be built before publishing the package to NPM with `npm run css`. For more details on the [technology stack](../README.md#-technology-stack), see the main README.
68
+ 2. If the user is not using TailwindCSS, it can import an already built CSS file with `@import '@datagouv/components-next/dist/components.css';`. Note @dev, this file should be built before publishing the package to PNPM with `pnpm run css`. For more details on the [technology stack](../README.md#-technology-stack), see the main README.
69
69
 
70
70
  ### I18n
71
71
 
@@ -94,8 +94,8 @@ For general development guidelines and contributing, see the [contributing secti
94
94
  This component library uses both ESLint and Prettier for code quality and formatting:
95
95
 
96
96
  ```bash
97
- npm run lint # Lint and auto-fix ESLint issues
98
- npm run format # Format code with Prettier
97
+ pnpm run lint # Lint and auto-fix ESLint issues
98
+ pnpm run format # Format code with Prettier
99
99
  ```
100
100
 
101
101
  **Note:** Make sure to run both commands before submitting contributions to ensure consistent code style.
@@ -172,10 +172,10 @@ To make a new release, you have to :
172
172
 
173
173
  ### Update the version
174
174
 
175
- Use the dedicated npm command, with the correct parameter :
175
+ Use the dedicated pnpm command, with the correct parameter :
176
176
 
177
177
  ```
178
- npm version VERSION
178
+ pnpm version VERSION
179
179
  ```
180
180
 
181
181
  Where VERSION is :
@@ -187,7 +187,8 @@ Additional labels for pre-release and build metadata are available as extensions
187
187
  ### Publish to NPM
188
188
 
189
189
  ```
190
- npm run publish-stable
190
+ pnpm login
191
+ pnpm run publish-stable
191
192
  ```
192
193
 
193
194
  ## 📄 License
package/assets/main.css CHANGED
@@ -182,6 +182,10 @@
182
182
  }
183
183
 
184
184
  @layer components {
185
+ .input {
186
+ @apply block w-full rounded-t text-base leading-6 py-2 px-4 text-gray-plain bg-gray-lower! placeholder:opacity-100 placeholder:italic placeholder:text-gray-medium;
187
+ }
188
+
185
189
  .subtitle {
186
190
  @apply text-sm! font-bold! leading-5!;
187
191
  }
@@ -1,4 +1,4 @@
1
- import { B as o, u as h, V as m, l as c } from "./proj-DsetBcW7.js";
1
+ import { B as o, u as h, V as m, l as c } from "./proj-DxGbobp7.js";
2
2
  const g = {
3
3
  /**
4
4
  * Triggered after a map frame is rendered.
@@ -1,24 +1,24 @@
1
- import { defineComponent as l, computed as a, createElementBlock as o, openBlock as t, createBlock as u, createElementVNode as f, withCtx as p, createTextVNode as m, toDisplayString as _, unref as h } from "vue";
2
- import { a as x, _ as g } from "./main-vqhkVhVS.js";
3
- const v = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], $ = /* @__PURE__ */ l({
1
+ import { defineComponent as u, computed as a, openBlock as t, createElementBlock as o, createElementVNode as l, createBlock as f, withCtx as p, createTextVNode as m, toDisplayString as _, unref as x } from "vue";
2
+ import { a as h, d as v } from "./main-DD4ieUAo.js";
3
+ const g = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], B = /* @__PURE__ */ u({
4
4
  __name: "Datafair.client",
5
5
  props: {
6
6
  resource: {},
7
7
  dataset: {}
8
8
  },
9
9
  setup(c) {
10
- const e = c, { t: i } = x(), r = a(() => e.resource.extras.datafairOrigin || e.dataset.extras.datafairOrigin), s = a(() => e.resource.extras.datafairDatasetId || e.dataset.extras.datafairDatasetId), d = a(() => e.resource.extras.datafairEmbed), n = a(() => !r.value || !s.value ? null : `${r.value}/embed/dataset/${s.value}/${d.value}`);
11
- return (D, y) => (t(), o("div", v, [
10
+ const e = c, { t: i } = h(), r = a(() => e.resource.extras.datafairOrigin || e.dataset.extras.datafairOrigin), s = a(() => e.resource.extras.datafairDatasetId || e.dataset.extras.datafairDatasetId), d = a(() => e.resource.extras.datafairEmbed), n = a(() => !r.value || !s.value ? null : `${r.value}/embed/dataset/${s.value}/${d.value}`);
11
+ return (D, y) => (t(), o("div", g, [
12
12
  n.value ? (t(), o("div", b, [
13
- f("iframe", {
13
+ l("iframe", {
14
14
  src: n.value,
15
15
  width: "100%",
16
16
  height: "500px",
17
17
  style: { "background-color": "transparent", border: "none" }
18
18
  }, null, 8, k)
19
- ])) : (t(), u(g, { key: 1 }, {
19
+ ])) : (t(), f(v, { key: 1 }, {
20
20
  default: p(() => [
21
- m(_(h(i)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
21
+ m(_(x(i)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le pour le consulter.")), 1)
22
22
  ]),
23
23
  _: 1
24
24
  }))
@@ -26,5 +26,5 @@ const v = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], $ = /* @__PURE_
26
26
  }
27
27
  });
28
28
  export {
29
- $ as default
29
+ B as default
30
30
  };
@@ -1,7 +1,7 @@
1
- import { H as x } from "./View-BR92hTWP.js";
2
- import { a as I } from "./common-PJfpC179.js";
3
- import { B as C, a7 as h, al as m, u as S, l as p, E as N, i as L, a4 as P, J as Z } from "./proj-DsetBcW7.js";
4
- import { c as T } from "./Image-34hvypZI.js";
1
+ import { I as x } from "./View-BYBpt-AU.js";
2
+ import { a as I } from "./common-BoeTUnDZ.js";
3
+ import { B as C, a6 as h, al as m, u as S, l as p, E as N, i as L, a3 as P, G as Z } from "./proj-DxGbobp7.js";
4
+ import { c as T } from "./Image-mNMBOofs.js";
5
5
  const n = {
6
6
  OPACITY: "opacity",
7
7
  VISIBLE: "visible",
@@ -16,7 +16,7 @@ const n = {
16
16
  };
17
17
  class D extends C {
18
18
  /**
19
- * @param {Options} options Layer options.
19
+ * @param {Options<NoInfer<Properties>>} options Layer options.
20
20
  */
21
21
  constructor(e) {
22
22
  super(), this.on, this.once, this.un, this.background_ = e.background;
@@ -313,9 +313,9 @@ const K = {
313
313
  */
314
314
  RENDERCOMPLETE: "rendercomplete"
315
315
  };
316
- class G extends D {
316
+ class q extends D {
317
317
  /**
318
- * @param {Options<SourceType>} options Layer options.
318
+ * @param {Options<SourceType, NoInfer<Properties>>} options Layer options.
319
319
  */
320
320
  constructor(e) {
321
321
  const r = Object.assign({}, e);
@@ -393,15 +393,15 @@ class G extends D {
393
393
  }, 0))), this.changed();
394
394
  }
395
395
  /**
396
- * @param {import("../pixel").Pixel} pixel Pixel.
397
- * @return {Promise<Array<import("../Feature").FeatureLike>>} Promise that resolves with
396
+ * @param {import("../pixel.js").Pixel} pixel Pixel.
397
+ * @return {Promise<Array<import("../Feature.js").FeatureLike>>} Promise that resolves with
398
398
  * an array of features.
399
399
  */
400
400
  getFeatures(e) {
401
401
  return this.renderer_ ? this.renderer_.getFeatures(e) : Promise.resolve([]);
402
402
  }
403
403
  /**
404
- * @param {import("../pixel").Pixel} pixel Pixel.
404
+ * @param {import("../pixel.js").Pixel} pixel Pixel.
405
405
  * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
406
406
  */
407
407
  getData(e) {
@@ -600,7 +600,7 @@ const B = /^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01])
600
600
  function f(t, e) {
601
601
  return t.endsWith("%") ? Number(t.substring(0, t.length - 1)) / e : Number(t);
602
602
  }
603
- function d(t) {
603
+ function l(t) {
604
604
  throw new Error('failed to parse "' + t + '" as color');
605
605
  }
606
606
  function A(t) {
@@ -615,7 +615,7 @@ function A(t) {
615
615
  o !== void 0 ? h(f(o, 100), 0, 1) : 1
616
616
  ];
617
617
  }
618
- d(t);
618
+ l(t);
619
619
  }
620
620
  if (t.startsWith("#")) {
621
621
  if (F.test(t)) {
@@ -626,12 +626,12 @@ function A(t) {
626
626
  }
627
627
  return u[3] = u[3] / 255, u;
628
628
  }
629
- d(t);
629
+ l(t);
630
630
  }
631
631
  const e = V();
632
632
  e.fillStyle = "#abcdef";
633
633
  let r = e.fillStyle;
634
- e.fillStyle = t, e.fillStyle === r && (e.fillStyle = "#fedcba", r = e.fillStyle, e.fillStyle = t, e.fillStyle === r && d(t));
634
+ e.fillStyle = t, e.fillStyle === r && (e.fillStyle = "#fedcba", r = e.fillStyle, e.fillStyle = t, e.fillStyle === r && l(t));
635
635
  const s = e.fillStyle;
636
636
  if (s.startsWith("#") || s.startsWith("rgba"))
637
637
  return A(s);
@@ -640,9 +640,9 @@ function A(t) {
640
640
  return i[3] = P(i[3] / 255, 3), i;
641
641
  }
642
642
  function v(t) {
643
- return typeof t == "string" ? t : H(t);
643
+ return typeof t == "string" ? t : W(t);
644
644
  }
645
- const k = 1024, l = {};
645
+ const k = 1024, d = {};
646
646
  let R = 0;
647
647
  function J(t) {
648
648
  if (t.length === 4)
@@ -650,10 +650,10 @@ function J(t) {
650
650
  const e = t.slice();
651
651
  return e[3] = 1, e;
652
652
  }
653
- function E(t) {
653
+ function M(t) {
654
654
  return t > 31308e-7 ? Math.pow(t, 1 / 2.4) * 269.025 - 14.025 : t * 3294.6;
655
655
  }
656
- function M(t) {
656
+ function E(t) {
657
657
  return t > 0.2068965 ? Math.pow(t, 3) : (t - 4 / 29) * (108 / 841);
658
658
  }
659
659
  function O(t) {
@@ -672,7 +672,7 @@ function Q(t) {
672
672
  ];
673
673
  }
674
674
  function ee(t) {
675
- const e = (t[0] + 16) / 116, r = t[1], s = t[2] * Math.PI / 180, i = M(e), a = M(e + r / 500 * Math.cos(s)), o = M(e - r / 200 * Math.sin(s)), u = E(a * 3.021973625 - i * 1.617392459 - o * 0.404875592), c = E(a * -0.943766287 + i * 1.916279586 + o * 0.027607165), g = E(a * 0.069407491 - i * 0.22898585 + o * 1.159737864);
675
+ const e = (t[0] + 16) / 116, r = t[1], s = t[2] * Math.PI / 180, i = E(e), a = E(e + r / 500 * Math.cos(s)), o = E(e - r / 200 * Math.sin(s)), u = M(a * 3.021973625 - i * 1.617392459 - o * 0.404875592), c = M(a * -0.943766287 + i * 1.916279586 + o * 0.027607165), g = M(a * 0.069407491 - i * 0.22898585 + o * 1.159737864);
676
676
  return [
677
677
  h(u + 0.5 | 0, 0, 255),
678
678
  h(c + 0.5 | 0, 0, 255),
@@ -683,23 +683,23 @@ function ee(t) {
683
683
  function j(t) {
684
684
  if (t === "none")
685
685
  return U;
686
- if (l.hasOwnProperty(t))
687
- return l[t];
686
+ if (d.hasOwnProperty(t))
687
+ return d[t];
688
688
  if (R >= k) {
689
689
  let r = 0;
690
- for (const s in l)
691
- (r++ & 3) === 0 && (delete l[s], --R);
690
+ for (const s in d)
691
+ (r++ & 3) === 0 && (delete d[s], --R);
692
692
  }
693
693
  const e = A(t);
694
- e.length !== 4 && d(t);
694
+ e.length !== 4 && l(t);
695
695
  for (const r of e)
696
- isNaN(r) && d(t);
697
- return l[t] = e, ++R, e;
696
+ isNaN(r) && l(t);
697
+ return d[t] = e, ++R, e;
698
698
  }
699
699
  function te(t) {
700
700
  return Array.isArray(t) ? t : j(t);
701
701
  }
702
- function H(t) {
702
+ function W(t) {
703
703
  let e = t[0];
704
704
  e != (e | 0) && (e = e + 0.5 | 0);
705
705
  let r = t[1];
@@ -723,16 +723,16 @@ class re extends Z {
723
723
  }
724
724
  export {
725
725
  D as B,
726
- K as E,
727
- G as L,
726
+ q as L,
728
727
  U as N,
729
- re as R,
728
+ K as R,
730
729
  te as a,
731
730
  v as b,
731
+ re as c,
732
732
  j as f,
733
733
  X as i,
734
734
  ee as l,
735
735
  Q as r,
736
- H as t,
736
+ W as t,
737
737
  J as w
738
738
  };
@@ -1,7 +1,7 @@
1
- import { aC as v, E as f, aq as C, aB as h, u as R } from "./proj-DsetBcW7.js";
1
+ import { aD as v, E as f, ar as C, aC as h, u as R } from "./proj-DxGbobp7.js";
2
2
  const r = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", I = r.includes("safari") && !r.includes("chrom");
3
3
  I && (r.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(r));
4
- const L = r.includes("webkit") && !r.includes("edge"), D = r.includes("macintosh"), w = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, y = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u = typeof Image < "u" && Image.prototype.decode, p = typeof createImageBitmap == "function", O = (function() {
4
+ const D = r.includes("webkit") && !r.includes("edge"), L = r.includes("macintosh"), w = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, y = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u = typeof Image < "u" && Image.prototype.decode, p = typeof createImageBitmap == "function", O = (function() {
5
5
  let e = !1;
6
6
  try {
7
7
  const t = Object.defineProperty({}, "passive", {
@@ -268,7 +268,7 @@ function g(e, t) {
268
268
  )
269
269
  ) : x(e);
270
270
  }
271
- function q(e, t) {
271
+ function Y(e, t) {
272
272
  return t && (e.src = t), e.src && u && p ? e.decode().then(() => createImageBitmap(e)).catch((n) => {
273
273
  if (e.complete && e.width)
274
274
  return e;
@@ -278,19 +278,19 @@ function q(e, t) {
278
278
  export {
279
279
  w as D,
280
280
  F as I,
281
- D as M,
281
+ L as M,
282
282
  O as P,
283
283
  _ as T,
284
- y as W,
284
+ D as W,
285
285
  M as a,
286
286
  T as b,
287
287
  m as c,
288
288
  a as d,
289
- q as e,
289
+ Y as e,
290
290
  P as f,
291
- L as g,
292
- N as h,
293
- g as i,
291
+ N as g,
292
+ g as h,
293
+ y as i,
294
294
  G as j,
295
295
  B as k,
296
296
  W as l,
@@ -0,0 +1,36 @@
1
+ import { defineComponent as _, ref as y, computed as o, openBlock as t, createElementBlock as u, createBlock as p, withCtx as f, createTextVNode as m, toDisplayString as d, unref as l } from "vue";
2
+ import { a as z, u as T, b as k, d as h } from "./main-DD4ieUAo.js";
3
+ const w = { class: "text-xs" }, B = ["src"], E = /* @__PURE__ */ _({
4
+ __name: "ImagePreview.client",
5
+ props: {
6
+ resource: {}
7
+ },
8
+ setup(a) {
9
+ const n = a, { t: r } = z(), v = T(), c = y(!1), g = o(() => n.resource.format?.toUpperCase() ?? r("Fichier")), i = o(() => k(n.resource)), x = o(() => {
10
+ const s = i.value, e = v.maxImagePreviewByteSize;
11
+ return !s || !e ? !1 : s <= e;
12
+ });
13
+ return (s, e) => (t(), u("div", w, [
14
+ x.value ? c.value ? (t(), p(h, { key: 1 }, {
15
+ default: f(() => [
16
+ m(d(l(r)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le pour le consulter.")), 1)
17
+ ]),
18
+ _: 1
19
+ })) : (t(), u("img", {
20
+ key: 2,
21
+ src: a.resource.url,
22
+ alt: "",
23
+ class: "block w-full h-auto max-w-[800px]",
24
+ onError: e[0] || (e[0] = (C) => c.value = !0)
25
+ }, null, 40, B)) : (t(), p(h, { key: 0 }, {
26
+ default: f(() => [
27
+ m(d(i.value ? l(r)("Le fichier {fileType} est trop volumineux pour être prévisualisé. Téléchargez-le pour le consulter.", { fileType: g.value }) : l(r)("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le pour le consulter.")), 1)
28
+ ]),
29
+ _: 1
30
+ }))
31
+ ]));
32
+ }
33
+ });
34
+ export {
35
+ E as default
36
+ };
@@ -0,0 +1,40 @@
1
+ import { defineComponent as c, defineAsyncComponent as u, openBlock as m, createBlock as p, unref as r, withCtx as f, createVNode as l } from "vue";
2
+ import { u as d } from "./main-DD4ieUAo.js";
3
+ import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-DeoHZXW1.js";
4
+ const J = /* @__PURE__ */ c({
5
+ __name: "JsonPreview.client",
6
+ props: {
7
+ resource: {}
8
+ },
9
+ setup(o) {
10
+ const t = u(
11
+ () => import("./vue3-json-viewer-CJLQFzXZ.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
12
+ ), n = o, s = d(), i = async () => {
13
+ const e = await fetch(n.resource.url);
14
+ if (!e.ok) throw new Error(`HTTP error! status: ${e.status}`);
15
+ return e.json();
16
+ };
17
+ return (e, w) => (m(), p(h, {
18
+ "file-type": "JSON",
19
+ resource: o.resource,
20
+ "max-size": r(s).maxJsonPreviewCharSize,
21
+ load: i
22
+ }, {
23
+ default: f(({ data: a }) => [
24
+ l(r(t), {
25
+ value: a,
26
+ boxed: "",
27
+ sort: "",
28
+ theme: "light",
29
+ "max-depth": 3,
30
+ "expand-depth": 2,
31
+ "indent-width": 2
32
+ }, null, 8, ["value"])
33
+ ]),
34
+ _: 1
35
+ }, 8, ["resource", "max-size"]));
36
+ }
37
+ });
38
+ export {
39
+ J as default
40
+ };