@kirill.konshin/utils 0.0.19 → 0.0.20
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/.ctirc +19 -10
- package/.storybook/main.ts +1 -20
- package/.storybook/preview.ts +1 -16
- package/.turbo/turbo-build.log +9 -66
- package/CHANGELOG.md +21 -0
- package/README.md +6 -0
- package/dist/bootstrap/index.d.ts +1 -12
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -9
- package/dist/core/index.d.ts.map +1 -1
- package/dist/electron/index.d.ts +1 -2
- package/dist/electron/index.d.ts.map +1 -1
- package/dist/electron-builder/index.d.ts +1 -2
- package/dist/electron-builder/index.d.ts.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/mui/index.d.ts +1 -4
- package/dist/mui/index.d.ts.map +1 -1
- package/dist/next/index.d.ts +1 -5
- package/dist/next/index.d.ts.map +1 -1
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/react/index.d.ts +1 -5
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react-native/index.d.ts +1 -3
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/tailwind/index.d.ts +1 -2
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/worker/index.d.ts +2 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/package.json +41 -99
- package/src/bootstrap/index.ts +2 -12
- package/src/browser/index.ts +2 -0
- package/src/core/index.ts +2 -9
- package/src/electron/index.ts +2 -2
- package/src/electron-builder/index.ts +2 -2
- package/src/index.ts +12 -0
- package/src/mui/index.ts +2 -4
- package/src/next/index.ts +2 -5
- package/src/node/index.ts +2 -0
- package/src/react/index.ts +2 -5
- package/src/react-native/index.ts +2 -3
- package/src/tailwind/index.ts +2 -2
- package/src/worker/index.ts +2 -0
- package/tsconfig.json +2 -15
- package/vite.config.ts +2 -56
- package/.turbo/turbo-test.log +0 -171
- package/builders/.swcrc +0 -18
- package/builders/build.config.ts +0 -11
- package/builders/bun.build.js +0 -23
- package/builders/package.json +0 -209
- package/builders/perf.mjs +0 -63
- package/builders/rollup.config.mjs +0 -50
- package/builders/rslib.config.ts +0 -26
- package/builders/tsconfig.json +0 -21
- package/builders/tsup.config.ts +0 -20
- package/builders/turbo.json +0 -24
- package/builders/vite.config.ts +0 -37
- package/demo/worker-demo.ts +0 -73
- package/dist/bootstrap/adaptiveContainer.d.ts +0 -4
- package/dist/bootstrap/adaptiveContainer.d.ts.map +0 -1
- package/dist/bootstrap/adaptiveContainer.js +0 -11
- package/dist/bootstrap/adaptiveContainer.js.map +0 -1
- package/dist/bootstrap/controls.d.ts +0 -38
- package/dist/bootstrap/controls.d.ts.map +0 -1
- package/dist/bootstrap/controls.js +0 -78
- package/dist/bootstrap/controls.js.map +0 -1
- package/dist/bootstrap/controls.stories.d.ts +0 -9
- package/dist/bootstrap/controls.stories.d.ts.map +0 -1
- package/dist/bootstrap/error.d.ts +0 -9
- package/dist/bootstrap/error.d.ts.map +0 -1
- package/dist/bootstrap/error.js +0 -27
- package/dist/bootstrap/error.js.map +0 -1
- package/dist/bootstrap/error.stories.d.ts +0 -8
- package/dist/bootstrap/error.stories.d.ts.map +0 -1
- package/dist/bootstrap/field.d.ts +0 -11
- package/dist/bootstrap/field.d.ts.map +0 -1
- package/dist/bootstrap/field.js +0 -29
- package/dist/bootstrap/field.js.map +0 -1
- package/dist/bootstrap/field.stories.d.ts +0 -8
- package/dist/bootstrap/field.stories.d.ts.map +0 -1
- package/dist/bootstrap/footer.d.ts +0 -10
- package/dist/bootstrap/footer.d.ts.map +0 -1
- package/dist/bootstrap/footer.js +0 -45
- package/dist/bootstrap/footer.js.map +0 -1
- package/dist/bootstrap/globalLoading.d.ts +0 -6
- package/dist/bootstrap/globalLoading.d.ts.map +0 -1
- package/dist/bootstrap/globalLoading.js +0 -10
- package/dist/bootstrap/globalLoading.js.map +0 -1
- package/dist/bootstrap/globalLoading.stories.d.ts +0 -7
- package/dist/bootstrap/globalLoading.stories.d.ts.map +0 -1
- package/dist/bootstrap/index.js +0 -35
- package/dist/bootstrap/loading.d.ts +0 -10
- package/dist/bootstrap/loading.d.ts.map +0 -1
- package/dist/bootstrap/loading.js +0 -19
- package/dist/bootstrap/loading.js.map +0 -1
- package/dist/bootstrap/loading.stories.d.ts +0 -9
- package/dist/bootstrap/loading.stories.d.ts.map +0 -1
- package/dist/bootstrap/responsiveHelper.d.ts +0 -8
- package/dist/bootstrap/responsiveHelper.d.ts.map +0 -1
- package/dist/bootstrap/responsiveHelper.js +0 -46
- package/dist/bootstrap/responsiveHelper.js.map +0 -1
- package/dist/bootstrap/screen.d.ts +0 -22
- package/dist/bootstrap/screen.d.ts.map +0 -1
- package/dist/bootstrap/screen.js +0 -80
- package/dist/bootstrap/screen.js.map +0 -1
- package/dist/bootstrap/screen.stories.d.ts +0 -14
- package/dist/bootstrap/screen.stories.d.ts.map +0 -1
- package/dist/bootstrap/toaster.d.ts +0 -11
- package/dist/bootstrap/toaster.d.ts.map +0 -1
- package/dist/bootstrap/toaster.js +0 -34
- package/dist/bootstrap/toaster.js.map +0 -1
- package/dist/bootstrap/toaster.stories.d.ts +0 -8
- package/dist/bootstrap/toaster.stories.d.ts.map +0 -1
- package/dist/bootstrap/useModal.d.ts +0 -23
- package/dist/bootstrap/useModal.d.ts.map +0 -1
- package/dist/bootstrap/useModal.js +0 -50
- package/dist/bootstrap/useModal.js.map +0 -1
- package/dist/bootstrap/useModal.stories.d.ts +0 -9
- package/dist/bootstrap/useModal.stories.d.ts.map +0 -1
- package/dist/bootstrap/useWrappedForm.d.ts +0 -14
- package/dist/bootstrap/useWrappedForm.d.ts.map +0 -1
- package/dist/bootstrap/useWrappedForm.js +0 -32
- package/dist/bootstrap/useWrappedForm.js.map +0 -1
- package/dist/core/cache.d.ts +0 -120
- package/dist/core/cache.d.ts.map +0 -1
- package/dist/core/cache.js +0 -107
- package/dist/core/cache.js.map +0 -1
- package/dist/core/cache.test.d.ts +0 -2
- package/dist/core/cache.test.d.ts.map +0 -1
- package/dist/core/errors.d.ts +0 -2
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -15
- package/dist/core/errors.js.map +0 -1
- package/dist/core/files.d.ts +0 -4
- package/dist/core/files.d.ts.map +0 -1
- package/dist/core/files.js +0 -31
- package/dist/core/files.js.map +0 -1
- package/dist/core/index.js +0 -35
- package/dist/core/index.js.map +0 -1
- package/dist/core/ls.d.ts +0 -6
- package/dist/core/ls.d.ts.map +0 -1
- package/dist/core/ls.js +0 -12
- package/dist/core/ls.js.map +0 -1
- package/dist/core/measure.d.ts +0 -35
- package/dist/core/measure.d.ts.map +0 -1
- package/dist/core/measure.js +0 -60
- package/dist/core/measure.js.map +0 -1
- package/dist/core/mutex.d.ts +0 -6
- package/dist/core/mutex.d.ts.map +0 -1
- package/dist/core/mutex.js +0 -26
- package/dist/core/mutex.js.map +0 -1
- package/dist/core/worker.d.ts +0 -98
- package/dist/core/worker.d.ts.map +0 -1
- package/dist/core/worker.js +0 -240
- package/dist/core/worker.js.map +0 -1
- package/dist/core/worker.test.d.ts +0 -2
- package/dist/core/worker.test.d.ts.map +0 -1
- package/dist/core/workerUtils.d.ts +0 -3
- package/dist/core/workerUtils.d.ts.map +0 -1
- package/dist/core/workerUtils.js +0 -31
- package/dist/core/workerUtils.js.map +0 -1
- package/dist/core/wrpc.d.ts +0 -45
- package/dist/core/wrpc.d.ts.map +0 -1
- package/dist/core/wrpc.fixture.d.ts +0 -26
- package/dist/core/wrpc.fixture.d.ts.map +0 -1
- package/dist/core/wrpc.js +0 -242
- package/dist/core/wrpc.js.map +0 -1
- package/dist/core/wrpc.test.d.ts +0 -1
- package/dist/core/wrpc.test.d.ts.map +0 -1
- package/dist/electron/createWindow.d.ts +0 -23
- package/dist/electron/createWindow.d.ts.map +0 -1
- package/dist/electron/createWindow.js +0 -160
- package/dist/electron/createWindow.js.map +0 -1
- package/dist/electron/index.js +0 -9
- package/dist/electron/index.js.map +0 -1
- package/dist/electron/updater.d.ts +0 -2
- package/dist/electron/updater.d.ts.map +0 -1
- package/dist/electron/updater.js +0 -47
- package/dist/electron/updater.js.map +0 -1
- package/dist/electron-builder/builder.d.ts +0 -8
- package/dist/electron-builder/builder.d.ts.map +0 -1
- package/dist/electron-builder/builder.js +0 -130
- package/dist/electron-builder/builder.js.map +0 -1
- package/dist/electron-builder/images.d.ts +0 -7
- package/dist/electron-builder/images.d.ts.map +0 -1
- package/dist/electron-builder/images.js +0 -25
- package/dist/electron-builder/images.js.map +0 -1
- package/dist/electron-builder/index.js +0 -7
- package/dist/electron-builder/index.js.map +0 -1
- package/dist/mui/formControlFieldset.d.ts +0 -5
- package/dist/mui/formControlFieldset.d.ts.map +0 -1
- package/dist/mui/formControlFieldset.js +0 -28
- package/dist/mui/formControlFieldset.js.map +0 -1
- package/dist/mui/formControlFieldset.stories.d.ts +0 -7
- package/dist/mui/formControlFieldset.stories.d.ts.map +0 -1
- package/dist/mui/formLabelLegend.d.ts +0 -4
- package/dist/mui/formLabelLegend.d.ts.map +0 -1
- package/dist/mui/formLabelLegend.js +0 -12
- package/dist/mui/formLabelLegend.js.map +0 -1
- package/dist/mui/genericControl.d.ts +0 -7
- package/dist/mui/genericControl.d.ts.map +0 -1
- package/dist/mui/genericControl.js +0 -21
- package/dist/mui/genericControl.js.map +0 -1
- package/dist/mui/index.js +0 -11
- package/dist/mui/index.js.map +0 -1
- package/dist/mui/readOnly.d.ts +0 -6
- package/dist/mui/readOnly.d.ts.map +0 -1
- package/dist/mui/readOnly.js +0 -7
- package/dist/mui/readOnly.js.map +0 -1
- package/dist/next/appLink.d.ts +0 -8
- package/dist/next/appLink.d.ts.map +0 -1
- package/dist/next/appLink.js +0 -34
- package/dist/next/appLink.js.map +0 -1
- package/dist/next/index.js +0 -15
- package/dist/next/index.js.map +0 -1
- package/dist/next/measure.d.ts +0 -15
- package/dist/next/measure.d.ts.map +0 -1
- package/dist/next/measure.js +0 -9
- package/dist/next/measure.js.map +0 -1
- package/dist/next/noSSR.d.ts +0 -29
- package/dist/next/noSSR.d.ts.map +0 -1
- package/dist/next/noSSR.js +0 -13
- package/dist/next/noSSR.js.map +0 -1
- package/dist/next/redirect.d.ts +0 -6
- package/dist/next/redirect.d.ts.map +0 -1
- package/dist/next/useIsInner.d.ts +0 -3
- package/dist/next/useIsInner.d.ts.map +0 -1
- package/dist/next/useIsInner.js +0 -15
- package/dist/next/useIsInner.js.map +0 -1
- package/dist/react/apiCall.d.ts +0 -6
- package/dist/react/apiCall.d.ts.map +0 -1
- package/dist/react/apiCall.js +0 -24
- package/dist/react/apiCall.js.map +0 -1
- package/dist/react/form/client.d.ts +0 -7
- package/dist/react/form/client.d.ts.map +0 -1
- package/dist/react/form/client.js +0 -46
- package/dist/react/form/client.js.map +0 -1
- package/dist/react/form/form.d.ts +0 -59
- package/dist/react/form/form.d.ts.map +0 -1
- package/dist/react/form/form.js +0 -89
- package/dist/react/form/form.js.map +0 -1
- package/dist/react/form/index.d.ts +0 -3
- package/dist/react/form/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -26
- package/dist/react/index.js.map +0 -1
- package/dist/react/keyboard.d.ts +0 -10
- package/dist/react/keyboard.d.ts.map +0 -1
- package/dist/react/keyboard.js +0 -38
- package/dist/react/keyboard.js.map +0 -1
- package/dist/react/useFetch.d.ts +0 -2
- package/dist/react/useFetch.d.ts.map +0 -1
- package/dist/react/useFetch.js +0 -20
- package/dist/react/useFetch.js.map +0 -1
- package/dist/react/useFetcher.d.ts +0 -10
- package/dist/react/useFetcher.d.ts.map +0 -1
- package/dist/react/useFetcher.js +0 -43
- package/dist/react/useFetcher.js.map +0 -1
- package/dist/react-native/index.js +0 -9
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/share.d.ts +0 -9
- package/dist/react-native/share.d.ts.map +0 -1
- package/dist/react-native/share.js +0 -23
- package/dist/react-native/share.js.map +0 -1
- package/dist/react-native/update.d.ts +0 -3
- package/dist/react-native/update.d.ts.map +0 -1
- package/dist/react-native/update.js +0 -40
- package/dist/react-native/update.js.map +0 -1
- package/dist/react-native/useAppState.d.ts +0 -2
- package/dist/react-native/useAppState.d.ts.map +0 -1
- package/dist/react-native/useAppState.js +0 -18
- package/dist/react-native/useAppState.js.map +0 -1
- package/dist/tailwind/fullpage.d.ts +0 -3
- package/dist/tailwind/fullpage.d.ts.map +0 -1
- package/dist/tailwind/fullpage.js +0 -14
- package/dist/tailwind/fullpage.js.map +0 -1
- package/dist/tailwind/index.js +0 -7
- package/dist/tailwind/index.js.map +0 -1
- package/dist/tailwind/responsiveHelper.d.ts +0 -3
- package/dist/tailwind/responsiveHelper.d.ts.map +0 -1
- package/dist/tailwind/responsiveHelper.js +0 -16
- package/dist/tailwind/responsiveHelper.js.map +0 -1
- package/src/bootstrap/adaptiveContainer.tsx +0 -12
- package/src/bootstrap/controls.stories.tsx +0 -62
- package/src/bootstrap/controls.tsx +0 -119
- package/src/bootstrap/error.stories.tsx +0 -34
- package/src/bootstrap/error.tsx +0 -37
- package/src/bootstrap/field.stories.tsx +0 -42
- package/src/bootstrap/field.tsx +0 -37
- package/src/bootstrap/footer.tsx +0 -61
- package/src/bootstrap/globalLoading.stories.tsx +0 -25
- package/src/bootstrap/globalLoading.tsx +0 -19
- package/src/bootstrap/loading.stories.tsx +0 -35
- package/src/bootstrap/loading.tsx +0 -24
- package/src/bootstrap/main.scss +0 -86
- package/src/bootstrap/responsiveHelper.tsx +0 -55
- package/src/bootstrap/screen.stories.tsx +0 -160
- package/src/bootstrap/screen.tsx +0 -146
- package/src/bootstrap/toaster.stories.tsx +0 -32
- package/src/bootstrap/toaster.tsx +0 -40
- package/src/bootstrap/useModal.stories.tsx +0 -51
- package/src/bootstrap/useModal.tsx +0 -93
- package/src/bootstrap/useWrappedForm.ts +0 -42
- package/src/core/README.md +0 -91
- package/src/core/cache.test.ts +0 -121
- package/src/core/cache.ts +0 -246
- package/src/core/errors.ts +0 -17
- package/src/core/files.ts +0 -29
- package/src/core/ls.ts +0 -15
- package/src/core/measure.ts +0 -109
- package/src/core/mutex.ts +0 -22
- package/src/core/worker.test.ts +0 -197
- package/src/core/worker.ts +0 -347
- package/src/core/workerUtils.ts +0 -32
- package/src/core/wrpc.fixture.ts +0 -106
- package/src/core/wrpc.test.ts +0 -225
- package/src/core/wrpc.ts +0 -377
- package/src/electron/README.md +0 -13
- package/src/electron/createWindow.ts +0 -234
- package/src/electron/updater.ts +0 -54
- package/src/electron-builder/builder.ts +0 -150
- package/src/electron-builder/images.ts +0 -33
- package/src/mui/README.md +0 -3
- package/src/mui/formControlFieldset.stories.tsx +0 -71
- package/src/mui/formControlFieldset.tsx +0 -26
- package/src/mui/formLabelLegend.tsx +0 -11
- package/src/mui/genericControl.tsx +0 -20
- package/src/mui/readOnly.tsx +0 -6
- package/src/next/appLink.tsx +0 -40
- package/src/next/measure.ts +0 -24
- package/src/next/noSSR.tsx +0 -36
- package/src/next/redirect.tsx +0 -13
- package/src/next/useIsInner.ts +0 -13
- package/src/react/apiCall.ts +0 -25
- package/src/react/form/client.tsx +0 -73
- package/src/react/form/form.tsx +0 -178
- package/src/react/form/index.ts +0 -2
- package/src/react/keyboard.tsx +0 -54
- package/src/react/useFetch.ts +0 -29
- package/src/react/useFetcher.ts +0 -54
- package/src/react-native/share.ts +0 -31
- package/src/react-native/update.tsx +0 -40
- package/src/react-native/useAppState.ts +0 -18
- package/src/tailwind/README.md +0 -8
- package/src/tailwind/fullpage.tsx +0 -11
- package/src/tailwind/responsiveHelper.tsx +0 -16
- package/src-todo/auth0.tsx +0 -177
- package/vite.exports.ts +0 -121
- /package/dist/{bootstrap/index.js.map → index.js.map} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { globSync } from 'glob';
|
|
2
|
-
import dts from 'vite-plugin-dts';
|
|
3
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
4
|
-
import swc from '@rollup/plugin-swc';
|
|
5
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
6
|
-
import del from 'rollup-plugin-delete';
|
|
7
|
-
import multi from '@rollup/plugin-multi-entry';
|
|
8
|
-
import { fixExports, excludeGlob, includeGlob, entryGlob, entry, external } from './exports.mjs';
|
|
9
|
-
|
|
10
|
-
//FIXME https://github.com/rollup/rollup/issues/4629 watch spits all files
|
|
11
|
-
//FIXME https://github.com/rollup/rollup/issues/3150 watch spits all files
|
|
12
|
-
//FIXME Multi produces virtual files
|
|
13
|
-
|
|
14
|
-
const dir = 'dist-rollpup';
|
|
15
|
-
|
|
16
|
-
/** @type {import('rollup').RollupOptions} */
|
|
17
|
-
const config = {
|
|
18
|
-
// input: includeGlob, // multi
|
|
19
|
-
// input: entryGlob, // multi
|
|
20
|
-
input: entry, // glob array, seems to be a bit faster
|
|
21
|
-
// ignore: excludeGlob,
|
|
22
|
-
output: {
|
|
23
|
-
dir,
|
|
24
|
-
preserveModules: true,
|
|
25
|
-
preserveModulesRoot: 'src',
|
|
26
|
-
sourcemap: true,
|
|
27
|
-
format: 'es',
|
|
28
|
-
},
|
|
29
|
-
external,
|
|
30
|
-
onwarn(warning, warn) {
|
|
31
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') return;
|
|
32
|
-
warn(warning);
|
|
33
|
-
},
|
|
34
|
-
plugins: [
|
|
35
|
-
del({ targets: dir, runOnce: true }),
|
|
36
|
-
swc(),
|
|
37
|
-
commonjs(),
|
|
38
|
-
resolve({ extensions: ['.ts', '.tsx'] }),
|
|
39
|
-
dts({ outDir: dir }), // exclude: excludeGlob,
|
|
40
|
-
// multi({ preserveModules: true }),
|
|
41
|
-
{
|
|
42
|
-
name: 'Generate Exports',
|
|
43
|
-
async buildEnd() {
|
|
44
|
-
// await fixExports();
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default config;
|
package/builders/rslib.config.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from '@rslib/core';
|
|
2
|
-
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
3
|
-
import { fixExports, generateIndex, includeGlob } from './vite.exports';
|
|
4
|
-
|
|
5
|
-
//FIXME https://github.com/egoist/tsup/issues/945 dts is slow
|
|
6
|
-
//TODO https://api-extractor.com/pages/setup/invoking/ instead of dts
|
|
7
|
-
//TODO https://github.com/egoist/tsup/issues/615 incremental
|
|
8
|
-
|
|
9
|
-
export default defineConfig({
|
|
10
|
-
lib: [{ bundle: false, format: 'esm', dts: { bundle: false } }],
|
|
11
|
-
source: { entry: { index: includeGlob } },
|
|
12
|
-
output: { sourceMap: true, cleanDistPath: true, distPath: { root: 'dist-rslib' } },
|
|
13
|
-
plugins: [
|
|
14
|
-
// {
|
|
15
|
-
// name: 'Generate Index & Exports',
|
|
16
|
-
// setup(api) {
|
|
17
|
-
// api.onBeforeBuild(async () => {
|
|
18
|
-
// await generateIndex();
|
|
19
|
-
// });
|
|
20
|
-
// api.onAfterBuild(async () => {
|
|
21
|
-
// await fixExports();
|
|
22
|
-
// });
|
|
23
|
-
// },
|
|
24
|
-
// } satisfies RsbuildPlugin,
|
|
25
|
-
],
|
|
26
|
-
});
|
package/builders/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "src",
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"declarationDir": "dist",
|
|
9
|
-
"incremental": false,
|
|
10
|
-
"allowJs": true,
|
|
11
|
-
/* Build-specific options */
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"isolatedModules": true,
|
|
15
|
-
"moduleDetection": "force",
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
"jsx": "react-jsx"
|
|
18
|
-
},
|
|
19
|
-
"include": ["src"],
|
|
20
|
-
"exclude": ["**/*.test.ts", "**/*.stories.ts", "**/*.stories.tsx"]
|
|
21
|
-
}
|
package/builders/tsup.config.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup';
|
|
2
|
-
import { fixExports, formats, includeGlob } from './exports.mjs';
|
|
3
|
-
|
|
4
|
-
//FIXME https://github.com/egoist/tsup/issues/945 dts is slow
|
|
5
|
-
//TODO https://api-extractor.com/pages/setup/invoking/ instead of dts
|
|
6
|
-
//TODO https://github.com/egoist/tsup/issues/615 incremental
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
outDir: 'dist-tsup',
|
|
10
|
-
entry: [includeGlob],
|
|
11
|
-
format: Object.keys(formats) as any,
|
|
12
|
-
bundle: false,
|
|
13
|
-
splitting: false,
|
|
14
|
-
sourcemap: true,
|
|
15
|
-
clean: true,
|
|
16
|
-
dts: true,
|
|
17
|
-
async onSuccess() {
|
|
18
|
-
// await fixExports();
|
|
19
|
-
},
|
|
20
|
-
});
|
package/builders/turbo.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://turbo.build/schema.json",
|
|
3
|
-
"extends": ["//"],
|
|
4
|
-
"tasks": {
|
|
5
|
-
"build": {
|
|
6
|
-
"dependsOn": ["^build", "build:vite", "build:exports"]
|
|
7
|
-
},
|
|
8
|
-
"build:exports": {
|
|
9
|
-
"outputs": ["package.json"]
|
|
10
|
-
},
|
|
11
|
-
"build:index": {
|
|
12
|
-
"outputs": ["src/**/*/index.ts"]
|
|
13
|
-
},
|
|
14
|
-
"build:vite": {
|
|
15
|
-
"outputs": ["dist/**/*"],
|
|
16
|
-
"dependsOn": ["build:index"]
|
|
17
|
-
},
|
|
18
|
-
"start": {
|
|
19
|
-
"persistent": true,
|
|
20
|
-
"cache": false,
|
|
21
|
-
"dependsOn": ["build:index", "build:exports"]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
package/builders/vite.config.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
import react from '@vitejs/plugin-react';
|
|
3
|
-
import dts from 'vite-plugin-dts';
|
|
4
|
-
import { fixExports, formats, entry, external, distDir } from './exports.mjs';
|
|
5
|
-
|
|
6
|
-
// https://rbardini.com/how-to-build-ts-library-with-vite/
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
build: {
|
|
10
|
-
ssr: true,
|
|
11
|
-
sourcemap: true,
|
|
12
|
-
outDir: distDir,
|
|
13
|
-
emptyOutDir: true,
|
|
14
|
-
// target: 'esnext',
|
|
15
|
-
lib: {
|
|
16
|
-
entry,
|
|
17
|
-
formats: Object.keys(formats) as any,
|
|
18
|
-
},
|
|
19
|
-
rollupOptions: {
|
|
20
|
-
external,
|
|
21
|
-
output: {
|
|
22
|
-
preserveModules: true,
|
|
23
|
-
preserveModulesRoot: 'src',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
plugins: [
|
|
28
|
-
react(),
|
|
29
|
-
dts(),
|
|
30
|
-
{
|
|
31
|
-
name: 'Generate Exports',
|
|
32
|
-
async buildEnd() {
|
|
33
|
-
// await fixExports();
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
});
|
package/demo/worker-demo.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { RespondersBase, WorkerDialog } from '../src/core';
|
|
2
|
-
|
|
3
|
-
class Responders extends RespondersBase<Responders> {
|
|
4
|
-
encode = this.create(
|
|
5
|
-
'encode',
|
|
6
|
-
async (
|
|
7
|
-
{ file, abort = false }: { file: File; abort: boolean }, // should have all possible combinations for strong typing
|
|
8
|
-
encodeContext,
|
|
9
|
-
) => {
|
|
10
|
-
// send within same message
|
|
11
|
-
encodeContext.send({ progress: 0 }); // ✅ Valid
|
|
12
|
-
encodeContext.send({ junk: 'xxx' }); // ❌ Bad & should be red
|
|
13
|
-
|
|
14
|
-
// listen same message
|
|
15
|
-
encodeContext.listen(({ abort }) => {
|
|
16
|
-
if (abort) alert('Aborted'); // ✅ Valid
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// send same message as received
|
|
20
|
-
encodeContext.send({ junk: 'xxx' }); // ❌ Bad & should be red
|
|
21
|
-
encodeContext.send({ progress: 0.5 }); // ✅ Valid
|
|
22
|
-
|
|
23
|
-
// send or listen different message
|
|
24
|
-
encodeContext.withMessage('decode').listen(() => {}); // ✅ Valid
|
|
25
|
-
encodeContext.withMessage('decode').send({ file: null }); // ✅ Valid
|
|
26
|
-
encodeContext.withMessage('decode').send({ junk: 'xxx' }); // ❌ Bad & should be red
|
|
27
|
-
encodeContext.withMessage('junk'); // ❌ Bad & should be red
|
|
28
|
-
|
|
29
|
-
return { bitmap: await createImageBitmap(file), progress: 1.0 }; // should have all possible combinations for strong typing
|
|
30
|
-
},
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
// another responder for demo purposes
|
|
34
|
-
decode = this.create('decode', async ({ bitmap }) => {
|
|
35
|
-
return { file: new File([], 'test') };
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const workerDialog = new WorkerDialog(self, new Responders(), 'Worker');
|
|
40
|
-
|
|
41
|
-
/////
|
|
42
|
-
|
|
43
|
-
// import type { workerDialog } from './worker';
|
|
44
|
-
|
|
45
|
-
const mainDialog = new WorkerDialog(self, {} as typeof workerDialog.responders, 'Main');
|
|
46
|
-
|
|
47
|
-
mainDialog
|
|
48
|
-
.withMessage('encode')
|
|
49
|
-
.fetch(
|
|
50
|
-
{
|
|
51
|
-
file: new File([], 'test'), // ✅ Valid
|
|
52
|
-
junk: 'xxx', // ❌ Bad & should be red
|
|
53
|
-
},
|
|
54
|
-
(encodeContext) => {
|
|
55
|
-
// Listen same message, partial data update
|
|
56
|
-
encodeContext.listen((data) => {
|
|
57
|
-
console.log(data.progress); // ✅ Valid
|
|
58
|
-
console.log(data.junk); // ❌ Bad & should be red
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Listen or send other message
|
|
62
|
-
encodeContext.withMessage('decode').listen((data, decodeContext) => {});
|
|
63
|
-
encodeContext.withMessage('decode').send({ bitmap: null }); // ✅ Valid
|
|
64
|
-
encodeContext.withMessage('decode').send({ junk: 'xxx' }); // ❌❌❌ Bad & should be red, broken
|
|
65
|
-
|
|
66
|
-
// Send abort
|
|
67
|
-
encodeContext.send({ abort: true }); // ✅ Valid
|
|
68
|
-
},
|
|
69
|
-
)
|
|
70
|
-
.then((result) => {
|
|
71
|
-
console.log(result.bitmap); // ✅ Valid
|
|
72
|
-
console.log(result.junk); // ❌ Bad & should be red
|
|
73
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adaptiveContainer.d.ts","sourceRoot":"","sources":["../../src/bootstrap/adaptiveContainer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAa,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG5D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,cAAc,CAOhD,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Container } from "react-bootstrap";
|
|
3
|
-
import { useBreakpoint } from "./responsiveHelper.js";
|
|
4
|
-
const AdaptiveContainer = function AdaptiveContainer2({ children, ...props }) {
|
|
5
|
-
const { isMobile } = useBreakpoint();
|
|
6
|
-
return /* @__PURE__ */ jsx(Container, { fluid: isMobile, ...props, children });
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
AdaptiveContainer
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=adaptiveContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adaptiveContainer.js","sources":["../../src/bootstrap/adaptiveContainer.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Container, ContainerProps } from 'react-bootstrap';\nimport { useBreakpoint } from './responsiveHelper';\n\nexport const AdaptiveContainer: FC<ContainerProps> = function AdaptiveContainer({ children, ...props }) {\n const { isMobile } = useBreakpoint();\n return (\n <Container fluid={isMobile} {...props}>\n {children}\n </Container>\n );\n};\n"],"names":["AdaptiveContainer"],"mappings":";;;AAIO,MAAM,oBAAwC,SAASA,mBAAkB,EAAE,UAAU,GAAG,SAAS;AAC9F,QAAA,EAAE,SAAS,IAAI,cAAc;AACnC,6BACK,WAAU,EAAA,OAAO,UAAW,GAAG,OAC3B,UACL;AAER;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { default as React, HTMLInputTypeAttribute, FC } from 'react';
|
|
2
|
-
export interface ControlProps {
|
|
3
|
-
value?: any;
|
|
4
|
-
setValue?: (v: any) => void;
|
|
5
|
-
defaultValue?: any;
|
|
6
|
-
options?: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
setOptions?: (v: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
defaultOptions?: {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
};
|
|
15
|
-
name: string;
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
inputProps?: {
|
|
18
|
-
type: HTMLInputTypeAttribute;
|
|
19
|
-
property?: string;
|
|
20
|
-
valueExtractor?: (e: any) => any;
|
|
21
|
-
className?: string;
|
|
22
|
-
} & any;
|
|
23
|
-
hideValue?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export type LabelProps = Pick<ControlProps, 'name' | 'value' | 'defaultValue'> & {
|
|
26
|
-
reset: () => void;
|
|
27
|
-
};
|
|
28
|
-
export declare const Label: FC<LabelProps>;
|
|
29
|
-
export declare const Control: FC<ControlProps>;
|
|
30
|
-
export interface RangeProps extends ControlProps {
|
|
31
|
-
min: number;
|
|
32
|
-
max: number;
|
|
33
|
-
step?: number;
|
|
34
|
-
}
|
|
35
|
-
export declare const Range: FC<RangeProps>;
|
|
36
|
-
export declare const Checkbox: FC<ControlProps>;
|
|
37
|
-
export declare const Select: FC<ControlProps>;
|
|
38
|
-
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/bootstrap/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,sBAAsB,EAAQ,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhE,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE;QACT,IAAI,EAAE,sBAAsB,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB,GAAG,GAAG,CAAC;IACR,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEvG,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAa/B,CAAC;AAEH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAsCnC,CAAC;AAEH,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAc/B,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,YAAY,CAOpC,CAAC;AAEH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,YAAY,CAMlC,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from "react";
|
|
3
|
-
const lcFirst = (str) => str[0].toLowerCase() + str.substring(1, str.length);
|
|
4
|
-
const toProperty = (str) => lcFirst(str).split(" ").join("");
|
|
5
|
-
const Label = memo(function Label2({ name, reset, value, defaultValue }) {
|
|
6
|
-
return /* @__PURE__ */ jsxs("label", { className: "flex-grow-1 mb-0 d-flex align-items-center justify-content-start gap-2", children: [
|
|
7
|
-
name,
|
|
8
|
-
value !== defaultValue && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("a", { href: "javascript: void(0)", onClick: reset, children: /* @__PURE__ */ jsx("small", { children: "reset" }) }) })
|
|
9
|
-
] });
|
|
10
|
-
});
|
|
11
|
-
const Control = memo(function Control2({
|
|
12
|
-
value = null,
|
|
13
|
-
setValue,
|
|
14
|
-
defaultValue = null,
|
|
15
|
-
options = {},
|
|
16
|
-
setOptions,
|
|
17
|
-
defaultOptions = {},
|
|
18
|
-
name,
|
|
19
|
-
inputProps: { Tag = "input", property = "value", valueExtractor = (e) => e.target.value, ...inputProps } = {},
|
|
20
|
-
hideValue = false,
|
|
21
|
-
children
|
|
22
|
-
}) {
|
|
23
|
-
const prop = toProperty(name);
|
|
24
|
-
defaultValue = defaultValue || defaultOptions[prop];
|
|
25
|
-
value = value || (options == null ? void 0 : options[prop]);
|
|
26
|
-
setValue = setValue || ((v) => setOptions == null ? void 0 : setOptions({ [prop]: v }));
|
|
27
|
-
const reset = () => setValue(defaultValue);
|
|
28
|
-
return /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-2", children: [
|
|
29
|
-
/* @__PURE__ */ jsx(Label, { name, reset, value, defaultValue }),
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
Tag,
|
|
32
|
-
{
|
|
33
|
-
...inputProps,
|
|
34
|
-
...{ [property]: value || "" },
|
|
35
|
-
className: `${value === defaultValue ? "opacity-75" : ""} ${inputProps.className}`,
|
|
36
|
-
onChange: (e) => setValue(valueExtractor(e)),
|
|
37
|
-
children
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
!hideValue && /* @__PURE__ */ jsx("span", { onDoubleClick: reset, className: "text-start", style: { width: "20px" }, children: value })
|
|
41
|
-
] });
|
|
42
|
-
});
|
|
43
|
-
const Range = memo(function Range2({ min, max, step = 0.1, ...props }) {
|
|
44
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
-
Control,
|
|
46
|
-
{
|
|
47
|
-
inputProps: {
|
|
48
|
-
type: "range",
|
|
49
|
-
min,
|
|
50
|
-
max,
|
|
51
|
-
step,
|
|
52
|
-
className: "form-control-range",
|
|
53
|
-
valueExtractor: (e) => parseFloat(e.target.value)
|
|
54
|
-
},
|
|
55
|
-
...props
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
});
|
|
59
|
-
const Checkbox = memo(function Checkbox2(props) {
|
|
60
|
-
return /* @__PURE__ */ jsx(
|
|
61
|
-
Control,
|
|
62
|
-
{
|
|
63
|
-
inputProps: { type: "checkbox", property: "checked", valueExtractor: (e) => e.target.checked },
|
|
64
|
-
...props
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
});
|
|
68
|
-
const Select = memo(function Select2({ children, ...props }) {
|
|
69
|
-
return /* @__PURE__ */ jsx(Control, { inputProps: { Tag: "select", className: "form-select" }, ...props, hideValue: true, children });
|
|
70
|
-
});
|
|
71
|
-
export {
|
|
72
|
-
Checkbox,
|
|
73
|
-
Control,
|
|
74
|
-
Label,
|
|
75
|
-
Range,
|
|
76
|
-
Select
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=controls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controls.js","sources":["../../src/bootstrap/controls.tsx"],"sourcesContent":["import React, { HTMLInputTypeAttribute, memo, FC } from 'react';\n\nconst lcFirst = (str: string) => str[0].toLowerCase() + str.substring(1, str.length);\n\nconst toProperty = (str: string) => lcFirst(str).split(' ').join('');\n\nexport interface ControlProps {\n value?: any;\n setValue?: (v: any) => void;\n defaultValue?: any;\n options?: { [key: string]: any };\n setOptions?: (v: { [key: string]: any }) => void;\n defaultOptions?: { [key: string]: any };\n name: string;\n children?: React.ReactNode;\n inputProps?: {\n type: HTMLInputTypeAttribute;\n property?: string;\n valueExtractor?: (e: any) => any;\n className?: string;\n } & any;\n hideValue?: boolean;\n}\n\nexport type LabelProps = Pick<ControlProps, 'name' | 'value' | 'defaultValue'> & { reset: () => void };\n\nexport const Label: FC<LabelProps> = memo(function Label({ name, reset, value, defaultValue }) {\n return (\n <label className=\"flex-grow-1 mb-0 d-flex align-items-center justify-content-start gap-2\">\n {name}\n {value !== defaultValue && (\n <>\n <a href=\"javascript: void(0)\" onClick={reset}>\n <small>reset</small>\n </a>\n </>\n )}\n </label>\n );\n});\n\nexport const Control: FC<ControlProps> = memo(function Control({\n value = null,\n setValue,\n defaultValue = null,\n options = {},\n setOptions,\n defaultOptions = {},\n name,\n inputProps: { Tag = 'input', property = 'value', valueExtractor = (e: any) => e.target.value, ...inputProps } = {},\n hideValue = false,\n children,\n}) {\n const prop = toProperty(name);\n\n defaultValue = defaultValue || defaultOptions[prop];\n value = value || options?.[prop];\n setValue = setValue || ((v) => setOptions?.({ [prop]: v }));\n\n const reset = () => setValue(defaultValue);\n\n return (\n <div className=\"d-flex align-items-center gap-2\">\n <Label name={name} reset={reset} value={value} defaultValue={defaultValue} />\n <Tag\n {...inputProps}\n {...{ [property]: value || '' }} // null is needed to make it always controlled\n className={`${value === defaultValue ? 'opacity-75' : ''} ${inputProps.className}`}\n onChange={(e: Event) => setValue(valueExtractor(e))}\n >\n {children}\n </Tag>\n {!hideValue && (\n <span onDoubleClick={reset} className=\"text-start\" style={{ width: '20px' }}>\n {value}\n </span>\n )}\n </div>\n );\n});\n\nexport interface RangeProps extends ControlProps {\n min: number;\n max: number;\n step?: number;\n}\n\nexport const Range: FC<RangeProps> = memo(function Range({ min, max, step = 0.1, ...props }) {\n return (\n <Control\n inputProps={{\n type: 'range',\n min,\n max,\n step,\n className: 'form-control-range',\n valueExtractor: (e: any) => parseFloat(e.target.value),\n }}\n {...props}\n />\n );\n});\n\nexport const Checkbox: FC<ControlProps> = memo(function Checkbox(props) {\n return (\n <Control\n inputProps={{ type: 'checkbox', property: 'checked', valueExtractor: (e: any) => e.target.checked }}\n {...props}\n />\n );\n});\n\nexport const Select: FC<ControlProps> = memo(function Select({ children, ...props }) {\n return (\n <Control inputProps={{ Tag: 'select', className: 'form-select' }} {...props} hideValue={true}>\n {children}\n </Control>\n );\n});\n"],"names":["Label","Control","Range","Checkbox","Select"],"mappings":";;AAEA,MAAM,UAAU,CAAC,QAAgB,IAAI,CAAC,EAAE,gBAAgB,IAAI,UAAU,GAAG,IAAI,MAAM;AAEnF,MAAM,aAAa,CAAC,QAAgB,QAAQ,GAAG,EAAE,MAAM,GAAG,EAAE,KAAK,EAAE;AAsBtD,MAAA,QAAwB,KAAK,SAASA,OAAM,EAAE,MAAM,OAAO,OAAO,gBAAgB;AAEvF,SAAA,qBAAC,SAAM,EAAA,WAAU,0EACZ,UAAA;AAAA,IAAA;AAAA,IACA,UAAU,gBAEH,oBAAA,UAAA,EAAA,UAAA,oBAAC,KAAE,EAAA,MAAK,uBAAsB,SAAS,OACnC,UAAA,oBAAC,SAAM,EAAA,UAAA,SAAK,GAChB,EACJ,CAAA;AAAA,EAAA,GAER;AAER,CAAC;AAEY,MAAA,UAA4B,KAAK,SAASC,SAAQ;AAAA,EAC3D,QAAQ;AAAA,EACR;AAAA,EACA,eAAe;AAAA,EACf,UAAU,CAAC;AAAA,EACX;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY,EAAE,MAAM,SAAS,WAAW,SAAS,iBAAiB,CAAC,MAAW,EAAE,OAAO,OAAO,GAAG,eAAe,CAAC;AAAA,EACjH,YAAY;AAAA,EACZ;AACJ,GAAG;AACO,QAAA,OAAO,WAAW,IAAI;AAEb,iBAAA,gBAAgB,eAAe,IAAI;AAC1C,UAAA,UAAS,mCAAU;AAChB,aAAA,aAAa,CAAC,MAAM,yCAAa,EAAE,CAAC,IAAI,GAAG,EAAA;AAEhD,QAAA,QAAQ,MAAM,SAAS,YAAY;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,mCACX,UAAA;AAAA,IAAA,oBAAC,OAAM,EAAA,MAAY,OAAc,OAAc,cAA4B;AAAA,IAC3E;AAAA,MAAC;AAAA,MAAA;AAAA,QACI,GAAG;AAAA,QACH,GAAG,EAAE,CAAC,QAAQ,GAAG,SAAS,GAAG;AAAA,QAC9B,WAAW,GAAG,UAAU,eAAe,eAAe,EAAE,IAAI,WAAW,SAAS;AAAA,QAChF,UAAU,CAAC,MAAa,SAAS,eAAe,CAAC,CAAC;AAAA,QAEjD;AAAA,MAAA;AAAA,IACL;AAAA,IACC,CAAC,aACG,oBAAA,QAAA,EAAK,eAAe,OAAO,WAAU,cAAa,OAAO,EAAE,OAAO,OAAA,GAC9D,UACL,MAAA,CAAA;AAAA,EAAA,GAER;AAER,CAAC;AAQY,MAAA,QAAwB,KAAK,SAASC,OAAM,EAAE,KAAK,KAAK,OAAO,KAAK,GAAG,SAAS;AAErF,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,YAAY;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX,gBAAgB,CAAC,MAAW,WAAW,EAAE,OAAO,KAAK;AAAA,MACzD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EACR;AAER,CAAC;AAEM,MAAM,WAA6B,KAAK,SAASC,UAAS,OAAO;AAEhE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,YAAY,EAAE,MAAM,YAAY,UAAU,WAAW,gBAAgB,CAAC,MAAW,EAAE,OAAO,QAAQ;AAAA,MACjG,GAAG;AAAA,IAAA;AAAA,EACR;AAER,CAAC;AAEY,MAAA,SAA2B,KAAK,SAASC,QAAO,EAAE,UAAU,GAAG,SAAS;AACjF,SACK,oBAAA,SAAA,EAAQ,YAAY,EAAE,KAAK,UAAU,WAAW,cAAA,GAAkB,GAAG,OAAO,WAAW,MACnF,SACL,CAAA;AAER,CAAC;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Control } from './controls';
|
|
3
|
-
declare const meta: Meta<typeof Control>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const RangeControl: Story;
|
|
7
|
-
export declare const CheckboxControl: Story;
|
|
8
|
-
export declare const SelectControl: Story;
|
|
9
|
-
//# sourceMappingURL=controls.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controls.stories.d.ts","sourceRoot":"","sources":["../../src/bootstrap/controls.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAU,OAAO,EAAmB,MAAM,YAAY,CAAC;AAK9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAyB9B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAI7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ButtonProps } from 'react-bootstrap';
|
|
3
|
-
export type ErrorAlertProps = {
|
|
4
|
-
children?: Error | string | any;
|
|
5
|
-
onRetry?: () => any;
|
|
6
|
-
buttonProps?: ButtonProps;
|
|
7
|
-
};
|
|
8
|
-
export declare const ErrorAlert: FC<ErrorAlertProps>;
|
|
9
|
-
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/bootstrap/error.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAA6B,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,GAAG,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAwB1C,CAAC"}
|
package/dist/bootstrap/error.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Alert, Button } from "react-bootstrap";
|
|
4
|
-
const ErrorAlert = function ErrorAlert2({ onRetry, children, buttonProps, ...props }) {
|
|
5
|
-
if (!children) return null;
|
|
6
|
-
return /* @__PURE__ */ jsxs(Alert, { variant: "danger", ...props, children: [
|
|
7
|
-
/* @__PURE__ */ jsx("div", { children: children.message || children.toString() }),
|
|
8
|
-
onRetry && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
9
|
-
Button,
|
|
10
|
-
{
|
|
11
|
-
variant: "link",
|
|
12
|
-
className: "alert-link",
|
|
13
|
-
...buttonProps,
|
|
14
|
-
onClick: (e) => {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
e.stopPropagation();
|
|
17
|
-
onRetry();
|
|
18
|
-
},
|
|
19
|
-
children: "Retry"
|
|
20
|
-
}
|
|
21
|
-
) })
|
|
22
|
-
] });
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
ErrorAlert
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sources":["../../src/bootstrap/error.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC } from 'react';\nimport { Alert, AlertProps, Button, ButtonProps } from 'react-bootstrap';\n\nexport type ErrorAlertProps = {\n children?: Error | string | any;\n onRetry?: () => any;\n buttonProps?: ButtonProps;\n};\n\n//TODO Create MUI-specific?\nexport const ErrorAlert: FC<ErrorAlertProps> = function ErrorAlert({ onRetry, children, buttonProps, ...props }) {\n if (!children) return null;\n\n return (\n <Alert variant=\"danger\" {...props}>\n <div>{children.message || children.toString()}</div>\n {onRetry && (\n <div>\n <Button\n variant=\"link\"\n className=\"alert-link\"\n {...buttonProps}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n onRetry();\n }}\n >\n Retry\n </Button>\n </div>\n )}\n </Alert>\n );\n};\n"],"names":["ErrorAlert"],"mappings":";;;AAYa,MAAA,aAAkC,SAASA,YAAW,EAAE,SAAS,UAAU,aAAa,GAAG,SAAS;AACzG,MAAA,CAAC,SAAiB,QAAA;AAEtB,SACK,qBAAA,OAAA,EAAM,SAAQ,UAAU,GAAG,OACxB,UAAA;AAAA,IAAA,oBAAC,OAAK,EAAA,UAAA,SAAS,WAAW,SAAS,YAAW;AAAA,IAC7C,+BACI,OACG,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,SAAQ;AAAA,QACR,WAAU;AAAA,QACT,GAAG;AAAA,QACJ,SAAS,CAAC,MAAM;AACZ,YAAE,eAAe;AACjB,YAAE,gBAAgB;AACV,kBAAA;AAAA,QACZ;AAAA,QACH,UAAA;AAAA,MAAA;AAAA,IAAA,EAGL,CAAA;AAAA,EAAA,GAER;AAER;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { ErrorAlert } from './error';
|
|
3
|
-
declare const meta: Meta<typeof ErrorAlert>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const String: Story;
|
|
7
|
-
export declare const ErrorObject: Story;
|
|
8
|
-
//# sourceMappingURL=error.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.stories.d.ts","sourceRoot":"","sources":["../../src/bootstrap/error.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAYjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { FormGroupProps, FormLabelProps, FormTextProps } from 'react-bootstrap';
|
|
3
|
-
export type FieldGroupProps = FormGroupProps & {
|
|
4
|
-
label?: any;
|
|
5
|
-
labelProps?: FormLabelProps;
|
|
6
|
-
text?: any;
|
|
7
|
-
textProps?: FormTextProps;
|
|
8
|
-
horizontal?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const FieldGroup: FC<FieldGroupProps>;
|
|
11
|
-
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/bootstrap/field.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAQ,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtF,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC3C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAyB1C,CAAC"}
|
package/dist/bootstrap/field.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Form } from "react-bootstrap";
|
|
3
|
-
const FieldGroup = function FieldGroup2({
|
|
4
|
-
label,
|
|
5
|
-
labelProps = {},
|
|
6
|
-
text,
|
|
7
|
-
textProps = {},
|
|
8
|
-
horizontal,
|
|
9
|
-
children,
|
|
10
|
-
...props
|
|
11
|
-
}) {
|
|
12
|
-
if (horizontal) {
|
|
13
|
-
props.className = "hstack gap-3 " + (props.className || "");
|
|
14
|
-
labelProps.className = "m-0 " + (labelProps.className || "");
|
|
15
|
-
}
|
|
16
|
-
if (text && horizontal) {
|
|
17
|
-
throw new Error("Cannot use text and horizontal together");
|
|
18
|
-
}
|
|
19
|
-
return /* @__PURE__ */ jsxs(Form.Group, { ...props, children: [
|
|
20
|
-
label && /* @__PURE__ */ jsx(Form.Label, { ...labelProps, children: label }),
|
|
21
|
-
children,
|
|
22
|
-
text && !horizontal && /* @__PURE__ */ jsx(Form.Text, { ...textProps, children: text }),
|
|
23
|
-
" "
|
|
24
|
-
] });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
FieldGroup
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../src/bootstrap/field.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Form, FormGroupProps, FormLabelProps, FormTextProps } from 'react-bootstrap';\n\nexport type FieldGroupProps = FormGroupProps & {\n label?: any;\n labelProps?: FormLabelProps;\n text?: any;\n textProps?: FormTextProps;\n horizontal?: boolean;\n};\n\nexport const FieldGroup: FC<FieldGroupProps> = function FieldGroup({\n label,\n labelProps = {},\n text,\n textProps = {},\n horizontal,\n children,\n ...props\n}) {\n if (horizontal) {\n props.className = 'hstack gap-3 ' + (props.className || '');\n labelProps.className = 'm-0 ' + (labelProps.className || '');\n }\n\n if (text && horizontal) {\n throw new Error('Cannot use text and horizontal together');\n }\n\n return (\n <Form.Group {...props}>\n {label && <Form.Label {...labelProps}>{label}</Form.Label>}\n {children}\n {text && !horizontal && <Form.Text {...textProps}>{text}</Form.Text>}{' '}\n </Form.Group>\n );\n};\n"],"names":["FieldGroup"],"mappings":";;AAWa,MAAA,aAAkC,SAASA,YAAW;AAAA,EAC/D;AAAA,EACA,aAAa,CAAC;AAAA,EACd;AAAA,EACA,YAAY,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACP,GAAG;AACC,MAAI,YAAY;AACN,UAAA,YAAY,mBAAmB,MAAM,aAAa;AAC7C,eAAA,YAAY,UAAU,WAAW,aAAa;AAAA,EAAA;AAG7D,MAAI,QAAQ,YAAY;AACd,UAAA,IAAI,MAAM,yCAAyC;AAAA,EAAA;AAG7D,SACK,qBAAA,KAAK,OAAL,EAAY,GAAG,OACX,UAAA;AAAA,IAAA,6BAAU,KAAK,OAAL,EAAY,GAAG,YAAa,UAAM,OAAA;AAAA,IAC5C;AAAA,IACA,QAAQ,CAAC,cAAc,oBAAC,KAAK,MAAL,EAAW,GAAG,WAAY,UAAK,MAAA;AAAA,IAAc;AAAA,EAAA,GAC1E;AAER;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { FieldGroup } from './field';
|
|
3
|
-
declare const meta: Meta<typeof FieldGroup>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Vertical: Story;
|
|
7
|
-
export declare const Horizontal: Story;
|
|
8
|
-
//# sourceMappingURL=field.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field.stories.d.ts","sourceRoot":"","sources":["../../src/bootstrap/field.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAajC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
export type FooterNavItemProps = {
|
|
3
|
-
href: any;
|
|
4
|
-
icon: any;
|
|
5
|
-
active?: boolean | undefined;
|
|
6
|
-
children?: string | undefined;
|
|
7
|
-
};
|
|
8
|
-
export declare const FooterNavItem: FC<FooterNavItemProps>;
|
|
9
|
-
export declare const Footer: FC<any>;
|
|
10
|
-
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/bootstrap/footer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAgChD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,GAAG,CAc1B,CAAC"}
|
package/dist/bootstrap/footer.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Nav, Navbar } from "react-bootstrap";
|
|
3
|
-
import { useBreakpoint } from "./responsiveHelper.js";
|
|
4
|
-
import { AdaptiveContainer } from "./adaptiveContainer.js";
|
|
5
|
-
const FooterNavItem = function FooterNavItem2({
|
|
6
|
-
href,
|
|
7
|
-
icon,
|
|
8
|
-
active = false,
|
|
9
|
-
children = ""
|
|
10
|
-
}) {
|
|
11
|
-
const isFilepath = icon.includes(".");
|
|
12
|
-
let iconElement;
|
|
13
|
-
if (isFilepath) {
|
|
14
|
-
iconElement = /* @__PURE__ */ jsx("img", { src: icon, alt: "icon", className: "me-lg-2" });
|
|
15
|
-
} else {
|
|
16
|
-
iconElement = /* @__PURE__ */ jsx("span", { className: `lead me-lg-2 ${icon}` });
|
|
17
|
-
}
|
|
18
|
-
const link = /* @__PURE__ */ jsxs(
|
|
19
|
-
Nav.Link,
|
|
20
|
-
{
|
|
21
|
-
href,
|
|
22
|
-
className: `px-0 px-lg-3 d-flex align-items-center flex-column flex-lg-row ${active ? "text-primary" : ""}`,
|
|
23
|
-
children: [
|
|
24
|
-
iconElement,
|
|
25
|
-
children
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
return /* @__PURE__ */ jsx(Nav.Item, { style: { flex: 1 }, children: link });
|
|
30
|
-
};
|
|
31
|
-
const Footer = function Footer2({ children }) {
|
|
32
|
-
const { isDesktop } = useBreakpoint();
|
|
33
|
-
return (
|
|
34
|
-
// border-bottom
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: isDesktop ? "" : "border-top", children: /* @__PURE__ */ jsx(Navbar, { className: isDesktop ? "" : "py-0", children: /* @__PURE__ */ jsxs(AdaptiveContainer, { children: [
|
|
36
|
-
isDesktop && /* @__PURE__ */ jsx(Navbar.Brand, { href: "/", children: "Le Brand" }),
|
|
37
|
-
/* @__PURE__ */ jsx(Nav, { className: isDesktop ? "me-auto" : "justify-content-center flex-nowrap w-100", children })
|
|
38
|
-
] }) }) })
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
Footer,
|
|
43
|
-
FooterNavItem
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":["../../src/bootstrap/footer.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Nav, Navbar } from 'react-bootstrap';\nimport { useBreakpoint } from './responsiveHelper';\nimport { AdaptiveContainer } from './adaptiveContainer';\n\nexport type FooterNavItemProps = {\n href: any;\n icon: any;\n active?: boolean | undefined;\n children?: string | undefined;\n};\n\nexport const FooterNavItem: FC<FooterNavItemProps> = function FooterNavItem({\n href,\n icon,\n active = false,\n children = '',\n}) {\n // const pathname = usePathname();\n\n const isFilepath = icon.includes('.');\n let iconElement;\n\n if (isFilepath) {\n iconElement = <img src={icon} alt=\"icon\" className=\"me-lg-2\" />;\n } else {\n iconElement = <span className={`lead me-lg-2 ${icon}`} />;\n }\n\n // const active = isActivePath(href, pathname);\n\n const link = (\n <Nav.Link\n // as={Link}\n href={href}\n // active={active} // has no effect when not pills or tabs\n className={`px-0 px-lg-3 d-flex align-items-center flex-column flex-lg-row ${active ? 'text-primary' : ''}`}\n >\n {iconElement}\n {children}\n </Nav.Link>\n );\n\n return <Nav.Item style={{ flex: 1 }}>{link}</Nav.Item>;\n};\n\nexport const Footer: FC<any> = function Footer({ children }) {\n const { isDesktop } = useBreakpoint();\n\n return (\n // border-bottom\n <div className={isDesktop ? '' : 'border-top'}>\n <Navbar className={isDesktop ? '' : 'py-0'}>\n <AdaptiveContainer>\n {isDesktop && <Navbar.Brand href=\"/\">Le Brand</Navbar.Brand>}\n <Nav className={isDesktop ? 'me-auto' : 'justify-content-center flex-nowrap w-100'}>{children}</Nav>\n </AdaptiveContainer>\n </Navbar>\n </div>\n );\n};\n"],"names":["FooterNavItem","Footer"],"mappings":";;;;AAYa,MAAA,gBAAwC,SAASA,eAAc;AAAA,EACxE;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AACf,GAAG;AAGO,QAAA,aAAa,KAAK,SAAS,GAAG;AAChC,MAAA;AAEJ,MAAI,YAAY;AACZ,sCAAe,OAAI,EAAA,KAAK,MAAM,KAAI,QAAO,WAAU,WAAU;AAAA,EAAA,OAC1D;AACH,kBAAe,oBAAA,QAAA,EAAK,WAAW,gBAAgB,IAAI,IAAI;AAAA,EAAA;AAK3D,QAAM,OACF;AAAA,IAAC,IAAI;AAAA,IAAJ;AAAA,MAEG;AAAA,MAEA,WAAW,kEAAkE,SAAS,iBAAiB,EAAE;AAAA,MAExG,UAAA;AAAA,QAAA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,EACL;AAGG,SAAA,oBAAC,IAAI,MAAJ,EAAS,OAAO,EAAE,MAAM,EAAE,GAAI,UAAK,MAAA;AAC/C;AAEO,MAAM,SAAkB,SAASC,QAAO,EAAE,YAAY;AACnD,QAAA,EAAE,UAAU,IAAI,cAAc;AAEpC;AAAA;AAAA,IAEK,oBAAA,OAAA,EAAI,WAAW,YAAY,KAAK,cAC7B,UAAC,oBAAA,QAAA,EAAO,WAAW,YAAY,KAAK,QAChC,+BAAC,mBACI,EAAA,UAAA;AAAA,MAAA,iCAAc,OAAO,OAAP,EAAa,MAAK,KAAI,UAAQ,YAAA;AAAA,0BAC5C,KAAI,EAAA,WAAW,YAAY,YAAY,4CAA6C,SAAS,CAAA;AAAA,IAAA,EAClG,CAAA,EACJ,CAAA,EACJ,CAAA;AAAA;AAER;"}
|