@featurevisor/site 0.55.0 → 0.56.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.
- package/.eslintcache +1 -1
- package/.eslintrc.js +1 -0
- package/CHANGELOG.md +19 -0
- package/dist/favicon-128.png +0 -0
- package/dist/index.html +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/lib/components/SearchInput.d.ts +2 -7
- package/lib/hooks/useSearch.d.ts +16 -0
- package/lib/hooks/useSearchIndex.d.ts +4 -0
- package/lib/index.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/mock/search-index.json +278 -0
- package/package.json +12 -8
- package/postcss.config.js +6 -0
- package/public/index.html +1 -4
- package/src/components/HistoryTimeline.tsx +1 -1
- package/src/components/ListAttributes.tsx +3 -11
- package/src/components/ListFeatures.tsx +3 -11
- package/src/components/ListSegments.tsx +3 -11
- package/src/components/SearchInput.tsx +6 -8
- package/src/components/ShowAttribute.tsx +1 -1
- package/src/components/ShowFeature.tsx +1 -1
- package/src/components/ShowSegment.tsx +1 -1
- package/src/hooks/useSearch.ts +41 -0
- package/src/hooks/useSearchIndex.ts +12 -0
- package/src/index.tsx +5 -3
- package/src/utils/index.ts +2 -2
- package/tailwind.config.js +2 -2
- package/tsconfig.cjs.json +1 -1
- package/types/assets.d.ts +27 -0
- package/types/styles.d.ts +4 -0
- package/{webpack.config.js → webpack.common.js} +10 -2
- package/webpack.dev.js +27 -0
- package/webpack.prod.js +20 -0
- package/dist/index.css +0 -2183
- package/lib/hooks/searchIndexHook.d.ts +0 -1
- package/src/hooks/searchIndexHook.ts +0 -9
package/tailwind.config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @type {import('tailwindcss').Config} */
|
|
2
2
|
module.exports = {
|
|
3
|
-
content: ["./
|
|
3
|
+
content: ["./public/index.html", "./src/**/*.{ts,tsx}"],
|
|
4
4
|
theme: {
|
|
5
5
|
extend: {},
|
|
6
6
|
},
|
|
7
|
-
plugins: [
|
|
7
|
+
plugins: [],
|
|
8
8
|
};
|
package/tsconfig.cjs.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare module "*.png" {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module "*.svg" {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from "react";
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
declare module "*.jpg" {
|
|
13
|
+
const value: any;
|
|
14
|
+
export = value;
|
|
15
|
+
}
|
|
16
|
+
declare module "*.jpeg" {
|
|
17
|
+
const value: any;
|
|
18
|
+
export = value;
|
|
19
|
+
}
|
|
20
|
+
declare module "*.gif" {
|
|
21
|
+
const value: any;
|
|
22
|
+
export = value;
|
|
23
|
+
}
|
|
24
|
+
declare module "*.bmp" {
|
|
25
|
+
const value: any;
|
|
26
|
+
export = value;
|
|
27
|
+
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
|
+
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
2
3
|
|
|
3
4
|
const getWebpackConfig = require("../../tools/getWebpackConfig");
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
+
const webpackConfig = getWebpackConfig({
|
|
6
7
|
entryFilePath: path.join(__dirname, "src", "index.tsx"),
|
|
7
8
|
entryKey: "index",
|
|
8
9
|
outputDirectoryPath: path.join(__dirname, "dist"),
|
|
9
10
|
outputLibrary: "FeaturevisorSite",
|
|
10
11
|
tsConfigFilePath: path.join(__dirname, "tsconfig.cjs.json"),
|
|
11
12
|
enableCssModules: true,
|
|
13
|
+
enableTailwind: true,
|
|
14
|
+
enableAssets: true,
|
|
15
|
+
plugins: [
|
|
16
|
+
new HtmlWebpackPlugin({
|
|
17
|
+
template: path.join(__dirname, "public", "index.html"),
|
|
18
|
+
}),
|
|
19
|
+
],
|
|
12
20
|
});
|
|
13
21
|
|
|
14
|
-
module.exports =
|
|
22
|
+
module.exports = webpackConfig;
|
package/webpack.dev.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const { merge } = require("webpack-merge");
|
|
3
|
+
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
4
|
+
|
|
5
|
+
const webpackCommon = require("./webpack.common");
|
|
6
|
+
|
|
7
|
+
const webpackConfig = merge(webpackCommon, {
|
|
8
|
+
devtool: "eval-source-map",
|
|
9
|
+
plugins: [
|
|
10
|
+
new HtmlWebpackPlugin({
|
|
11
|
+
template: path.join(__dirname, "public", "index.html"),
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
14
|
+
devServer: {
|
|
15
|
+
static: [
|
|
16
|
+
{
|
|
17
|
+
directory: path.join(__dirname, "public"),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
directory: path.join(__dirname, "mock"),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
hot: true,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
module.exports = webpackConfig;
|
package/webpack.prod.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { merge } = require("webpack-merge");
|
|
2
|
+
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
3
|
+
const webpackCommon = require("./webpack.common");
|
|
4
|
+
|
|
5
|
+
const webpackConfig = merge(webpackCommon, {
|
|
6
|
+
plugins: [
|
|
7
|
+
new CopyWebpackPlugin({
|
|
8
|
+
patterns: [
|
|
9
|
+
{
|
|
10
|
+
from: "public",
|
|
11
|
+
globOptions: {
|
|
12
|
+
ignore: ["**/index.html"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
}),
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
module.exports = webpackConfig;
|