@content-blocks/js 0.5.0 → 0.6.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.
Files changed (115) hide show
  1. package/dist/cjs/content-accordion_11.cjs.entry.js +56 -40
  2. package/dist/cjs/content-accordion_11.cjs.entry.js.map +1 -1
  3. package/dist/cjs/content-blocks.cjs.js +2 -2
  4. package/dist/cjs/content-carousel.cjs.entry.js +2 -1
  5. package/dist/cjs/content-carousel.cjs.entry.js.map +1 -1
  6. package/dist/cjs/content-navigation-block.cjs.entry.js +23 -19
  7. package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
  8. package/dist/cjs/content-split-block.cjs.entry.js +4 -4
  9. package/dist/cjs/content-split-block.cjs.entry.js.map +1 -1
  10. package/dist/cjs/content-tabs.cjs.entry.js +3 -3
  11. package/dist/cjs/{index-072153fb.js → index-9f20d89a.js} +34 -4
  12. package/dist/cjs/index-9f20d89a.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +1 -1
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/{utils-9856e159.js → utils-db61cd70.js} +1 -3
  16. package/dist/cjs/utils-db61cd70.js.map +1 -0
  17. package/dist/cjs/{window-resize-service-77b2c64e.js → window-resize-service-ac5c2012.js} +2 -2
  18. package/dist/cjs/{window-resize-service-77b2c64e.js.map → window-resize-service-ac5c2012.js.map} +1 -1
  19. package/dist/collection/blocks/content-hero-block/content-hero-block.css +6 -0
  20. package/dist/collection/blocks/content-split-block/content-split-block.js +1 -1
  21. package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -1
  22. package/dist/collection/components/content-accordion/content-accordion.js +2 -2
  23. package/dist/collection/components/content-accordion/content-accordion.js.map +1 -1
  24. package/dist/collection/components/content-carousel/content-carousel.js +1 -0
  25. package/dist/collection/components/content-carousel/content-carousel.js.map +1 -1
  26. package/dist/collection/components/content-navigation-block/content-navigation-block.js +20 -16
  27. package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
  28. package/dist/collection/components/content-overlay/content-overlay.css +6 -3
  29. package/dist/collection/components/content-overlay/content-overlay.js +24 -9
  30. package/dist/collection/components/content-overlay/content-overlay.js.map +1 -1
  31. package/dist/collection/elements/content-button/content-button.js +2 -5
  32. package/dist/collection/elements/content-button/content-button.js.map +1 -1
  33. package/dist/collection/elements/content-image/content-image.css +4 -7
  34. package/dist/collection/elements/content-image/content-image.js +79 -21
  35. package/dist/collection/elements/content-image/content-image.js.map +1 -1
  36. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +1 -0
  37. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +46 -3
  38. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
  39. package/dist/collection/formatters/content-spacer/content-spacer.js +3 -2
  40. package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -1
  41. package/dist/components/content-accordion.js +1 -1
  42. package/dist/components/content-accordion.js.map +1 -1
  43. package/dist/components/content-button.js +2 -5
  44. package/dist/components/content-button.js.map +1 -1
  45. package/dist/components/content-carousel.js +1 -0
  46. package/dist/components/content-carousel.js.map +1 -1
  47. package/dist/components/content-grid-formatter2.js +8 -2
  48. package/dist/components/content-grid-formatter2.js.map +1 -1
  49. package/dist/components/content-hero-block.js +1 -1
  50. package/dist/components/content-hero-block.js.map +1 -1
  51. package/dist/components/content-image.js +26 -22
  52. package/dist/components/content-image.js.map +1 -1
  53. package/dist/components/content-navigation-block.js +20 -16
  54. package/dist/components/content-navigation-block.js.map +1 -1
  55. package/dist/components/content-overlay.js +22 -7
  56. package/dist/components/content-overlay.js.map +1 -1
  57. package/dist/components/content-spacer.js +1 -1
  58. package/dist/components/content-spacer.js.map +1 -1
  59. package/dist/components/content-split-block.js +1 -1
  60. package/dist/components/content-split-block.js.map +1 -1
  61. package/dist/components/utils.js +1 -1
  62. package/dist/components/utils.js.map +1 -1
  63. package/dist/content-blocks/content-blocks.esm.js +1 -1
  64. package/dist/content-blocks/content-blocks.esm.js.map +1 -1
  65. package/dist/content-blocks/index.esm.js +1 -1
  66. package/dist/content-blocks/{p-ebaee21f.entry.js → p-167a9155.entry.js} +2 -2
  67. package/dist/content-blocks/{p-ebaee21f.entry.js.map → p-167a9155.entry.js.map} +1 -1
  68. package/dist/content-blocks/{p-30ab003a.entry.js → p-271fb304.entry.js} +2 -2
  69. package/dist/content-blocks/p-271fb304.entry.js.map +1 -0
  70. package/dist/content-blocks/p-288eace9.js +3 -0
  71. package/dist/content-blocks/p-288eace9.js.map +1 -0
  72. package/dist/content-blocks/p-4038cd42.entry.js +10 -0
  73. package/dist/content-blocks/p-4038cd42.entry.js.map +1 -0
  74. package/dist/content-blocks/{p-fd14acd9.entry.js → p-4bfbd7ef.entry.js} +2 -2
  75. package/dist/content-blocks/{p-fd14acd9.entry.js.map → p-4bfbd7ef.entry.js.map} +1 -1
  76. package/dist/content-blocks/{p-2c515f18.entry.js → p-8cc22c1e.entry.js} +2 -2
  77. package/dist/content-blocks/{p-da2c36ea.js → p-b04fe808.js} +2 -2
  78. package/dist/content-blocks/{p-da2c36ea.js.map → p-b04fe808.js.map} +1 -1
  79. package/dist/content-blocks/{p-3b4b9ad1.js → p-cfb4593f.js} +2 -2
  80. package/dist/esm/content-accordion_11.entry.js +56 -40
  81. package/dist/esm/content-accordion_11.entry.js.map +1 -1
  82. package/dist/esm/content-blocks.js +3 -3
  83. package/dist/esm/content-carousel.entry.js +2 -1
  84. package/dist/esm/content-carousel.entry.js.map +1 -1
  85. package/dist/esm/content-navigation-block.entry.js +23 -19
  86. package/dist/esm/content-navigation-block.entry.js.map +1 -1
  87. package/dist/esm/content-split-block.entry.js +4 -4
  88. package/dist/esm/content-split-block.entry.js.map +1 -1
  89. package/dist/esm/content-tabs.entry.js +3 -3
  90. package/dist/esm/{index-5c31f78b.js → index-e848c048.js} +34 -4
  91. package/dist/esm/index-e848c048.js.map +1 -0
  92. package/dist/esm/index.js +1 -1
  93. package/dist/esm/loader.js +3 -3
  94. package/dist/esm/{utils-4f29a9cf.js → utils-4f78228e.js} +2 -2
  95. package/dist/esm/utils-4f78228e.js.map +1 -0
  96. package/dist/esm/{window-resize-service-332e7420.js → window-resize-service-f40ec51c.js} +2 -2
  97. package/dist/esm/{window-resize-service-332e7420.js.map → window-resize-service-f40ec51c.js.map} +1 -1
  98. package/dist/types/components/content-accordion/content-accordion.d.ts +6 -6
  99. package/dist/types/components/content-overlay/content-overlay.d.ts +4 -2
  100. package/dist/types/components.d.ts +37 -3
  101. package/dist/types/elements/content-image/content-image.d.ts +12 -0
  102. package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +8 -2
  103. package/dist/types/typings.d.ts +3 -3
  104. package/package.json +1 -1
  105. package/dist/cjs/index-072153fb.js.map +0 -1
  106. package/dist/cjs/utils-9856e159.js.map +0 -1
  107. package/dist/content-blocks/p-2faf0c78.js +0 -3
  108. package/dist/content-blocks/p-2faf0c78.js.map +0 -1
  109. package/dist/content-blocks/p-30ab003a.entry.js.map +0 -1
  110. package/dist/content-blocks/p-b8009321.entry.js +0 -10
  111. package/dist/content-blocks/p-b8009321.entry.js.map +0 -1
  112. package/dist/esm/index-5c31f78b.js.map +0 -1
  113. package/dist/esm/utils-4f29a9cf.js.map +0 -1
  114. /package/dist/content-blocks/{p-2c515f18.entry.js.map → p-8cc22c1e.entry.js.map} +0 -0
  115. /package/dist/content-blocks/{p-3b4b9ad1.js.map → p-cfb4593f.js.map} +0 -0
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { u as ResponsiveUtils } from './utils-4f29a9cf.js';
1
+ export { u as ResponsiveUtils } from './utils-4f78228e.js';
2
2
 
