generator-folklore 3.0.30 → 3.0.33
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/lib/generators/build/index.js +0 -12
- package/lib/generators/html-project/index.js +5 -0
- package/lib/generators/laravel-project/index.js +4 -0
- package/lib/generators/micromag-project/index.js +82 -25
- package/lib/generators/micromag-project/templates/App.tsx +50 -0
- package/lib/generators/micromag-project/templates/Layout.tsx +38 -0
- package/lib/generators/micromag-project/templates/MicromagPage.tsx +73 -0
- package/lib/generators/micromag-project/templates/Routes.tsx +32 -0
- package/lib/generators/micromag-project/templates/contexts/AnalyticsContext.tsx +44 -0
- package/lib/generators/micromag-project/templates/contexts/ModalContext.tsx +69 -0
- package/lib/generators/micromag-project/templates/hooks/useKeyboardKeys.ts +29 -0
- package/lib/generators/micromag-project/templates/hooks/useMicromagPreview.ts +15 -0
- package/lib/generators/micromag-project/templates/hooks/useMicromagStory.ts +48 -0
- package/lib/generators/micromag-project/templates/hooks/useMicromagVideo.ts +40 -0
- package/lib/generators/micromag-project/templates/hooks/useParseFonts.ts +15 -0
- package/lib/generators/micromag-project/templates/hooks/useStoryTrackingVariables.ts +41 -0
- package/lib/generators/micromag-project/templates/icons/Cookie.tsx +22 -0
- package/lib/generators/micromag-project/templates/index.html.ejs +95 -0
- package/lib/generators/micromag-project/templates/kiosk/HomePage.tsx +35 -0
- package/lib/generators/micromag-project/templates/kiosk/Routes.tsx +47 -0
- package/lib/generators/micromag-project/templates/kiosk/home-page.module.css +83 -0
- package/lib/generators/micromag-project/templates/kiosk/micromags.ts +13 -0
- package/lib/generators/micromag-project/templates/kiosk/styles.css +86 -0
- package/lib/generators/micromag-project/templates/layout.module.css +26 -0
- package/lib/generators/micromag-project/templates/lib/addTrackingCodesToStory.ts +26 -0
- package/lib/generators/micromag-project/templates/micromags.ts +13 -0
- package/lib/generators/micromag-project/templates/modals/Consent.tsx +63 -0
- package/lib/generators/micromag-project/templates/partials/Micromag.tsx +156 -0
- package/lib/generators/micromag-project/templates/partials/Preview.tsx +28 -0
- package/lib/generators/micromag-project/templates/partials/Thumbnail.tsx +24 -0
- package/lib/generators/micromag-project/templates/partials/Video.tsx +36 -0
- package/lib/generators/micromag-project/templates/styles/modals/consent.module.css +150 -0
- package/lib/generators/micromag-project/templates/styles/pages/micromag.module.css +6 -0
- package/lib/generators/micromag-project/templates/styles/partials/micromag.module.css +17 -0
- package/lib/generators/micromag-project/templates/styles/partials/preview.module.css +3 -0
- package/lib/generators/micromag-project/templates/styles/partials/thumbnail.module.css +3 -0
- package/lib/generators/micromag-project/templates/styles/partials/video.module.css +3 -0
- package/lib/generators/micromag-project/templates/styles.css +85 -2
- package/lib/generators/micromag-project/templates/types/micromag.d.ts +58 -0
- package/lib/generators/react-app/templates/types/base.d.ts +1 -0
- package/lib/generators/typescript/index.js +50 -0
- package/lib/generators/typescript/templates/_tsconfig.json +8 -0
- package/package.json +3 -3
- package/lib/generators/build/templates/.jsconfig.json +0 -9
- package/lib/generators/build/templates/.tsconfig.json +0 -7
- package/lib/generators/micromag-project/templates/Home.jsx +0 -33
- package/lib/generators/micromag-project/templates/Routes.jsx +0 -26
- package/lib/generators/micromag-project/templates/home.module.css +0 -19
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import '@micromag/intl/locale/fr';
|
|
2
|
-
import Micromag from '@micromag/viewer';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useIntl } from 'react-intl';
|
|
5
|
-
|
|
6
|
-
// import * as AppPropTypes from '../../lib/PropTypes';
|
|
7
|
-
import story from '../../micromag/data.json';
|
|
8
|
-
|
|
9
|
-
import styles from '<%= getRelativeStylesPath('components/pages/Home.jsx', 'pages/home.module.css') %>';
|
|
10
|
-
|
|
11
|
-
const propTypes = {
|
|
12
|
-
// intl: AppPropTypes.intl.isRequired,
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function HomePage() {
|
|
16
|
-
const { locale } = useIntl();
|
|
17
|
-
return (
|
|
18
|
-
<div className={styles.container}>
|
|
19
|
-
<Micromag
|
|
20
|
-
story={story}
|
|
21
|
-
locale={locale}
|
|
22
|
-
// basePath={basePath}
|
|
23
|
-
// memoryRouter
|
|
24
|
-
pathWithIndex
|
|
25
|
-
className={styles.micromag}
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
HomePage.propTypes = propTypes;
|
|
32
|
-
|
|
33
|
-
export default HomePage;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
// import PropTypes from 'prop-types';
|
|
3
|
-
import { Route, Switch } from 'wouter';
|
|
4
|
-
import { useRoutes } from '@folklore/routes';
|
|
5
|
-
|
|
6
|
-
// import { useUrlGenerator } from '@folklore/routes';
|
|
7
|
-
import MainLayout from './layouts/Main';
|
|
8
|
-
// import ErrorPage from './pages/Error';
|
|
9
|
-
import HomePage from './pages/Home';
|
|
10
|
-
|
|
11
|
-
import '<%= getRelativeStylesPath('components/App.jsx', 'styles.css') %>';
|
|
12
|
-
|
|
13
|
-
function Routes() {
|
|
14
|
-
const routes = useRoutes() || {};
|
|
15
|
-
return (
|
|
16
|
-
<Switch>
|
|
17
|
-
<Route>
|
|
18
|
-
<MainLayout>
|
|
19
|
-
<HomePage />
|
|
20
|
-
</MainLayout>
|
|
21
|
-
</Route>
|
|
22
|
-
</Switch>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default Routes;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@import '../commons/variables';
|
|
2
|
-
@import '../commons/placeholders';
|
|
3
|
-
@import '../commons/mixins';
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
position: fixed;
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
|
|
12
|
-
.micromag {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
}
|
|
19
|
-
}
|