@datagouv/components-next 1.0.1 → 1.0.2-dev.0

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 (33) hide show
  1. package/dist/{Control-BNCDn-8E.js → Control-DuZJdKV_.js} +1 -1
  2. package/dist/{Datafair.client-B5lBpOl8.js → Datafair.client-DpeBuzZZ.js} +1 -1
  3. package/dist/{Event-BOgJUhNR.js → Event--kp8kMdJ.js} +21 -21
  4. package/dist/{Image-BN-4XkIn.js → Image-34hvypZI.js} +114 -58
  5. package/dist/{JsonPreview.client-Doz1Z0BS.js → JsonPreview.client-B3sQR-rW.js} +1 -1
  6. package/dist/{Map-BdT3i2C4.js → Map-BjUnLyj8.js} +1534 -1466
  7. package/dist/{MapContainer.client-oiieO8H-.js → MapContainer.client-BA6GCqKX.js} +7 -7
  8. package/dist/{OSM-CamriM9b.js → OSM-s40W6sQ2.js} +22 -12
  9. package/dist/{PdfPreview.client-CdAhkDFJ.js → PdfPreview.client-CbeSChb8.js} +1 -1
  10. package/dist/Pmtiles.client-D8pFim1L.js +25190 -0
  11. package/dist/{ScaleLine-BiesrgOv.js → ScaleLine-KW-nXqp3.js} +2 -2
  12. package/dist/Swagger.client-B-2Q16qa.js +4 -0
  13. package/dist/{Tile-DCuqwNOI.js → Tile-DbNFNPfU.js} +189 -172
  14. package/dist/{TileImage-CmZf8EdU.js → TileImage-BsXBxMtq.js} +132 -102
  15. package/dist/{View-DcDc7N2K.js → View-BR92hTWP.js} +8 -8
  16. package/dist/{XmlPreview.client-CrjHf74q.js → XmlPreview.client-DWJt61wG.js} +2 -2
  17. package/dist/{common-C4rDcQpp.js → common-PJfpC179.js} +34 -33
  18. package/dist/components-next.css +4 -4
  19. package/dist/components-next.js +1 -1
  20. package/dist/components.css +1 -1
  21. package/dist/{index-Bbu9rOHt.js → index-DVp7Y0Xu.js} +11105 -6743
  22. package/dist/{main-CiH8ZmBI.js → main-CrSRA2X-.js} +22125 -22173
  23. package/dist/{proj-CKwYjU38.js → proj-DsetBcW7.js} +513 -498
  24. package/dist/{tilecoord-YW3qEH_j.js → tilecoord-Db24Px13.js} +242 -224
  25. package/dist/{vue3-xml-viewer.common-Bi_bsV6C.js → vue3-xml-viewer.common-BjA4LdSC.js} +1 -1
  26. package/package.json +2 -1
  27. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +1 -50
  28. package/src/composables/useResourceCapabilities.ts +1 -15
  29. package/src/functions/api.ts +3 -11
  30. package/src/types/resources.ts +0 -10
  31. package/dist/Pmtiles.client-B0v8tGJQ.js +0 -22812
  32. package/dist/Swagger.client-CsK65JnG.js +0 -4
  33. package/src/functions/resourceCapabilities.ts +0 -55
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as G, useTemplateRef as W, ref as z, onMounted as B, createBlock as F, createElementBlock as N, openBlock as u, withCtx as V, createVNode as U, createElementVNode as q, unref as m, toDisplayString as A } from "vue";
2
- import { a as D, _ as O, F as P } from "./main-CiH8ZmBI.js";
2
+ import { a as D, _ as O, F as P } from "./main-CrSRA2X-.js";
3
3
  const j = /* @__PURE__ */ G({
4
4
  __name: "MapContainer.client",
5
5
  props: {
@@ -18,13 +18,13 @@ const j = /* @__PURE__ */ G({
18
18
  { default: C },
19
19
  _
20
20
  ] = await Promise.all([
21
- import("./View-DcDc7N2K.js").then((t) => t.M),
22
- import("./Map-BdT3i2C4.js").then((t) => t.U),
23
- import("./ScaleLine-BiesrgOv.js"),
24
- import("./Tile-DCuqwNOI.js").then((t) => t.d),
25
- import("./OSM-CamriM9b.js"),
21
+ import("./View-BR92hTWP.js").then((t) => t.M),
22
+ import("./Map-BjUnLyj8.js").then((t) => t.U),
23
+ import("./ScaleLine-KW-nXqp3.js"),
24
+ import("./Tile-DbNFNPfU.js").then((t) => t.d),
25
+ import("./OSM-s40W6sQ2.js"),
26
26
  // @ts-expect-error no types provided
27
- import("./index-Bbu9rOHt.js")
27
+ import("./index-DVp7Y0Xu.js")
28
28
  ]), { CRS: g, GeoportalAttribution: S, GeoportalFullScreen: M, GeoportalZoom: b, LayerImport: v, LayerSwitcher: L } = _;
29
29
  await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), g.load(), e = new s({
30
30
  target: r.value,
@@ -1,12 +1,13 @@
1
- import { T as l, c as n, e as c } from "./TileImage-CmZf8EdU.js";
2
- class u extends l {
1
+ import { W as u } from "./Image-34hvypZI.js";
2
+ import { T as d, c as o, e as m, d as s } from "./TileImage-BsXBxMtq.js";
3
+ class g extends d {
3
4
  /**
4
5
  * @param {Options} [options] XYZ options.
5
6
  */
6
7
  constructor(e) {
7
8
  e = e || {};
8
- const r = e.projection !== void 0 ? e.projection : "EPSG:3857", t = e.tileGrid !== void 0 ? e.tileGrid : n({
9
- extent: c(r),
9
+ const r = e.projection !== void 0 ? e.projection : "EPSG:3857", t = e.tileGrid !== void 0 ? e.tileGrid : o({
10
+ extent: m(r),
10
11
  maxResolution: e.maxResolution,
11
12
  maxZoom: e.maxZoom,
12
13
  minZoom: e.minZoom,
@@ -39,16 +40,16 @@ class u extends l {
39
40
  return this.gutter_;
40
41
  }
41
42
  }
42
- const d = '&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';
43
- class m extends u {
43
+ const h = '&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';
44
+ class b extends g {
44
45
  /**
45
46
  * @param {Options} [options] Open Street Map options.
46
47
  */
47
48
  constructor(e) {
48
49
  e = e || {};
49
50
  let r;
50
- e.attributions !== void 0 ? r = e.attributions : r = [d];
51
- const t = e.crossOrigin !== void 0 ? e.crossOrigin : "anonymous", a = e.url !== void 0 ? e.url : "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
51
+ e.attributions !== void 0 ? r = e.attributions : r = [h];
52
+ const t = e.crossOrigin !== void 0 ? e.crossOrigin : "anonymous", l = e.url !== void 0 ? e.url : "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
52
53
  super({
53
54
  attributions: r,
54
55
  attributionsCollapsible: !1,
@@ -57,15 +58,24 @@ class m extends u {
57
58
  interpolate: e.interpolate,
58
59
  maxZoom: e.maxZoom !== void 0 ? e.maxZoom : 19,
59
60
  reprojectionErrorThreshold: e.reprojectionErrorThreshold,
60
- tileLoadFunction: e.tileLoadFunction,
61
+ tileLoadFunction: (
62
+ /**
63
+ * @param {import("../ImageTile.js").default} tile Image tile
64
+ * @param {string} src Image src
65
+ */
66
+ (i, c) => {
67
+ const a = i.getImage();
68
+ !u && a instanceof HTMLImageElement && (a.referrerPolicy = "origin-when-cross-origin"), (e.tileLoadFunction || s)(i, c);
69
+ }
70
+ ),
61
71
  transition: e.transition,
62
- url: a,
72
+ url: l,
63
73
  wrapX: e.wrapX,
64
74
  zDirection: e.zDirection
65
75
  });
66
76
  }
67
77
  }
68
78
  export {
69
- d as ATTRIBUTION,
70
- m as default
79
+ h as ATTRIBUTION,
80
+ b as default
71
81
  };
@@ -12,7 +12,7 @@ var TZ = (R, l, U, Z) => ({
12
12
  }
13
13
  });
14
14
  import { defineComponent as id, ref as rl, computed as SZ, onMounted as Md, onBeforeUnmount as Jd, createElementBlock as $l, openBlock as el, createBlock as EU, createCommentVNode as Gd, Fragment as Td, renderList as Sd, toDisplayString as aU, unref as pl, withCtx as CU, createVNode as wU, createElementVNode as xU, nextTick as Xd } from "vue";
15
- import { u as Yd, a as Bd, g as ed, _ as jU, F as OU } from "./main-CiH8ZmBI.js";
15
+ import { u as Yd, a as Bd, g as ed, _ as jU, F as OU } from "./main-CrSRA2X-.js";
16
16
  var VU = {};
17
17
  VU.d = (R, l) => {
18
18
  for (var U in l)