3
3
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
- import { b as bootstrapLazy } from './index-5c31f78b.js';
2
- export { s as setNonce } from './index-5c31f78b.js';
1
+ import { b as bootstrapLazy } from './index-e848c048.js';
2
+ export { s as setNonce } from './index-e848c048.js';
3
3
 
4
4
  const defineCustomElements = (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
- return bootstrapLazy([["content-split-block",[[4,"content-split-block",{"reverse":[1544],"columns":[1],"classes":[1537],"classString":[32]}]]],["content-carousel",[[4,"content-carousel",{"initMethod":[1,"init-method"],"swiperOptions":[1,"swiper-options"]},[[0,"setSwiperOptions","setSwiperOptionsCallback"]]]]],["content-navigation-block",[[4,"content-navigation-block",{"hamburger":[1537],"classes":[1537],"classString":[32],"ariaExpanded":[32],"bodyToggle":[32]}]]],["content-tabs",[[4,"content-tabs",{"classes":[1537],"classString":[32]}]]],["content-accordion_11",[[4,"content-accordion",{"open":[1],"animationStart":[1,"animation-start"],"animationEnd":[1,"animation-end"],"animationTime":[2,"animation-time"],"revealElement":[32],"isOpen":[32],"randomID":[32],"classString":[32]}],[4,"content-button",{"href":[1537],"target":[1],"classes":[1],"clickableBlock":[4,"clickable-block"],"expanded":[1537],"controls":[1],"linkLabel":[1,"link-label"],"linkClass":[1537,"link-class"],"classString":[32],"hasContentToActivate":[32]}],[4,"content-hero-block",{"contentPosition":[1537,"content-position"],"classes":[1],"hasBackground":[32],"classString":[32],"revealHiddenContent":[32]},[[8,"contentBlockActivated","contentBlockActivationHandler"]]],[4,"content-image",{"classes":[1537],"lazyLoad":[4,"lazy-load"],"src":[1025],"alt":[1537],"width":[1025],"height":[1025],"videoType":[1,"video-type"],"showContent":[1537,"show-content"],"activeSrc":[32],"lazyLoadIsComplete":[32],"showVideoAsGif":[32],"activeLazyLoadClass":[32],"classString":[32],"inlineStyle":[32],"hasMediaContent":[32]},null,{"lazyLoadIsComplete":["watchLazyLoadIsComplete"]}],[4,"content-line",{"tag":[1],"textAlign":[1,"text-align"],"classes":[8],"maxWidth":[1,"max-width"],"classString":[32],"inlineStyle":[32]}],[4,"content-overlay",{"target":[1],"open":[1537],"fullScreen":[1,"full-screen"],"classes":[1],"horizontalAlignment":[1537,"horizontal-alignment"],"verticalAlignment":[1537,"vertical-alignment"],"closeTitle":[1,"close-title"],"isActive":[32],"activeClass":[32],"classString":[32],"contentSlot":[32],"isFullScreen":[32],"openOverlay":[64],"closeOverlay":[64]},[[0,"contentBlockActivated","onContentBlockActivated"]]],[4,"content-spacer",{"classes":[1],"maxWidth":[1,"max-width"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"horizontalPosition":[1537,"horizontal-position"],"topOffset":[1,"top-offset"],"bottomOffset":[1,"bottom-offset"],"leftOffset":[1,"left-offset"],"rightOffset":[1,"right-offset"],"classString":[32],"inlineStyle":[32]}],[4,"content-text-block",{"classes":[1],"minHeight":[1537,"min-height"],"verticalAlignment":[1537,"vertical-alignment"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"classString":[32],"inlineStyle":[32]}],[4,"content-tout-block",{"hover":[1537],"classes":[1],"classString":[32],"hasHoverContent":[32]}],[4,"content-video",{"method":[1],"autoplay":[4],"src":[1],"width":[2],"height":[2],"type":[1],"playButtonAriaLabel":[1,"play-button-aria-label"],"classes":[1537],"controls":[4],"preload":[1],"fitContainer":[1537,"fit-container"],"classString":[32],"isLoaded":[32],"hasPoster":[32],"isPlayed":[32]}],[4,"content-grid-formatter",{"classes":[1],"type":[1537],"flexGrow":[1537,"flex-grow"],"flexShrink":[1537,"flex-shrink"],"verticalAlignment":[1537,"vertical-alignment"],"horizontalAlignment":[1537,"horizontal-alignment"],"columns":[1537],"classString":[32],"activeClassString":[32],"inlineStyle":[32]}]]]], options);
6
+ return bootstrapLazy([["content-split-block",[[4,"content-split-block",{"reverse":[1544],"columns":[1],"classes":[1537],"classString":[32]}]]],["content-carousel",[[4,"content-carousel",{"initMethod":[1,"init-method"],"swiperOptions":[1,"swiper-options"]},[[0,"setSwiperOptions","setSwiperOptionsCallback"]]]]],["content-navigation-block",[[4,"content-navigation-block",{"hamburger":[1537],"classes":[1537],"classString":[32],"ariaExpanded":[32],"bodyToggle":[32]}]]],["content-tabs",[[4,"content-tabs",{"classes":[1537],"classString":[32]}]]],["content-accordion_11",[[4,"content-accordion",{"open":[1],"animationStart":[1,"animation-start"],"animationEnd":[1,"animation-end"],"animationTime":[2,"animation-time"],"revealElement":[32],"isOpen":[32],"randomID":[32],"classString":[32]}],[4,"content-button",{"href":[1537],"target":[1],"classes":[1],"clickableBlock":[4,"clickable-block"],"expanded":[1537],"controls":[1],"linkLabel":[1,"link-label"],"linkClass":[1537,"link-class"],"classString":[32],"hasContentToActivate":[32]}],[4,"content-hero-block",{"contentPosition":[1537,"content-position"],"classes":[1],"hasBackground":[32],"classString":[32],"revealHiddenContent":[32]},[[8,"contentBlockActivated","contentBlockActivationHandler"]]],[4,"content-image",{"classes":[1537],"lazyLoad":[4,"lazy-load"],"src":[1025],"alt":[1537],"width":[1025],"height":[1025],"aspectRatio":[1025,"aspect-ratio"],"type":[1],"videoType":[1,"video-type"],"showContent":[1537,"show-content"],"activeSrc":[32],"lazyLoadIsComplete":[32],"showVideoAsGif":[32],"activeLazyLoadClass":[32],"classString":[32],"inlineStyle":[32],"hasMediaContent":[32],"pictureImageSrc":[32]},null,{"lazyLoadIsComplete":["watchLazyLoadIsComplete"]}],[4,"content-line",{"tag":[1],"textAlign":[1,"text-align"],"classes":[8],"maxWidth":[1,"max-width"],"classString":[32],"inlineStyle":[32]}],[4,"content-overlay",{"target":[1],"open":[1537],"fullScreen":[1,"full-screen"],"classes":[1],"horizontalAlignment":[1537,"horizontal-alignment"],"verticalAlignment":[1537,"vertical-alignment"],"closeTitle":[1,"close-title"],"isActive":[32],"activeClass":[32],"classString":[32],"contentSlot":[32],"isFullScreen":[32],"hasCloseButton":[32],"originalMarkup":[32],"openOverlay":[64],"closeOverlay":[64]},[[0,"contentBlockActivated","onContentBlockActivated"]]],[4,"content-spacer",{"classes":[1],"maxWidth":[1,"max-width"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"horizontalPosition":[1537,"horizontal-position"],"topOffset":[1,"top-offset"],"bottomOffset":[1,"bottom-offset"],"leftOffset":[1,"left-offset"],"rightOffset":[1,"right-offset"],"classString":[32],"inlineStyle":[32]}],[4,"content-text-block",{"classes":[1],"minHeight":[1537,"min-height"],"verticalAlignment":[1537,"vertical-alignment"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"classString":[32],"inlineStyle":[32]}],[4,"content-tout-block",{"hover":[1537],"classes":[1],"classString":[32],"hasHoverContent":[32]}],[4,"content-video",{"method":[1],"autoplay":[4],"src":[1],"width":[2],"height":[2],"type":[1],"playButtonAriaLabel":[1,"play-button-aria-label"],"classes":[1537],"controls":[4],"preload":[1],"fitContainer":[1537,"fit-container"],"classString":[32],"isLoaded":[32],"hasPoster":[32],"isPlayed":[32]}],[4,"content-grid-formatter",{"classes":[1],"type":[1537],"flexGrow":[1537,"flex-grow"],"flexShrink":[1537,"flex-shrink"],"verticalAlignment":[1537,"vertical-alignment"],"horizontalAlignment":[1537,"horizontal-alignment"],"columns":[1537],"columnGap":[1537,"column-gap"],"classString":[32],"activeClassString":[32],"inlineStyle":[32]}]]]], options);
7
7
  };
8
8
 
9
9
  export { defineCustomElements };
@@ -111,6 +111,6 @@ const utils = /*#__PURE__*/Object.freeze({
111
111
  objectToCssString: objectToCssString
112
112
  });
113
113
 
114
- export { getCurrentValue as a, breakpointValues as b, getCurrentBreakpointIndex as c, getValueAtIndex as g, utils as u };
114
+ export { getCurrentBreakpointIndex as a, getCurrentValue as g, utils as u };
115
115
 
116
- //# sourceMappingURL=utils-4f29a9cf.js.map
116
+ //# sourceMappingURL=utils-4f78228e.js.map
@@ -0,0 +1 @@
1
+ {"file":"utils-4f78228e.js","mappings":"AAEO,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AACrH,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AAC5H,MAAM,gBAAgB,GAAG,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AAI,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5E,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AACxC,CAAC;SAEe,sBAAsB,CAAC,WAAmB;IACxD,IAAI,aAAa,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;IACxD,IAAI,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QACtC,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;KAC7B;IACD,IAAI,aAAa,EAAE;QACjB,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,WAAW,CAAC;KAC3C;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;SAEe,iBAAiB,CAAC,MAAc;IAC9C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;QACtB,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;YAChE,MAAM,IAAI,GAAG,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;SACrC;KACF;IACD,OAAO,MAAM,CAAC;AAChB;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/utils.ts"],"sourcesContent":["import { ResponsiveString } from \"../typings\";\n\nexport const breakpoints = ['mobile', 'tablet-portrait', 'tablet-landscape', 'tablet-pro', 'desktop-large', 'desktop-wide'];\nexport const breakpointLabels = ['Mobile', 'Tablet (Portrait)', 'Tablet (Landscape)', 'iPad Pro', 'Desktop Large', 'Desktop Wide'];\nexport const breakpointValues = [0,768,1024,1366,1440,1920];\n\nexport function getBreakpointValues() {\n return breakpointValues;\n}\nexport function insertCssIntoHead(document: Document, fontCssUrl: string) {\n let element = document.querySelector(`link[href=\"${fontCssUrl}\"]`);\n // Only inject the element if it's not yet present\n if (!element) {\n element = document.createElement('link');\n element.setAttribute('rel', 'stylesheet');\n element.setAttribute('href', fontCssUrl);\n document.head.prepend(element);\n }\n}\n\nexport function generateResponsiveClass(classPrefix: string, responsiveValue: string) {\n let index = -1;\n let classString = '';\n responsiveValue.split('|').forEach(value => {\n index++;\n if (!value || value === 'false') {\n return false;\n }\n classString += ` ${classPrefix}-${breakpoints[index]}-${value}`\n });\n return classString;\n}\n\n// Fills in default value if none exists for a breakpoint\nexport function generateResponsiveValues(responsiveValue: string): string[] {\n if (!responsiveValue) {\n return [];\n }\n let responseArray = [];\n let splitResponsiveValues = responsiveValue.split('|');\n let lastGoodValue = splitResponsiveValues[0];\n breakpointValues.forEach((_value, index) => {\n let thisBreakpointValue = splitResponsiveValues[index];\n if (thisBreakpointValue) {\n lastGoodValue = thisBreakpointValue;\n }\n responseArray.push(thisBreakpointValue ? thisBreakpointValue : lastGoodValue);\n });\n return responseArray;\n}\n\nexport function getCurrentBreakpointIndex(): number {\n let activeBreakpointIndex: number = 0;\n let windowWidth = window.innerWidth;\n breakpointValues.some((width) => {\n // The first time this is true will end the loop\n let condition = width > windowWidth;\n if (!condition) {\n activeBreakpointIndex = breakpointValues.indexOf(width);\n }\n return condition;\n });\n return activeBreakpointIndex;\n}\n\nexport function getCurrentValue(responsiveValue: string|boolean): string {\n if (!responsiveValue) {\n return '';\n }\n let currentBreakpoint = getCurrentBreakpointIndex();\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n let returnValue: string;\n for (var i = currentBreakpoint; i >= 0; i--) {\n if (responsiveValues[i]) {\n returnValue = responsiveValues[i];\n i = -1;\n }\n }\n return returnValue;\n}\n\nexport function getValueAtIndex(index: number, responsiveValue: ResponsiveString): string {\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n return responsiveValues[index].trim();\n}\n\nexport function getHydratedClassString(classString: string): string {\n let cleanedString = getCurrentValue(classString).trim();\n if (cleanedString.includes('hydrated')) {\n return cleanedString.trim();\n }\n if (cleanedString) {\n return cleanedString.trim() + ' hydrated';\n }\n return 'hydrated';\n}\n\nexport function objectToCssString(object: object): string {\n let string = '';\n for (var key in object) {\n if (object[key].length > 0 && !['px', '%'].includes(object[key])) {\n string += `${key}: ${object[key]};`;\n }\n }\n return string;\n}"],"version":3}
@@ -1,4 +1,4 @@
1
- import { c as getCurrentBreakpointIndex, a as getCurrentValue } from './utils-4f29a9cf.js';
1
+ import { a as getCurrentBreakpointIndex, g as getCurrentValue } from './utils-4f78228e.js';
2
2
  import { B as BehaviorSubject, O as Observable } from './BehaviorSubject-bc7e0e99.js';
3
3
 
4
4
  class WindowResizeController {
@@ -32,4 +32,4 @@ const WindowResizeService = new WindowResizeController();
32
32
 
33
33
  export { WindowResizeService as W };
34
34
 
35
- //# sourceMappingURL=window-resize-service-332e7420.js.map
35
+ //# sourceMappingURL=window-resize-service-f40ec51c.js.map
@@ -1 +1 @@
1
- {"file":"window-resize-service-332e7420.js","mappings":";;;AAIA,MAAM,sBAAsB;;IAK1B;QAJA,sBAAiB,GAAG,yBAAyB,EAAE,CAAC;QAChD,qBAAgB,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAKtF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,QAAQ;YAChD,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aAClC;YACD,IAAI,WAAW,GAAG,yBAAyB,EAAE,CAAC;YAC9C,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,KAAK,WAAW,EAAE;gBAC/C,OAAO,KAAK,CAAC;aACd;YACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACzC,CAAC,CAAC;QAEH,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KAC9C;IAED,YAAY,CAAC,eAAe;QAC1B,OAAO,IAAI,UAAU,CAAC,QAAQ;YAC5B,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC9B,IAAI,SAAS,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;gBACjD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC1B,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;CACF;MAEY,mBAAmB,GAAG,IAAI,sBAAsB;;;;","names":[],"sources":["src/services/window-resize-service.ts"],"sourcesContent":["import { BehaviorSubject, Observable } from \"rxjs\";\nimport { getCurrentBreakpointIndex, getCurrentValue } from \"../utils/utils\";\nimport _ from 'underscore';\n\nclass WindowResizeController {\n currentBreakpoint = getCurrentBreakpointIndex();\n breakpointIndex$: BehaviorSubject<number> = new BehaviorSubject(this.currentBreakpoint);\n timeoutHolder: number;\n // timeoutHolder: Timeout;\n constructor() {\n\n const resizeObserver = new ResizeObserver(_entries => {\n if (this.timeoutHolder) {\n clearTimeout(this.timeoutHolder);\n }\n let activeValue = getCurrentBreakpointIndex();\n if (this.breakpointIndex$.value === activeValue) {\n return false;\n }\n this.breakpointIndex$.next(activeValue);\n });\n\n resizeObserver.observe(window.document.body);\n }\n \n registerProp(activePropValue): Observable<string|boolean|number> {\n return new Observable(observer => {\n observer.next(getCurrentValue(activePropValue));\n this.breakpointIndex$.subscribe(() => {\n let nextValue = getCurrentValue(activePropValue);\n observer.next(nextValue);\n });\n });\n }\n}\n\nexport const WindowResizeService = new WindowResizeController();"],"version":3}
1
+ {"file":"window-resize-service-f40ec51c.js","mappings":";;;AAIA,MAAM,sBAAsB;;IAK1B;QAJA,sBAAiB,GAAG,yBAAyB,EAAE,CAAC;QAChD,qBAAgB,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAKtF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,QAAQ;YAChD,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aAClC;YACD,IAAI,WAAW,GAAG,yBAAyB,EAAE,CAAC;YAC9C,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,KAAK,WAAW,EAAE;gBAC/C,OAAO,KAAK,CAAC;aACd;YACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACzC,CAAC,CAAC;QAEH,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KAC9C;IAED,YAAY,CAAC,eAAe;QAC1B,OAAO,IAAI,UAAU,CAAC,QAAQ;YAC5B,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC9B,IAAI,SAAS,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;gBACjD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC1B,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;CACF;MAEY,mBAAmB,GAAG,IAAI,sBAAsB;;;;","names":[],"sources":["src/services/window-resize-service.ts"],"sourcesContent":["import { BehaviorSubject, Observable } from \"rxjs\";\nimport { getCurrentBreakpointIndex, getCurrentValue } from \"../utils/utils\";\nimport _ from 'underscore';\n\nclass WindowResizeController {\n currentBreakpoint = getCurrentBreakpointIndex();\n breakpointIndex$: BehaviorSubject<number> = new BehaviorSubject(this.currentBreakpoint);\n timeoutHolder: number;\n // timeoutHolder: Timeout;\n constructor() {\n\n const resizeObserver = new ResizeObserver(_entries => {\n if (this.timeoutHolder) {\n clearTimeout(this.timeoutHolder);\n }\n let activeValue = getCurrentBreakpointIndex();\n if (this.breakpointIndex$.value === activeValue) {\n return false;\n }\n this.breakpointIndex$.next(activeValue);\n });\n\n resizeObserver.observe(window.document.body);\n }\n \n registerProp(activePropValue): Observable<string|boolean|number> {\n return new Observable(observer => {\n observer.next(getCurrentValue(activePropValue));\n this.breakpointIndex$.subscribe(() => {\n let nextValue = getCurrentValue(activePropValue);\n observer.next(nextValue);\n });\n });\n }\n}\n\nexport const WindowResizeService = new WindowResizeController();"],"version":3}
@@ -19,14 +19,14 @@ export declare class ContentAccordion {
19
19
  */
20
20
  animationStart: string;
21
21
  /**
22
- * The ending animation class in case you want to control content styling.
23
- * @type String
24
- */
22
+ * The ending animation class in case you want to control content styling.
23
+ * @type String
24
+ */
25
25
  animationEnd: string;
26
26
  /**
27
- * The amount of time in milliseconds to run the closing animation, before the class is removed
28
- * @type Number
29
- */
27
+ * The amount of time in milliseconds to run the closing animation, before the class is removed
28
+ * @type Number
29
+ */
30
30
  animationTime: number;
31
31
  isOpen: boolean;
32
32
  randomID: string;
@@ -56,14 +56,16 @@ export declare class ContentOverlay {
56
56
  activeClass: string;
57
57
  classString: string;
58
58
  contentOverlayActivated: EventEmitter<HTMLElement>;
59
- contentSlot: HTMLTemplateElement;
59
+ contentSlot: HTMLElement;
60
60
  dialogElement: HTMLDivElement;
61
61
  contentElement: HTMLDivElement;
62
62
  isFullScreen: boolean;
63
+ hasCloseButton: boolean;
64
+ originalMarkup: string;
63
65
  ariaDialog: any;
64
66
  focusTrap: any;
65
67
  onContentBlockActivated(event: CustomEvent): void;
66
- openOverlay(): Promise<boolean>;
68
+ openOverlay(): Promise<void>;
67
69
  closeOverlay(): Promise<void>;
68
70
  setComputedActiveClass(): void;
69
71
  componentWillLoad(): void;
@@ -96,6 +96,11 @@ export namespace Components {
96
96
  * @responsive
97
97
  */
98
98
  "classes": ResponsiveString;
99
+ /**
100
+ * @type Number
101
+ * @responsive
102
+ */
103
+ "columnGap": ResponsiveNumber;
99
104
  /**
100
105
  * @type Number
101
106
  * @responsive
@@ -126,11 +131,12 @@ export namespace Components {
126
131
  /**
127
132
  * Flex or grid
128
133
  * @type Select
134
+ * @options none
129
135
  * @options flex
130
136
  * @options grid
131
137
  * @responsive
132
138
  */
133
- "type": GRID_TYPES;
139
+ "type": GRID_TYPES | ResponsiveString;
134
140
  /**
135
141
  * Vertical axis alignment
136
142
  * @type Select
@@ -163,6 +169,11 @@ export namespace Components {
163
169
  * @responsive
164
170
  */
165
171
  "alt": ResponsiveString;
172
+ /**
173
+ * @type String
174
+ * @responsive
175
+ */
176
+ "aspectRatio": ResponsiveString;
166
177
  /**
167
178
  * @type String
168
179
  * @responsive
@@ -188,6 +199,12 @@ export namespace Components {
188
199
  * @responsive
189
200
  */
190
201
  "src": ResponsiveString;
202
+ /**
203
+ * @type Select
204
+ * @options image
205
+ * @options video
206
+ */
207
+ "type"?: 'image' | 'video';
191
208
  /**
192
209
  * @type Select
193
210
  * @options video/mp4
@@ -287,7 +304,7 @@ export namespace Components {
287
304
  * @responsive
288
305
  */
289
306
  "open": ResponsiveBoolean;
290
- "openOverlay": () => Promise<boolean>;
307
+ "openOverlay": () => Promise<void>;
291
308
  /**
292
309
  * @type String
293
310
  * @responsive
@@ -703,6 +720,11 @@ declare namespace LocalJSX {
703
720
  * @responsive
704
721
  */
705
722
  "classes"?: ResponsiveString;
723
+ /**
724
+ * @type Number
725
+ * @responsive
726
+ */
727
+ "columnGap"?: ResponsiveNumber;
706
728
  /**
707
729
  * @type Number
708
730
  * @responsive
@@ -733,11 +755,12 @@ declare namespace LocalJSX {
733
755
  /**
734
756
  * Flex or grid
735
757
  * @type Select
758
+ * @options none
736
759
  * @options flex
737
760
  * @options grid
738
761
  * @responsive
739
762
  */
740
- "type"?: GRID_TYPES;
763
+ "type"?: GRID_TYPES | ResponsiveString;
741
764
  /**
742
765
  * Vertical axis alignment
743
766
  * @type Select
@@ -770,6 +793,11 @@ declare namespace LocalJSX {
770
793
  * @responsive
771
794
  */
772
795
  "alt"?: ResponsiveString;
796
+ /**
797
+ * @type String
798
+ * @responsive
799
+ */
800
+ "aspectRatio"?: ResponsiveString;
773
801
  /**
774
802
  * @type String
775
803
  * @responsive
@@ -795,6 +823,12 @@ declare namespace LocalJSX {
795
823
  * @responsive
796
824
  */
797
825
  "src": ResponsiveString;
826
+ /**
827
+ * @type Select
828
+ * @options image
829
+ * @options video
830
+ */
831
+ "type"?: 'image' | 'video';
798
832
  /**
799
833
  * @type Select
800
834
  * @options video/mp4
@@ -35,6 +35,17 @@ export declare class ContentImage {
35
35
  * @responsive
36
36
  */
37
37
  height: ResponsiveNumber;
38
+ /**
39
+ * @type String
40
+ * @responsive
41
+ */
42
+ aspectRatio: ResponsiveString;
43
+ /**
44
+ * @type Select
45
+ * @options image
46
+ * @options video
47
+ */
48
+ type?: 'image' | 'video';
38
49
  /**
39
50
  * @type Select
40
51
  * @options video/mp4
@@ -54,6 +65,7 @@ export declare class ContentImage {
54
65
  [key: string]: string;
55
66
  };
56
67
  hasMediaContent: boolean;
68
+ pictureImageSrc: string;
57
69
  preloadImage(src: any): Promise<unknown>;
58
70
  componentWillLoad(): void;
59
71
  watchLazyLoadIsComplete(newValue: boolean): void;
@@ -13,11 +13,12 @@ export declare class ContentGridFormatter {
13
13
  /**
14
14
  * Flex or grid
15
15
  * @type Select
16
+ * @options none
16
17
  * @options flex
17
18
  * @options grid
18
19
  * @responsive
19
20
  */
20
- type: GRID_TYPES;
21
+ type: GRID_TYPES | ResponsiveString;
21
22
  /**
22
23
  * Setting this true to will grow all children. Alternatively, add the attribute [flex-grow="true"] to a specific grid child and that child will grow.
23
24
  * @type Boolean
@@ -55,11 +56,16 @@ export declare class ContentGridFormatter {
55
56
  * @responsive
56
57
  */
57
58
  columns: ResponsiveNumber;
59
+ /**
60
+ * @type Number
61
+ * @responsive
62
+ */
63
+ columnGap: ResponsiveNumber;
58
64
  activeClassString: string;
59
65
  inlineStyle: {
60
66
  [key: string]: string;
61
67
  };
62
- componentDidLoad(): Promise<[PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>]>;
68
+ componentWillLoad(): Promise<[PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>, PromiseSettledResult<import("rxjs").Subscription>]>;
63
69
  render(): any;
64
70
  }
65
71
  //# sourceMappingURL=content-grid-formatter.d.ts.map
@@ -1,6 +1,6 @@
1
- export type GRID_TYPES = "flex" | "grid";
1
+ export type GRID_TYPES = 'none' | 'flex' | 'grid';
2
2
 
3
- export type FLEX_JUSTIFY_OPTIONS = "flex-start" | "space-between" | "center" | "space-evenly";
3
+ export type FLEX_JUSTIFY_OPTIONS = 'flex-start' | 'space-between' | 'center' | 'space-evenly';
4
4
 
5
5
  export type ContentLineTextAlignOptions = 'default' | 'left' | 'center' | 'right';
6
6
 
@@ -8,4 +8,4 @@ export type ContentVerticalAlignments = 'top' | 'center' | 'bottom';
8
8
 
9
9
  export type ResponsiveNumber = string;
10
10
  export type ResponsiveString = string;
11
- export type ResponsiveBoolean = string;
11
+ export type ResponsiveBoolean = string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@content-blocks/js",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "https://contentblocksjs.com/",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/loader/index.js",