@servicetitan/dte-unlayer 0.61.0 → 0.63.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.
@@ -1,8 +1,8 @@
1
1
  export type SchemaNodeAvailableTypes = 'object' | 'array' | 'string';
2
2
  export const schemaNodeAvailableTypes = ['object', 'array', 'string'];
3
3
 
4
- export type SchemaNodeStringSubTypes = 'string' | 'text' | 'html';
5
- export const schemaNodeStringSubTypes = ['string', 'text', 'html'];
4
+ export type SchemaNodeStringSubTypes = 'string' | 'text' | 'html' | 'image';
5
+ export const schemaNodeStringSubTypes = ['string', 'text', 'html', 'image'];
6
6
 
7
7
  export const schemaIsAvailableType = (type: string): type is SchemaNodeAvailableTypes =>
8
8
  schemaNodeAvailableTypes.includes(type);
@@ -43,6 +43,9 @@ export const schemaIsString = (node?: SchemaNode): node is SchemaSimpleString =>
43
43
  export const schemaIsStringHtml = (node?: SchemaNode): node is SchemaSimpleString =>
44
44
  node?.type === 'string' && node?.subType === 'html';
45
45
 
46
+ export const schemaIsStringImage = (node?: SchemaNode): node is SchemaSimpleString =>
47
+ node?.type === 'string' && node?.subType === 'image';
48
+
46
49
  export const schemaFindNode = (schema: SchemaNode, key: string): SchemaNode | undefined => {
47
50
  const nodeFinder = (node: SchemaNode, keys: string[]): SchemaNode | undefined => {
48
51
  if (!node) {
package/src/unlayer.tsx CHANGED
@@ -76,7 +76,11 @@ export const handlePreselectTool = (preselectToolSlug: string) => {
76
76
 
77
77
  export const hideUnlayerContentsControls = () => {
78
78
  return `
79
- .blockbuilder-layer-controls-contents {
79
+ .blockbuilder-layer-controls-contents, .blockbuilder-layer-controls-rows {
80
+ display: none !important;
81
+ }
82
+
83
+ .blockbuilder-options-header .text-right .icon-delete, .blockbuilder-options-header .text-right .icon-duplicate {
80
84
  display: none !important;
81
85
  }
82
86
  `;