@eightshift/frontend-libs/scripts folder, so you don't need to think about the internal folder structure of Eightshift Frontend Libs. If you want multiple functions imported just concatenate them in the import like this:
} from '@eightshift/frontend-libs/scripts';
All of these helpers are generally only used in the Block Editor.
All UI icons.
Illustrations for helper modals.
Block icons, primarily used in block manifests.
Create attributes actions from blocks manifest.json. This helper is deprecated and should not be used anymore.
Provides ability to override component options from the parent block/component.
Use this hook to filter the global colors out of the component or block manifest. This function is deprecated and getOption should be used.
Combines two objects of options, one from current component and the other from the parent component.
Use this hook to read editor-color-palette colors directly from WP built in store.
Development inserter made to insert one or multiple blocks in the dom using console.
Get Global manifest.json and return global variables as CSS variables.
Get component/block options and process them in CSS variables.
Returns a unique ID generally used for css variables.
Used to set attributes on all innerBlocks. This value will be stored in the block editor store and set to a block.
Used to set attributes on all innerBlocks preset only for simple wrapper setup. This value will be stored in the block editor store and set to a block.
Paste event handler.
Output only attributes that are used in the component and remove everything else.
Get Block attributes combined in one: "shared, global, wrapper, components, block".
Get Block example attributes combined in one: "components and block".
Register all Block Editor blocks using WP
Register all Variations Editor blocks using WP
Convert the first letter of a string to uppercase.
These are all helpers generally used anywhere.
Returns a camelCase-formatted string.
Check if attribute exist in attributes list and add default value if not.
Map and check attributes for responsive object.
Helper to set and unset cookies.
Debounces the provided function.
Detect a certain device, so specific functionality can be implemented for it.
Loop all paths required using require.context method.
Returns height of the element measured by height of its children.
Takes the provided string and removes special characters
Navigator.vibrate() method pulses the vibration hardware on the device, if such hardware exists.
Create responsive selectors used for responsive attributes.
Returns BEM selector for HTML class and checks if the condition part is set.
Slices the string and inputs the provided separator after the specified characters.
These are all helpers generally only in specific plugins.
This helper will search all blocks and components manifests and find attributes that have "seo": "true" key. This key will be added in to the content and proceed by the YoastSeo Analysis plugin.
These are all helpers generally only in Storybook.
Combine block details in one object.
Load actual Block Editor and all the magic.
Manually populate categories for blocks. This is generated in the PHP part of the real project.
Manually populate blocks color palette. This is generated in the PHP part of the real project.
Loading WP build files.
Loading styles for block editor.