diff --git a/examples/demo-app/esbuild.config.mjs b/examples/demo-app/esbuild.config.mjs index f4f643a4e8..54c49d4441 100644 --- a/examples/demo-app/esbuild.config.mjs +++ b/examples/demo-app/esbuild.config.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + import esbuild from 'esbuild'; import {replace} from 'esbuild-plugin-replace'; diff --git a/examples/replace-component/esbuild.config.mjs b/examples/replace-component/esbuild.config.mjs index 956bfa34bc..a2ba859465 100644 --- a/examples/replace-component/esbuild.config.mjs +++ b/examples/replace-component/esbuild.config.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + import esbuild from 'esbuild'; import {replace} from 'esbuild-plugin-replace'; diff --git a/package.json b/package.json index 906f66aa45..a085a9a8fc 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "analyze:bundle": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack/bundle.js --progress --env.prod", "check-licence": "babel-node ./scripts/license-header/bin --license ./FILE-HEADER --dry", "add-licence": "babel-node ./scripts/license-header/bin --license ./FILE-HEADER", - "prepublishOnly": "yarn workspaces run stab && yarn workspaces run prepublish && yarn add-licence && yarn build:umd && yarn build:types", + "prepublishOnly": "yarn workspaces foreach -A run stab && yarn workspaces foreach -A run prepublish && yarn add-licence && yarn build:umd && yarn build:types", "docs": "babel-node ./scripts/documentation.js", "typedoc": "typedoc --theme markdown --out typedoc --inputFiles ./src/reducers --inputFiles ./src/actions --excludeExternals --excludeNotExported --excludePrivate", "example-version": "babel-node ./scripts/edit-version.js", @@ -157,6 +157,7 @@ "babel-plugin-search-and-replace": "^1.0.0", "babel-plugin-transform-builtin-extend": "^1.1.0", "babelify": "^10.0.0", + "css-loader": "5.2.7", "documentation": "^9.1.1", "dts-bundle-webpack": "^1.0.2", "enzyme": "^3.11.0", @@ -192,6 +193,7 @@ "sinon": "^2.4.1", "sinon-stub-promise": "^4.0.0", "source-map-loader": "^1.1.1", + "style-loader": "2.0.0", "styled-components": "^4.1.3", "stylelint": "^13.6.1", "stylelint-config-recommended": "^3.0.0", diff --git a/src/ai-assistant/src/actions.ts b/src/ai-assistant/src/actions.ts index 81b6dc34df..6f8e5259c1 100644 --- a/src/ai-assistant/src/actions.ts +++ b/src/ai-assistant/src/actions.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + import {MessageModel} from 'react-ai-assist'; import {AiAssistantConfig} from './reducers'; diff --git a/src/ai-assistant/src/constants.ts b/src/ai-assistant/src/constants.ts index ee8d4e8884..521c5fc870 100644 --- a/src/ai-assistant/src/constants.ts +++ b/src/ai-assistant/src/constants.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + export const TASK_LIST = '1. Change the basemap style.\n2. Load data from url.'; export const WELCOME_MESSAGE = `Hi, I am Kepler.gl AI Assistant!\nHere are some tasks I can help you with:\n\n${TASK_LIST}`; diff --git a/src/ai-assistant/src/localization.ts b/src/ai-assistant/src/localization.ts index ae61b66c8a..851bbed97a 100644 --- a/src/ai-assistant/src/localization.ts +++ b/src/ai-assistant/src/localization.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + // Add english messages here, other languages will use these // if translations not available for every message diff --git a/src/ai-assistant/src/reducers/index.ts b/src/ai-assistant/src/reducers/index.ts index 3e682edd7a..b5a5b812bb 100644 --- a/src/ai-assistant/src/reducers/index.ts +++ b/src/ai-assistant/src/reducers/index.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + import {Action, handleActions} from 'redux-actions'; import { UPDATE_AI_ASSISTANT_CONFIG, diff --git a/src/ai-assistant/src/tools/basemap-functions.tsx b/src/ai-assistant/src/tools/basemap-functions.tsx index 9c5c12e529..26d7847400 100644 --- a/src/ai-assistant/src/tools/basemap-functions.tsx +++ b/src/ai-assistant/src/tools/basemap-functions.tsx @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + import React, {ReactNode, useEffect, useState} from 'react'; import {MapStyleSelectorFactory, appInjector} from '@kepler.gl/components'; import {MapStyle} from '@kepler.gl/reducers'; diff --git a/src/ai-assistant/src/tools/loadurl-function.tsx b/src/ai-assistant/src/tools/loadurl-function.tsx index 3413e69dc6..76407e28dd 100644 --- a/src/ai-assistant/src/tools/loadurl-function.tsx +++ b/src/ai-assistant/src/tools/loadurl-function.tsx @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + import {addDataToMap, loadFiles} from '@kepler.gl/actions'; import {ActionHandler} from '@kepler.gl/actions'; import { diff --git a/src/components/src/hooks/use-on-click-outside.tsx b/src/components/src/hooks/use-on-click-outside.tsx index b83f18ba43..61dd5548b7 100644 --- a/src/components/src/hooks/use-on-click-outside.tsx +++ b/src/components/src/hooks/use-on-click-outside.tsx @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + // Copyright 2022 Foursquare Labs, Inc. All Rights Reserved. import document from 'global/document'; diff --git a/src/deckgl-arrow-layers/src/layers/geo-arrow-arc-layer.ts b/src/deckgl-arrow-layers/src/layers/geo-arrow-arc-layer.ts index a534fdc915..07bc1d66a0 100644 --- a/src/deckgl-arrow-layers/src/layers/geo-arrow-arc-layer.ts +++ b/src/deckgl-arrow-layers/src/layers/geo-arrow-arc-layer.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + // deck.gl-community // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors diff --git a/src/deckgl-arrow-layers/src/layers/geo-arrow-text-layer.ts b/src/deckgl-arrow-layers/src/layers/geo-arrow-text-layer.ts index 4c00aee849..14dc2df6dd 100644 --- a/src/deckgl-arrow-layers/src/layers/geo-arrow-text-layer.ts +++ b/src/deckgl-arrow-layers/src/layers/geo-arrow-text-layer.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project + // deck.gl-community // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors diff --git a/test/browser/components/side-panel/channel-by-value-selctor-test.js b/test/browser/components/side-panel/channel-by-value-selctor-test.js index b7797dcfb3..1e0cf3c368 100644 --- a/test/browser/components/side-panel/channel-by-value-selctor-test.js +++ b/test/browser/components/side-panel/channel-by-value-selctor-test.js @@ -1,5 +1,5 @@ -// // SPDX-License-Identifier: MIT -// // Copyright contributors to the kepler.gl project +// SPDX-License-Identifier: MIT +// Copyright contributors to the kepler.gl project /* eslint-disable max-statements */ diff --git a/webpack/umd.js b/webpack/umd.js index a4e9c5731f..aff69ce7b2 100644 --- a/webpack/umd.js +++ b/webpack/umd.js @@ -76,7 +76,14 @@ const LIBRARY_BUNDLE_CONFIG = () => ({ { test: /\.(js|ts|tsx)$/, loader: 'babel-loader', - include: [SRC_DIR, `${NODE_MODULES_DIR}/@loaders.gl`], + include: [ + SRC_DIR, + `${NODE_MODULES_DIR}/@loaders.gl`, + `${NODE_MODULES_DIR}/@deck.gl`, + `${NODE_MODULES_DIR}/@math.gl`, + `${NODE_MODULES_DIR}/react-ai-assist`, + `${NODE_MODULES_DIR}/@geoarrow` + ], options: { plugins: [ [ @@ -93,11 +100,21 @@ const LIBRARY_BUNDLE_CONFIG = () => ({ ] } }, + // Add css loader for ai-assistant + { + test: /\.css$/, + use: ['style-loader', 'css-loader'] + }, // for compiling apache-arrow ESM module { test: /\.mjs$/, include: /node_modules\/apache-arrow/, type: 'javascript/auto' + }, + { + test: /\.js$/, + loader: require.resolve('@open-wc/webpack-import-meta-loader'), + include: [/node_modules\/parquet-wasm/] } ] }, diff --git a/yarn.lock b/yarn.lock index 8d3c354c39..b5e615e83e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13306,6 +13306,26 @@ __metadata: languageName: node linkType: hard +"css-loader@npm:5.2.7": + version: 5.2.7 + resolution: "css-loader@npm:5.2.7" + dependencies: + icss-utils: "npm:^5.1.0" + loader-utils: "npm:^2.0.0" + postcss: "npm:^8.2.15" + postcss-modules-extract-imports: "npm:^3.0.0" + postcss-modules-local-by-default: "npm:^4.0.0" + postcss-modules-scope: "npm:^3.0.0" + postcss-modules-values: "npm:^4.0.0" + postcss-value-parser: "npm:^4.1.0" + schema-utils: "npm:^3.0.0" + semver: "npm:^7.3.5" + peerDependencies: + webpack: ^4.27.0 || ^5.0.0 + checksum: 10c0/02fbdb0dca92e4a4d2aa27b2817ea51d0af3d662d3295c61f2aa37537b29f9a46a9c2e87d8f5e40a1a97159f35d5c7b9a325f27761b59a38c8e15e8ca3988d2b + languageName: node + linkType: hard + "css-select@npm:^4.1.3": version: 4.3.0 resolution: "css-select@npm:4.3.0" @@ -17918,6 +17938,15 @@ __metadata: languageName: node linkType: hard +"icss-utils@npm:^5.0.0, icss-utils@npm:^5.1.0": + version: 5.1.0 + resolution: "icss-utils@npm:5.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10c0/39c92936fabd23169c8611d2b5cc39e39d10b19b0d223352f20a7579f75b39d5f786114a6b8fc62bee8c5fed59ba9e0d38f7219a4db383e324fb3061664b043d + languageName: node + linkType: hard + "ieee754@npm:^1.1.12, ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -19998,6 +20027,7 @@ __metadata: babel-plugin-search-and-replace: "npm:^1.0.0" babel-plugin-transform-builtin-extend: "npm:^1.1.0" babelify: "npm:^10.0.0" + css-loader: "npm:5.2.7" documentation: "npm:^9.1.1" dts-bundle-webpack: "npm:^1.0.2" enzyme: "npm:^3.11.0" @@ -20034,6 +20064,7 @@ __metadata: sinon: "npm:^2.4.1" sinon-stub-promise: "npm:^4.0.0" source-map-loader: "npm:^1.1.1" + style-loader: "npm:2.0.0" styled-components: "npm:^4.1.3" stylelint: "npm:^13.6.1" stylelint-config-recommended: "npm:^3.0.0" @@ -23561,6 +23592,50 @@ __metadata: languageName: node linkType: hard +"postcss-modules-extract-imports@npm:^3.0.0": + version: 3.1.0 + resolution: "postcss-modules-extract-imports@npm:3.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10c0/402084bcab376083c4b1b5111b48ec92974ef86066f366f0b2d5b2ac2b647d561066705ade4db89875a13cb175b33dd6af40d16d32b2ea5eaf8bac63bd2bf219 + languageName: node + linkType: hard + +"postcss-modules-local-by-default@npm:^4.0.0": + version: 4.1.0 + resolution: "postcss-modules-local-by-default@npm:4.1.0" + dependencies: + icss-utils: "npm:^5.0.0" + postcss-selector-parser: "npm:^7.0.0" + postcss-value-parser: "npm:^4.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10c0/d6e47d2488c6fcde2c91696d15ef094e6b1cdd8d5dcdf20c6ac72567fcc4778f5f80b8381839232b37242f200b4d83e98a947bf3b3315b0bf673ea42528a3caf + languageName: node + linkType: hard + +"postcss-modules-scope@npm:^3.0.0": + version: 3.2.1 + resolution: "postcss-modules-scope@npm:3.2.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10c0/bd2d81f79e3da0ef6365b8e2c78cc91469d05b58046b4601592cdeef6c4050ed8fe1478ae000a1608042fc7e692cb51fecbd2d9bce3f4eace4d32e883ffca10b + languageName: node + linkType: hard + +"postcss-modules-values@npm:^4.0.0": + version: 4.0.0 + resolution: "postcss-modules-values@npm:4.0.0" + dependencies: + icss-utils: "npm:^5.0.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10c0/dd18d7631b5619fb9921b198c86847a2a075f32e0c162e0428d2647685e318c487a2566cc8cc669fc2077ef38115cde7a068e321f46fb38be3ad49646b639dbc + languageName: node + linkType: hard + "postcss-nested@npm:^6.2.0": version: 6.2.0 resolution: "postcss-nested@npm:6.2.0" @@ -23627,6 +23702,16 @@ __metadata: languageName: node linkType: hard +"postcss-selector-parser@npm:^7.0.0": + version: 7.0.0 + resolution: "postcss-selector-parser@npm:7.0.0" + dependencies: + cssesc: "npm:^3.0.0" + util-deprecate: "npm:^1.0.2" + checksum: 10c0/e96e096afcce70bf5c97789f5ea09d7415ae5eb701d82b05b5e8532885d31363b484fcb1ca9488c9a331f30508d9e5bb6c3109eb2eb5067ef3d3919f9928cd9d + languageName: node + linkType: hard + "postcss-syntax@npm:^0.36.2": version: 0.36.2 resolution: "postcss-syntax@npm:0.36.2" @@ -23660,7 +23745,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.45, postcss@npm:^8.4.47": +"postcss@npm:^8.2.15, postcss@npm:^8.4.45, postcss@npm:^8.4.47": version: 8.4.49 resolution: "postcss@npm:8.4.49" dependencies: @@ -27332,6 +27417,18 @@ __metadata: languageName: node linkType: hard +"style-loader@npm:2.0.0": + version: 2.0.0 + resolution: "style-loader@npm:2.0.0" + dependencies: + loader-utils: "npm:^2.0.0" + schema-utils: "npm:^3.0.0" + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + checksum: 10c0/6febd1809b4f67a722e4e366fa3b3f8e1083425f7214b7a8962cf53aa7cc9c522623fb55a5e64049e46d637bbbda3b29ebbe14ec9f7652b27345450fcef6ea80 + languageName: node + linkType: hard + "style-search@npm:^0.1.0": version: 0.1.0 resolution: "style-search@npm:0.1.0"