@eightshift/frontend-libs-tailwind 1.0.0 → 1.1.1
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/.husky/pre-commit +0 -0
- package/CHANGELOG.md +20 -1
- package/blocks/init/assets/fonts/fraunces-italic-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-italic-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-italic-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-italic-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-latin.woff2 +0 -0
- package/blocks/init/src/Blocks/assets/scripts/shared.js +1 -3
- package/blocks/init/src/Blocks/assets/styles/application-blocks-frontend.css +0 -3
- package/blocks/init/src/Blocks/assets/styles/editor/editor-overrides.css +1 -1
- package/blocks/init/src/Blocks/assets/styles/fonts.css +90 -0
- package/blocks/init/src/Blocks/assets/styles/tailwind.css +1 -5
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/pages/parts.js +1 -0
- package/blocks/init/src/Blocks/components/button/components/button-editor.js +1 -5
- package/blocks/init/src/Blocks/components/button/components/button-options.js +2 -21
- package/blocks/init/src/Blocks/components/button/manifest.json +8 -8
- package/blocks/init/src/Blocks/components/card/components/card-editor.js +1 -2
- package/blocks/init/src/Blocks/components/card/components/card-options.js +0 -1
- package/blocks/init/src/Blocks/components/heading/components/heading-editor.js +1 -5
- package/blocks/init/src/Blocks/components/image/components/image-editor.js +1 -7
- package/blocks/init/src/Blocks/components/image/components/image-options.js +3 -17
- package/blocks/init/src/Blocks/components/list/components/list-options.js +1 -3
- package/blocks/init/src/Blocks/components/load-more/assets/load-more.js +1 -2
- package/blocks/init/src/Blocks/components/load-more/components/load-more-options.js +1 -0
- package/blocks/init/src/Blocks/components/modal/assets/index.js +7 -9
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-options.js +1 -3
- package/blocks/init/src/Blocks/components/paragraph/manifest.json +14 -16
- package/blocks/init/src/Blocks/components/post-header/post-header.php +1 -1
- package/blocks/init/src/Blocks/components/share/assets/index.js +1 -5
- package/blocks/init/src/Blocks/components/share/components/share-editor.js +7 -4
- package/blocks/init/src/Blocks/components/share/components/share-options.js +2 -11
- package/blocks/init/src/Blocks/components/video/components/video-editor.js +2 -4
- package/blocks/init/src/Blocks/components/video/components/video-options.js +5 -27
- package/blocks/init/src/Blocks/custom/accordion/assets/index.js +1 -1
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-editor.js +6 -1
- package/blocks/init/src/Blocks/custom/carousel/assets/pagination.js +3 -8
- package/blocks/init/src/Blocks/custom/column/components/column-editor.js +4 -1
- package/blocks/init/src/Blocks/custom/column/components/column-options.js +5 -12
- package/blocks/init/src/Blocks/custom/columns/components/columns-editor.js +2 -6
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-options.js +18 -30
- package/blocks/init/src/Blocks/custom/featured-content/partials/cards.php +5 -5
- package/blocks/init/src/Blocks/custom/group/components/group-editor.js +1 -3
- package/blocks/init/src/Blocks/custom/heading/heading-transforms.js +1 -0
- package/blocks/init/src/Blocks/custom/map/assets/map-controller.js +0 -1
- package/blocks/init/src/Blocks/custom/map/components/map-components.js +3 -3
- package/blocks/init/src/Blocks/custom/map/components/map-editor.js +2 -12
- package/blocks/init/src/Blocks/custom/map/components/map-options.js +10 -46
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-transforms.js +1 -0
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-options.js +1 -3
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js +1 -1
- package/blocks/init/src/Blocks/manifest.json +22 -4
- package/blocks/init/src/Blocks/wrapper/components/wrapper-options.js +4 -19
- package/blocks/init/src/Blocks/wrapper/wrapper.js +1 -4
- package/linters/base.config.mjs +1 -1
- package/linters/eslint.config.mjs +1 -2
- package/linters/stylelint.config.js +9 -13
- package/package.json +92 -92
- package/schemas/block.json +4 -0
- package/schemas/component.json +4 -0
- package/scripts/components/block-inserter.js +8 -14
- package/scripts/components/file-picker.js +42 -39
- package/scripts/components/index.js +1 -0
- package/scripts/components/link-section-editor.js +6 -2
- package/scripts/components/picker-placeholder.js +109 -0
- package/scripts/components/server-side-render.js +2 -4
- package/scripts/components/settings/settings.js +3 -14
- package/scripts/components/settings/use-theme-options.js +2 -2
- package/scripts/editor/attributes.js +3 -9
- package/scripts/editor/colors.js +43 -41
- package/scripts/editor/editor.js +9 -16
- package/scripts/editor/fetch.js +26 -19
- package/scripts/editor/hooks.js +1 -0
- package/scripts/editor/options.js +2 -4
- package/scripts/editor/registration.js +51 -128
- package/scripts/editor/tailwindcss.js +118 -37
- package/scripts/helpers/breakpoints.js +3 -8
- package/scripts/helpers/cookies.js +2 -1
- package/scripts/helpers/index.js +1 -7
- package/scripts/index.js +2 -0
- package/scripts/plugins/yoast-seo.js +2 -3
- package/linters/ignore-gitignored.mjs +0 -9
|
@@ -8,20 +8,15 @@ export const getBreakpointNames = () => {
|
|
|
8
8
|
|
|
9
9
|
return Object.entries(breakpoints)
|
|
10
10
|
.toSorted((a, b) => b[1] - a[1])
|
|
11
|
-
.map(([name]) => name)
|
|
11
|
+
.map(([name]) => name)
|
|
12
|
+
.toReversed();
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export const getBreakpointData = (convertToPx = false) => {
|
|
15
16
|
const breakpoints = select(STORE_NAME)?.getSettings()?.globalVariables?.breakpoints;
|
|
16
17
|
|
|
17
18
|
if (convertToPx) {
|
|
18
|
-
return Object.fromEntries(
|
|
19
|
-
Object.entries(breakpoints)
|
|
20
|
-
.map(([name, value]) => [
|
|
21
|
-
name,
|
|
22
|
-
value * 16,
|
|
23
|
-
])
|
|
24
|
-
);
|
|
19
|
+
return Object.fromEntries(Object.entries(breakpoints).map(([name, value]) => [name, value * 16]));
|
|
25
20
|
}
|
|
26
21
|
|
|
27
22
|
return breakpoints;
|
|
@@ -21,7 +21,7 @@ export const cookies = {
|
|
|
21
21
|
*/
|
|
22
22
|
setCookie(key, value, time, path) {
|
|
23
23
|
const expires = new Date();
|
|
24
|
-
expires.setTime(expires.getTime() +
|
|
24
|
+
expires.setTime(expires.getTime() + time);
|
|
25
25
|
let pathValue = '';
|
|
26
26
|
|
|
27
27
|
if (typeof path !== 'undefined') {
|
|
@@ -45,6 +45,7 @@ export const cookies = {
|
|
|
45
45
|
*/
|
|
46
46
|
getCookie(key) {
|
|
47
47
|
const keyValue = document.cookie.match(`(^|;) ?${key}=([^;]*)(;|$)`);
|
|
48
|
+
|
|
48
49
|
return keyValue ? keyValue[2] : null;
|
|
49
50
|
},
|
|
50
51
|
setHalfDay() {
|
package/scripts/helpers/index.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
// All exports are sorted in alphabetical order.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
getBreakpointData,
|
|
5
|
-
getBreakpointNames,
|
|
6
|
-
getGlobalManifest,
|
|
7
|
-
getBreakpointUiData,
|
|
8
|
-
getResponsiveData,
|
|
9
|
-
} from './breakpoints';
|
|
3
|
+
export { getBreakpointData, getBreakpointNames, getGlobalManifest, getBreakpointUiData, getResponsiveData } from './breakpoints';
|
|
10
4
|
export { cookies } from './cookies';
|
|
11
5
|
export { dynamicImport } from './dynamic-import';
|
package/scripts/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Components.
|
|
2
2
|
export { BlockInserter } from './components/block-inserter';
|
|
3
|
+
export { LinkSectionEditor } from './components/link-section-editor';
|
|
3
4
|
export { ManageFileButton, FileSelector } from './components/file-picker';
|
|
4
5
|
export { MediaPicker } from './components/media-picker';
|
|
5
6
|
export { ServerSideRender } from './components/server-side-render';
|
|
7
|
+
export { PickerPlaceholder } from './components/picker-placeholder';
|
|
6
8
|
export { ThemeOptionsPage, EsThemeOptionsContext } from './components/settings/settings';
|
|
7
9
|
|
|
8
10
|
// Editor.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { includeIgnoreFile } from '@eslint/compat';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
|
|
5
|
-
const filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const dirname = path.dirname(filename);
|
|
7
|
-
const gitignorePath = path.resolve(dirname, '.gitignore');
|
|
8
|
-
|
|
9
|
-
export default [includeIgnoreFile(gitignorePath)];
|