From d232e54976119f9ae0e5f23b4d9b09771c2c9448 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Mon, 9 Dec 2024 07:48:45 +0100 Subject: [PATCH] feat: remove Style component BREAKING CHANGE: Remove `Style` component, use `styleJSON` of `MapView` instead --- __tests__/components/Style.test.js | 261 ------------ docs/components/Style.md | 11 - docs/docs.json | 17 - packages/examples/src/Examples.tsx | 6 +- .../src/examples/Map/LocalStyleJSON.tsx | 33 ++ .../src/examples/Map/ShowMapLocalStyle.tsx | 10 - .../examples/src/examples/Map/StyleJson.js | 56 --- packages/examples/src/examples/index.ts | 3 +- src/MapLibreRN.ts | 1 - src/components/Style.tsx | 371 ------------------ 10 files changed, 35 insertions(+), 734 deletions(-) delete mode 100644 __tests__/components/Style.test.js delete mode 100644 docs/components/Style.md create mode 100644 packages/examples/src/examples/Map/LocalStyleJSON.tsx delete mode 100644 packages/examples/src/examples/Map/ShowMapLocalStyle.tsx delete mode 100755 packages/examples/src/examples/Map/StyleJson.js delete mode 100644 src/components/Style.tsx diff --git a/__tests__/components/Style.test.js b/__tests__/components/Style.test.js deleted file mode 100644 index 54a789433..000000000 --- a/__tests__/components/Style.test.js +++ /dev/null @@ -1,261 +0,0 @@ -import { render } from "@testing-library/react-native"; -import React from "react"; - -import BackgroundLayer from "../../src/components/BackgroundLayer"; -import CircleLayer from "../../src/components/CircleLayer"; -import FillExtrusionLayer from "../../src/components/FillExtrusionLayer"; -import FillLayer from "../../src/components/FillLayer"; -import HeatmapLayer from "../../src/components/HeatmapLayer"; -import ImageSource from "../../src/components/ImageSource"; -import LineLayer from "../../src/components/LineLayer"; -import RasterLayer from "../../src/components/RasterLayer"; -import RasterSource from "../../src/components/RasterSource"; -import ShapeSource from "../../src/components/ShapeSource"; -import Style from "../../src/components/Style"; -import SymbolLayer from "../../src/components/SymbolLayer"; -import VectorSource from "../../src/components/VectorSource"; - -describe("Style", () => { - test("renders vectory source correctly", () => { - const vectorSource = { - type: "vector", - url: "https://demotiles.maplibre.org/tiles/tiles.json", - tiles: ["http://host1", "http://host2"], - minzoom: 1, - maxzoom: 22, - attribution: "Copyright", - scheme: "tms", - }; - - const json = { - layers: [], - sources: { - vectorSource, - }, - }; - - const { UNSAFE_getByType } = render(