@pixelated-tech/components 3.1.4
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/README.md +231 -0
- package/dist/components/buzzwordbingo/buzzwordbingo.css +42 -0
- package/dist/components/buzzwordbingo/buzzwordbingo.js +35 -0
- package/dist/components/callout/callout.js +95 -0
- package/dist/components/callout/callout.scss +331 -0
- package/dist/components/carousel/carousel.css +178 -0
- package/dist/components/carousel/carousel.drag.js +203 -0
- package/dist/components/carousel/carousel.js +124 -0
- package/dist/components/cms/calendly.js +20 -0
- package/dist/components/cms/cloudinary.image.js +132 -0
- package/dist/components/cms/cloudinary.js +106 -0
- package/dist/components/cms/contentful.delivery.js +247 -0
- package/dist/components/cms/contentful.items.components.js +243 -0
- package/dist/components/cms/contentful.items.css +131 -0
- package/dist/components/cms/contentful.management.js +254 -0
- package/dist/components/cms/flickr.js +160 -0
- package/dist/components/cms/google.reviews.components.js +36 -0
- package/dist/components/cms/google.reviews.functions.js +26 -0
- package/dist/components/cms/gravatar.components.js +41 -0
- package/dist/components/cms/gravatar.functions.js +52 -0
- package/dist/components/cms/hubspot.components.js +45 -0
- package/dist/components/cms/hubspot.js +34 -0
- package/dist/components/cms/instagram.components.js +40 -0
- package/dist/components/cms/instagram.functions.js +67 -0
- package/dist/components/cms/wordpress.components.js +47 -0
- package/dist/components/cms/wordpress.css +55 -0
- package/dist/components/cms/wordpress.functions.js +49 -0
- package/dist/components/config/config.client.js +22 -0
- package/dist/components/config/config.example.js +70 -0
- package/dist/components/config/config.js +53 -0
- package/dist/components/config/config.server.js +11 -0
- package/dist/components/config/config.types.js +2 -0
- package/dist/components/general/css.js +60 -0
- package/dist/components/general/headers.css +16 -0
- package/dist/components/general/headers.js +27 -0
- package/dist/components/general/image.js +81 -0
- package/dist/components/general/layout.js +147 -0
- package/dist/components/general/layout.scss +47 -0
- package/dist/components/general/loading.js +36 -0
- package/dist/components/general/loading.scss +80 -0
- package/dist/components/general/microinteractions.css +229 -0
- package/dist/components/general/microinteractions.js +87 -0
- package/dist/components/general/modal.css +65 -0
- package/dist/components/general/modal.js +52 -0
- package/dist/components/general/table.css +73 -0
- package/dist/components/general/table.js +108 -0
- package/dist/components/linkedin/pixelated.linkedin.js +180 -0
- package/dist/components/linkedin/pixelated.linkedin1.js +102 -0
- package/dist/components/linkedin/pixelated.linkedin2.js +92 -0
- package/dist/components/markdown/markdown.css +12 -0
- package/dist/components/markdown/markdown.js +39 -0
- package/dist/components/menu/menu-accordion.css +198 -0
- package/dist/components/menu/menu-accordion.js +183 -0
- package/dist/components/menu/menu-expando.css +127 -0
- package/dist/components/menu/menu-expando.js +48 -0
- package/dist/components/menu/menu-simple.css +76 -0
- package/dist/components/menu/menu-simple.js +56 -0
- package/dist/components/nerdjoke/nerdjoke.css +69 -0
- package/dist/components/nerdjoke/nerdjoke.js +95 -0
- package/dist/components/pagebuilder/components/ComponentPropertiesForm.js +15 -0
- package/dist/components/pagebuilder/components/ComponentSelector.js +67 -0
- package/dist/components/pagebuilder/components/ComponentTree.js +95 -0
- package/dist/components/pagebuilder/components/PageBuilderUI.js +48 -0
- package/dist/components/pagebuilder/components/PageEngine.js +97 -0
- package/dist/components/pagebuilder/components/SaveLoadSection.js +168 -0
- package/dist/components/pagebuilder/components/pagebuilder.scss +123 -0
- package/dist/components/pagebuilder/form/form.css +101 -0
- package/dist/components/pagebuilder/form/form.js +455 -0
- package/dist/components/pagebuilder/form/form.submit.js +65 -0
- package/dist/components/pagebuilder/form/formcomponents.js +359 -0
- package/dist/components/pagebuilder/form/formvalidations.js +80 -0
- package/dist/components/pagebuilder/lib/componentGeneration.js +105 -0
- package/dist/components/pagebuilder/lib/componentMap.js +32 -0
- package/dist/components/pagebuilder/lib/componentMetadata.js +146 -0
- package/dist/components/pagebuilder/lib/pageStorageContentful.js +142 -0
- package/dist/components/pagebuilder/lib/pageStorageLocal.js +143 -0
- package/dist/components/pagebuilder/lib/pageStorageTypes.js +1 -0
- package/dist/components/pagebuilder/lib/propTypeIntrospection.js +177 -0
- package/dist/components/pagebuilder/lib/types.js +4 -0
- package/dist/components/pagebuilder/lib/usePageBuilder.js +234 -0
- package/dist/components/recipe/recipe.css +107 -0
- package/dist/components/recipe/recipe.js +161 -0
- package/dist/components/resume/resume.css +162 -0
- package/dist/components/resume/resume.js +195 -0
- package/dist/components/seo/404.css +25 -0
- package/dist/components/seo/404.js +32 -0
- package/dist/components/seo/googleanalytics.js +70 -0
- package/dist/components/seo/googlemap.js +15 -0
- package/dist/components/seo/googlesearch.css +30 -0
- package/dist/components/seo/googlesearch.js +37 -0
- package/dist/components/seo/metadata.js +156 -0
- package/dist/components/seo/sitemap.js +171 -0
- package/dist/components/shoppingcart/ebay.components.js +203 -0
- package/dist/components/shoppingcart/ebay.css +131 -0
- package/dist/components/shoppingcart/ebay.functions.js +240 -0
- package/dist/components/shoppingcart/paypal.js +169 -0
- package/dist/components/shoppingcart/shoppingcart.components.js +257 -0
- package/dist/components/shoppingcart/shoppingcart.css +122 -0
- package/dist/components/shoppingcart/shoppingcart.functions.js +324 -0
- package/dist/components/sidepanel/sidepanel.css +129 -0
- package/dist/components/sidepanel/sidepanel.js +54 -0
- package/dist/components/socialcard/socialcard.css +118 -0
- package/dist/components/socialcard/socialcard.js +317 -0
- package/dist/components/tiles/tiles.css +77 -0
- package/dist/components/tiles/tiles.js +38 -0
- package/dist/components/timeline/timeline.css +139 -0
- package/dist/components/timeline/timeline.js +28 -0
- package/dist/components/utilities/api.js +36 -0
- package/dist/components/utilities/functions.js +98 -0
- package/dist/components/yelp/yelp.js +50 -0
- package/dist/css/pixelated.font.scss +68 -0
- package/dist/css/pixelated.global.css +548 -0
- package/dist/css/pixelated.grid.scss +82 -0
- package/dist/data/404-data.json +104 -0
- package/dist/data/buzzwords.js +28 -0
- package/dist/data/form.json +370 -0
- package/dist/data/recipes.json +1917 -0
- package/dist/data/references.json +139 -0
- package/dist/data/requests.json +137 -0
- package/dist/data/resume.json +2577 -0
- package/dist/data/routes.json +184 -0
- package/dist/data/routes2.json +117 -0
- package/dist/data/shipping.to.json +422 -0
- package/dist/index.js +78 -0
- package/dist/index.server.js +35 -0
- package/dist/types/components/buzzwordbingo/buzzwordbingo.d.ts +26 -0
- package/dist/types/components/buzzwordbingo/buzzwordbingo.d.ts.map +1 -0
- package/dist/types/components/callout/callout.d.ts +53 -0
- package/dist/types/components/callout/callout.d.ts.map +1 -0
- package/dist/types/components/carousel/carousel.d.ts +28 -0
- package/dist/types/components/carousel/carousel.d.ts.map +1 -0
- package/dist/types/components/carousel/carousel.drag.d.ts +12 -0
- package/dist/types/components/carousel/carousel.drag.d.ts.map +1 -0
- package/dist/types/components/cms/calendly.d.ts +11 -0
- package/dist/types/components/cms/calendly.d.ts.map +1 -0
- package/dist/types/components/cms/cloudinary.d.ts +27 -0
- package/dist/types/components/cms/cloudinary.d.ts.map +1 -0
- package/dist/types/components/cms/cloudinary.image.d.ts +56 -0
- package/dist/types/components/cms/cloudinary.image.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.delivery.d.ts +149 -0
- package/dist/types/components/cms/contentful.delivery.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.items.components.d.ts +38 -0
- package/dist/types/components/cms/contentful.items.components.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.management.d.ts +71 -0
- package/dist/types/components/cms/contentful.management.d.ts.map +1 -0
- package/dist/types/components/cms/flickr.d.ts +39 -0
- package/dist/types/components/cms/flickr.d.ts.map +1 -0
- package/dist/types/components/cms/google.reviews.components.d.ts +7 -0
- package/dist/types/components/cms/google.reviews.components.d.ts.map +1 -0
- package/dist/types/components/cms/google.reviews.functions.d.ts +25 -0
- package/dist/types/components/cms/google.reviews.functions.d.ts.map +1 -0
- package/dist/types/components/cms/gravatar.components.d.ts +26 -0
- package/dist/types/components/cms/gravatar.components.d.ts.map +1 -0
- package/dist/types/components/cms/gravatar.functions.d.ts +53 -0
- package/dist/types/components/cms/gravatar.functions.d.ts.map +1 -0
- package/dist/types/components/cms/hubspot.components.d.ts +15 -0
- package/dist/types/components/cms/hubspot.components.d.ts.map +1 -0
- package/dist/types/components/cms/hubspot.d.ts +18 -0
- package/dist/types/components/cms/hubspot.d.ts.map +1 -0
- package/dist/types/components/cms/instagram.components.d.ts +10 -0
- package/dist/types/components/cms/instagram.components.d.ts.map +1 -0
- package/dist/types/components/cms/instagram.functions.d.ts +63 -0
- package/dist/types/components/cms/instagram.functions.d.ts.map +1 -0
- package/dist/types/components/cms/wordpress.components.d.ts +11 -0
- package/dist/types/components/cms/wordpress.components.d.ts.map +1 -0
- package/dist/types/components/cms/wordpress.functions.d.ts +28 -0
- package/dist/types/components/cms/wordpress.functions.d.ts.map +1 -0
- package/dist/types/components/config/config.client.d.ts +13 -0
- package/dist/types/components/config/config.client.d.ts.map +1 -0
- package/dist/types/components/config/config.d.ts +12 -0
- package/dist/types/components/config/config.d.ts.map +1 -0
- package/dist/types/components/config/config.example.d.ts +4 -0
- package/dist/types/components/config/config.example.d.ts.map +1 -0
- package/dist/types/components/config/config.server.d.ts +7 -0
- package/dist/types/components/config/config.server.d.ts.map +1 -0
- package/dist/types/components/config/config.types.d.ts +84 -0
- package/dist/types/components/config/config.types.d.ts.map +1 -0
- package/dist/types/components/general/css.d.ts +3 -0
- package/dist/types/components/general/css.d.ts.map +1 -0
- package/dist/types/components/general/headers.d.ts +19 -0
- package/dist/types/components/general/headers.d.ts.map +1 -0
- package/dist/types/components/general/image.d.ts +3 -0
- package/dist/types/components/general/image.d.ts.map +1 -0
- package/dist/types/components/general/layout.d.ts +73 -0
- package/dist/types/components/general/layout.d.ts.map +1 -0
- package/dist/types/components/general/loading.d.ts +11 -0
- package/dist/types/components/general/loading.d.ts.map +1 -0
- package/dist/types/components/general/microinteractions.d.ts +20 -0
- package/dist/types/components/general/microinteractions.d.ts.map +1 -0
- package/dist/types/components/general/modal.d.ts +8 -0
- package/dist/types/components/general/modal.d.ts.map +1 -0
- package/dist/types/components/general/table.d.ts +12 -0
- package/dist/types/components/general/table.d.ts.map +1 -0
- package/dist/types/components/linkedin/pixelated.linkedin.d.ts +2 -0
- package/dist/types/components/linkedin/pixelated.linkedin.d.ts.map +1 -0
- package/dist/types/components/linkedin/pixelated.linkedin1.d.ts +2 -0
- package/dist/types/components/linkedin/pixelated.linkedin1.d.ts.map +1 -0
- package/dist/types/components/linkedin/pixelated.linkedin2.d.ts +2 -0
- package/dist/types/components/linkedin/pixelated.linkedin2.d.ts.map +1 -0
- package/dist/types/components/markdown/markdown.d.ts +12 -0
- package/dist/types/components/markdown/markdown.d.ts.map +1 -0
- package/dist/types/components/menu/menu-accordion.d.ts +44 -0
- package/dist/types/components/menu/menu-accordion.d.ts.map +1 -0
- package/dist/types/components/menu/menu-expando.d.ts +20 -0
- package/dist/types/components/menu/menu-expando.d.ts.map +1 -0
- package/dist/types/components/menu/menu-simple.d.ts +28 -0
- package/dist/types/components/menu/menu-simple.d.ts.map +1 -0
- package/dist/types/components/nerdjoke/nerdjoke.d.ts +23 -0
- package/dist/types/components/nerdjoke/nerdjoke.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/ComponentPropertiesForm.d.ts +11 -0
- package/dist/types/components/pagebuilder/components/ComponentPropertiesForm.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/ComponentSelector.d.ts +15 -0
- package/dist/types/components/pagebuilder/components/ComponentSelector.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/ComponentTree.d.ts +17 -0
- package/dist/types/components/pagebuilder/components/ComponentTree.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/PageBuilderUI.d.ts +10 -0
- package/dist/types/components/pagebuilder/components/PageBuilderUI.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/PageEngine.d.ts +23 -0
- package/dist/types/components/pagebuilder/components/PageEngine.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/SaveLoadSection.d.ts +12 -0
- package/dist/types/components/pagebuilder/components/SaveLoadSection.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/form.d.ts +46 -0
- package/dist/types/components/pagebuilder/form/form.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/form.submit.d.ts +3 -0
- package/dist/types/components/pagebuilder/form/form.submit.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/formcomponents.d.ts +205 -0
- package/dist/types/components/pagebuilder/form/formcomponents.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/formvalidations.d.ts +29 -0
- package/dist/types/components/pagebuilder/form/formvalidations.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/componentGeneration.d.ts +17 -0
- package/dist/types/components/pagebuilder/lib/componentGeneration.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts +25 -0
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/componentMetadata.d.ts +22 -0
- package/dist/types/components/pagebuilder/lib/componentMetadata.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/pageStorageContentful.d.ts +25 -0
- package/dist/types/components/pagebuilder/lib/pageStorageContentful.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/pageStorageLocal.d.ts +23 -0
- package/dist/types/components/pagebuilder/lib/pageStorageLocal.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/pageStorageTypes.d.ts +25 -0
- package/dist/types/components/pagebuilder/lib/pageStorageTypes.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/propTypeIntrospection.d.ts +24 -0
- package/dist/types/components/pagebuilder/lib/propTypeIntrospection.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/types.d.ts +34 -0
- package/dist/types/components/pagebuilder/lib/types.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/usePageBuilder.d.ts +24 -0
- package/dist/types/components/pagebuilder/lib/usePageBuilder.d.ts.map +1 -0
- package/dist/types/components/recipe/recipe.d.ts +66 -0
- package/dist/types/components/recipe/recipe.d.ts.map +1 -0
- package/dist/types/components/resume/resume.d.ts +85 -0
- package/dist/types/components/resume/resume.d.ts.map +1 -0
- package/dist/types/components/seo/404.d.ts +10 -0
- package/dist/types/components/seo/404.d.ts.map +1 -0
- package/dist/types/components/seo/googleanalytics.d.ts +23 -0
- package/dist/types/components/seo/googleanalytics.d.ts.map +1 -0
- package/dist/types/components/seo/googlemap.d.ts +15 -0
- package/dist/types/components/seo/googlemap.d.ts.map +1 -0
- package/dist/types/components/seo/googlesearch.d.ts +10 -0
- package/dist/types/components/seo/googlesearch.d.ts.map +1 -0
- package/dist/types/components/seo/metadata.d.ts +35 -0
- package/dist/types/components/seo/metadata.d.ts.map +1 -0
- package/dist/types/components/seo/sitemap.d.ts +47 -0
- package/dist/types/components/seo/sitemap.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/ebay.components.d.ts +46 -0
- package/dist/types/components/shoppingcart/ebay.components.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/ebay.functions.d.ts +76 -0
- package/dist/types/components/shoppingcart/ebay.functions.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/paypal.d.ts +16 -0
- package/dist/types/components/shoppingcart/paypal.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/shoppingcart.components.d.ts +35 -0
- package/dist/types/components/shoppingcart/shoppingcart.components.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts +89 -0
- package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts.map +1 -0
- package/dist/types/components/sidepanel/sidepanel.d.ts +18 -0
- package/dist/types/components/sidepanel/sidepanel.d.ts.map +1 -0
- package/dist/types/components/socialcard/socialcard.d.ts +20 -0
- package/dist/types/components/socialcard/socialcard.d.ts.map +1 -0
- package/dist/types/components/tiles/tiles.d.ts +28 -0
- package/dist/types/components/tiles/tiles.d.ts.map +1 -0
- package/dist/types/components/timeline/timeline.d.ts +31 -0
- package/dist/types/components/timeline/timeline.d.ts.map +1 -0
- package/dist/types/components/utilities/api.d.ts +16 -0
- package/dist/types/components/utilities/api.d.ts.map +1 -0
- package/dist/types/components/utilities/functions.d.ts +11 -0
- package/dist/types/components/utilities/functions.d.ts.map +1 -0
- package/dist/types/components/yelp/yelp.d.ts +5 -0
- package/dist/types/components/yelp/yelp.d.ts.map +1 -0
- package/dist/types/data/buzzwords.d.ts +2 -0
- package/dist/types/data/buzzwords.d.ts.map +1 -0
- package/dist/types/index.d.ts +76 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.server.d.ts +30 -0
- package/dist/types/index.server.d.ts.map +1 -0
- package/dist/types/stories/buzzword-bingo.stories.d.ts +13 -0
- package/dist/types/stories/buzzword-bingo.stories.d.ts.map +1 -0
- package/dist/types/stories/callout.many.stories.d.ts +8 -0
- package/dist/types/stories/callout.many.stories.d.ts.map +1 -0
- package/dist/types/stories/callout.stories.d.ts +69 -0
- package/dist/types/stories/callout.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel-hero.stories.d.ts +22 -0
- package/dist/types/stories/carousel-hero.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel-reviews.stories.d.ts +38 -0
- package/dist/types/stories/carousel-reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel-workportfolio.stories.d.ts +22 -0
- package/dist/types/stories/carousel-workportfolio.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel.stories.d.ts +41 -0
- package/dist/types/stories/carousel.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.contentful.item.stories.d.ts +21 -0
- package/dist/types/stories/cms.contentful.item.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.contentful.items.stories.d.ts +20 -0
- package/dist/types/stories/cms.contentful.items.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.contentful.stories.d.ts +9 -0
- package/dist/types/stories/cms.contentful.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.google.reviews.stories.d.ts +11 -0
- package/dist/types/stories/cms.google.reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.gravatar.stories.d.ts +88 -0
- package/dist/types/stories/cms.gravatar.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.instagram.stories.d.ts +16 -0
- package/dist/types/stories/cms.instagram.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.wordpress.stories.d.ts +26 -0
- package/dist/types/stories/cms.wordpress.stories.d.ts.map +1 -0
- package/dist/types/stories/general.headers.stories.d.ts +27 -0
- package/dist/types/stories/general.headers.stories.d.ts.map +1 -0
- package/dist/types/stories/general.loading.stories.d.ts +11 -0
- package/dist/types/stories/general.loading.stories.d.ts.map +1 -0
- package/dist/types/stories/general.microinteractions.stories.d.ts +9 -0
- package/dist/types/stories/general.microinteractions.stories.d.ts.map +1 -0
- package/dist/types/stories/general.modal.stories.d.ts +9 -0
- package/dist/types/stories/general.modal.stories.d.ts.map +1 -0
- package/dist/types/stories/general.table.stories.d.ts +15 -0
- package/dist/types/stories/general.table.stories.d.ts.map +1 -0
- package/dist/types/stories/layout.stories.d.ts +299 -0
- package/dist/types/stories/layout.stories.d.ts.map +1 -0
- package/dist/types/stories/markdown.stories.d.ts +13 -0
- package/dist/types/stories/markdown.stories.d.ts.map +1 -0
- package/dist/types/stories/menu-accordion.stories.d.ts +34 -0
- package/dist/types/stories/menu-accordion.stories.d.ts.map +1 -0
- package/dist/types/stories/menu-simple.stories.d.ts +43 -0
- package/dist/types/stories/menu-simple.stories.d.ts.map +1 -0
- package/dist/types/stories/nerdjoke.stories.d.ts +10 -0
- package/dist/types/stories/nerdjoke.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.form-builder.stories.d.ts +10 -0
- package/dist/types/stories/pagebuilder.form-builder.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.form-engine.stories.d.ts +16 -0
- package/dist/types/stories/pagebuilder.form-engine.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.form-extractor.stories.d.ts +10 -0
- package/dist/types/stories/pagebuilder.form-extractor.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.stories.d.ts +29 -0
- package/dist/types/stories/pagebuilder.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.usageguide.stories.d.ts +29 -0
- package/dist/types/stories/pagebuilder.usageguide.stories.d.ts.map +1 -0
- package/dist/types/stories/pageengine.stories.d.ts +32 -0
- package/dist/types/stories/pageengine.stories.d.ts.map +1 -0
- package/dist/types/stories/recipe.stories.d.ts +16 -0
- package/dist/types/stories/recipe.stories.d.ts.map +1 -0
- package/dist/types/stories/resume.stories.d.ts +283 -0
- package/dist/types/stories/resume.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.404.stories.d.ts +18 -0
- package/dist/types/stories/seo.404.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.googleanalytics.stories.d.ts +12 -0
- package/dist/types/stories/seo.googleanalytics.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.googlesearch.stories.d.ts +12 -0
- package/dist/types/stories/seo.googlesearch.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.metadata.stories.d.ts +25 -0
- package/dist/types/stories/seo.metadata.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.sitemap.stories.d.ts +8 -0
- package/dist/types/stories/seo.sitemap.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart.ebay.item.stories.d.ts +21 -0
- package/dist/types/stories/shoppingcart.ebay.item.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart.ebay.items.stories.d.ts +21 -0
- package/dist/types/stories/shoppingcart.ebay.items.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart.stories.d.ts +9 -0
- package/dist/types/stories/shoppingcart.stories.d.ts.map +1 -0
- package/dist/types/stories/sidepanel.stories.d.ts +85 -0
- package/dist/types/stories/sidepanel.stories.d.ts.map +1 -0
- package/dist/types/stories/socialcard.stories.d.ts +81 -0
- package/dist/types/stories/socialcard.stories.d.ts.map +1 -0
- package/dist/types/stories/tiles.stories.d.ts +9 -0
- package/dist/types/stories/tiles.stories.d.ts.map +1 -0
- package/dist/types/stories/timeline.stories.d.ts +19 -0
- package/dist/types/stories/timeline.stories.d.ts.map +1 -0
- package/dist/types/tests/pixelated.api.test.d.ts +2 -0
- package/dist/types/tests/pixelated.api.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.callout.test.d.ts +2 -0
- package/dist/types/tests/pixelated.callout.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.carousel.test.d.ts +2 -0
- package/dist/types/tests/pixelated.carousel.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.menu-accordion.test.d.ts +2 -0
- package/dist/types/tests/pixelated.menu-accordion.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.menu-simple.test.d.ts +2 -0
- package/dist/types/tests/pixelated.menu-simple.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.nerdjoke.test.d.ts +2 -0
- package/dist/types/tests/pixelated.nerdjoke.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.recipe.test.d.ts +2 -0
- package/dist/types/tests/pixelated.recipe.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.resume.test.d.ts +2 -0
- package/dist/types/tests/pixelated.resume.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.socialcard.test.d.ts +2 -0
- package/dist/types/tests/pixelated.socialcard.test.d.ts.map +1 -0
- package/package.json +136 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { generateURL } from '../utilities/api';
|
|
3
|
+
import { mergeDeep } from '../utilities/functions';
|
|
4
|
+
const defaultFlickr = {
|
|
5
|
+
flickr: {
|
|
6
|
+
baseURL: 'https://api.flickr.com/services/rest/?',
|
|
7
|
+
urlProps: {
|
|
8
|
+
method: 'flickr.photos.search',
|
|
9
|
+
api_key: '882cab5548d53c9e6b5fb24d59cc321d',
|
|
10
|
+
user_id: '15473210@N04',
|
|
11
|
+
tags: 'pixelatedviewsgallery',
|
|
12
|
+
extras: 'date_taken,description,owner_name',
|
|
13
|
+
sort: 'date-taken-desc',
|
|
14
|
+
per_page: 500,
|
|
15
|
+
format: 'json',
|
|
16
|
+
photoSize: 'Medium',
|
|
17
|
+
nojsoncallback: 'true' /*,
|
|
18
|
+
startPos: 0 */
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
function getFlickrSize(size) {
|
|
23
|
+
// https://www.flickr.com/services/api/misc.urls.html
|
|
24
|
+
switch (size) {
|
|
25
|
+
case 'Square': return '_s'; // 75
|
|
26
|
+
case 'Large Square': return '_q'; // 150
|
|
27
|
+
case 'Thumbnail': return '_t'; // 100
|
|
28
|
+
case 'Small': return '_m'; // 240
|
|
29
|
+
case 'Small 320': return '_n'; // 320
|
|
30
|
+
case 'Medium': return ''; // 500
|
|
31
|
+
case 'Medium 640': return '_z'; // 640
|
|
32
|
+
case 'Medium 800': return '_c'; // 800
|
|
33
|
+
case 'Large': return '_b'; // 1024
|
|
34
|
+
// case "Large2" : return "_h"; // 1600 + secret
|
|
35
|
+
// case "Large3" : return "_k"; // 2048 + secret
|
|
36
|
+
// case "XL3K" : return "_3k"; // 3072 + secret
|
|
37
|
+
// case "XL4K" : return "_4k"; // 4096 + secret
|
|
38
|
+
// case "XLF" : return "_f"; // 4096 + secret - only 2:1 aspect ratio
|
|
39
|
+
// case "XL5K" : return "_5k"; // 5120 + secret
|
|
40
|
+
// case "XL6K" : return "_6k"; // 6144 + secret
|
|
41
|
+
// case "Original" : return "_o"; // secret + EXIF data; not rotated, ? ext
|
|
42
|
+
default: return '';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
GetFlickrData.PropTypes = {
|
|
46
|
+
flickr: PropTypes.object.isRequired,
|
|
47
|
+
};
|
|
48
|
+
export function GetFlickrData(props) {
|
|
49
|
+
const debug = false;
|
|
50
|
+
const flickr = mergeDeep(defaultFlickr.flickr, props.flickr);
|
|
51
|
+
const myURL = generateURL(flickr.baseURL, flickr.urlProps);
|
|
52
|
+
const fetchFlickrData = async () => {
|
|
53
|
+
try {
|
|
54
|
+
const response = await fetch(myURL);
|
|
55
|
+
if (!response.ok) {
|
|
56
|
+
throw new Error(`HTTP error! Status: ${response.status}`);
|
|
57
|
+
}
|
|
58
|
+
const jsonData = await response.json();
|
|
59
|
+
let myFlickrImages = [];
|
|
60
|
+
if (jsonData.photos) {
|
|
61
|
+
// photos for tags - flickr.photos.search
|
|
62
|
+
myFlickrImages = jsonData.photos.photo;
|
|
63
|
+
}
|
|
64
|
+
else if (jsonData.photoset) {
|
|
65
|
+
// photoset for albums - flickr.photosets.getPhotos
|
|
66
|
+
myFlickrImages = jsonData.photoset.photo;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
console.log('Error fetching Flickr images');
|
|
70
|
+
}
|
|
71
|
+
myFlickrImages.sort((a, b) => {
|
|
72
|
+
return new Date(b.datetaken).getTime() - new Date(a.datetaken).getTime();
|
|
73
|
+
}); // b - a for reverse sort
|
|
74
|
+
if (debug)
|
|
75
|
+
console.log('Flickr Cards:', myFlickrImages);
|
|
76
|
+
return myFlickrImages;
|
|
77
|
+
// const myFlickrCards = GenerateFlickrCards(myFlickrImages);
|
|
78
|
+
// console.log('Flickr Cards:', myFlickrCards);
|
|
79
|
+
// return myFlickrCards;
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
console.log('Error fetching Flickr data:', err);
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
if (debug)
|
|
86
|
+
console.log('Flickr data fetch completed');
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return fetchFlickrData();
|
|
90
|
+
}
|
|
91
|
+
GenerateFlickrCards.propTypes = {
|
|
92
|
+
flickrImages: PropTypes.array.isRequired,
|
|
93
|
+
photoSize: PropTypes.string.isRequired,
|
|
94
|
+
};
|
|
95
|
+
export function GenerateFlickrCards(props) {
|
|
96
|
+
if (props.flickrImages?.length > 0) {
|
|
97
|
+
const photoSize = getFlickrSize(props.photoSize);
|
|
98
|
+
const flickrCards = props.flickrImages.map((image, i) => ({
|
|
99
|
+
link: 'https://farm' + image.farm + '.static.flickr.com/' + image.server + '/' + image.id + '_' + image.secret + photoSize + '.jpg',
|
|
100
|
+
image: 'https://farm' + image.farm + '.static.flickr.com/' + image.server + '/' + image.id + '_' + image.secret + photoSize + '.jpg',
|
|
101
|
+
imageAlt: image.title,
|
|
102
|
+
headerText: image.title,
|
|
103
|
+
subHeaderText: (i + 1) + " of " + props.flickrImages.length + " by " + image.ownername + " on " + image.datetaken,
|
|
104
|
+
bodyText: image.description._content,
|
|
105
|
+
}));
|
|
106
|
+
return flickrCards;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
FlickrWrapper.propTypes = {
|
|
110
|
+
method: PropTypes.string,
|
|
111
|
+
api_key: PropTypes.string.isRequired,
|
|
112
|
+
user_id: PropTypes.string.isRequired,
|
|
113
|
+
tags: PropTypes.string,
|
|
114
|
+
photoset_id: PropTypes.string,
|
|
115
|
+
photoSize: PropTypes.string,
|
|
116
|
+
callback: PropTypes.func.isRequired,
|
|
117
|
+
/* callback: (arg0: CarouselCardType[]) => void; */
|
|
118
|
+
};
|
|
119
|
+
export function FlickrWrapper(props) {
|
|
120
|
+
const flickr = {
|
|
121
|
+
flickr: {
|
|
122
|
+
baseURL: 'https://api.flickr.com/services/rest/?',
|
|
123
|
+
urlProps: {
|
|
124
|
+
method: props.method || 'flickr.photos.search',
|
|
125
|
+
api_key: props.api_key /* || '882cab5548d53c9e6b5fb24d59cc321d' */,
|
|
126
|
+
user_id: props.user_id /* || '15473210@N04' */,
|
|
127
|
+
tags: props.tags || '' /* || 'btw-customsunglasses' */,
|
|
128
|
+
photoset_id: props.photoset_id || '',
|
|
129
|
+
photoSize: props.photoSize || 'Large',
|
|
130
|
+
extras: 'date_taken,description,owner_name',
|
|
131
|
+
sort: 'date-taken-desc',
|
|
132
|
+
per_page: 500,
|
|
133
|
+
format: 'json',
|
|
134
|
+
nojsoncallback: 'true'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
async function getFlickrCards() {
|
|
139
|
+
const myPromise = GetFlickrData(flickr);
|
|
140
|
+
const myFlickrImages = await myPromise;
|
|
141
|
+
const myPhotoSize = flickr.flickr.urlProps.photoSize;
|
|
142
|
+
const myFlickrCards = GenerateFlickrCards({ flickrImages: myFlickrImages, photoSize: myPhotoSize });
|
|
143
|
+
// REMOVE LINKS
|
|
144
|
+
if (myFlickrCards) {
|
|
145
|
+
const myScrubbedFlickrCards = myFlickrCards.map((obj, index) => {
|
|
146
|
+
return {
|
|
147
|
+
index: index,
|
|
148
|
+
cardIndex: index,
|
|
149
|
+
cardLength: myFlickrCards.length,
|
|
150
|
+
image: obj.image,
|
|
151
|
+
imageAlt: obj.imageAlt,
|
|
152
|
+
subHeaderText: obj.subHeaderText
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
props.callback(myScrubbedFlickrCards);
|
|
156
|
+
return myScrubbedFlickrCards;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return getFlickrCards();
|
|
160
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { getGoogleReviewsByPlaceId } from './google.reviews.functions';
|
|
5
|
+
export function GoogleReviewsCard(props) {
|
|
6
|
+
const [place, setPlace] = useState();
|
|
7
|
+
const [reviews, setReviews] = useState([]);
|
|
8
|
+
const [loading, setLoading] = useState(true);
|
|
9
|
+
const [error, setError] = useState(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
(async () => {
|
|
12
|
+
try {
|
|
13
|
+
const result = await getGoogleReviewsByPlaceId({
|
|
14
|
+
placeId: props.placeId,
|
|
15
|
+
language: props.language,
|
|
16
|
+
maxReviews: props.maxReviews,
|
|
17
|
+
proxyBase: props.proxyBase,
|
|
18
|
+
});
|
|
19
|
+
setPlace(result.place);
|
|
20
|
+
setReviews(result.reviews);
|
|
21
|
+
setLoading(false);
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
setError(e?.message || 'Failed to fetch reviews');
|
|
25
|
+
setLoading(false);
|
|
26
|
+
}
|
|
27
|
+
})();
|
|
28
|
+
}, [props.placeId, props.language, props.maxReviews, props.proxyBase]);
|
|
29
|
+
if (loading) {
|
|
30
|
+
return (_jsx("div", { style: { padding: 16 }, children: _jsx("p", { children: "Loading reviews..." }) }));
|
|
31
|
+
}
|
|
32
|
+
if (error) {
|
|
33
|
+
return (_jsx("div", { style: { padding: 16 }, children: _jsxs("p", { style: { color: 'tomato' }, children: ["Error: ", error] }) }));
|
|
34
|
+
}
|
|
35
|
+
return (_jsxs("div", { style: { padding: 16 }, children: [_jsx("h3", { children: place?.name || 'Reviews' }), place?.formatted_address && (_jsx("p", { style: { fontSize: '0.9em', color: '#666', marginBottom: 16 }, children: place.formatted_address })), reviews.length === 0 ? (_jsx("p", { children: "No reviews found." })) : (_jsx("ul", { style: { listStyle: 'none', padding: 0 }, children: reviews.map((r, i) => (_jsxs("li", { style: { marginBottom: 16, borderBottom: '1px solid #eee', paddingBottom: 12 }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', marginBottom: 8 }, children: [r.profile_photo_url && (_jsx("img", { src: r.profile_photo_url, alt: r.author_name, style: { width: 40, height: 40, borderRadius: '50%', marginRight: 12 } })), _jsxs("div", { children: [_jsx("strong", { children: r.author_name }), _jsxs("div", { style: { fontSize: '0.9em', color: '#666' }, children: ['★'.repeat(r.rating), '☆'.repeat(5 - r.rating), " ", r.rating, "/5", r.relative_time_description && _jsxs("span", { children: [" \u00B7 ", r.relative_time_description] })] })] })] }), r.text && _jsx("div", { style: { marginTop: 8, lineHeight: 1.5 }, children: r.text })] }, i))) })), place && (_jsx("a", { href: `https://search.google.com/local/writereview?placeid=${place.place_id}`, target: "_blank", rel: "noopener noreferrer", style: { display: 'inline-block', marginTop: 16, color: '#1a73e8', textDecoration: 'none' }, children: "Write a review on Google \u2192" }))] }));
|
|
36
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Server-side: Fetch Google reviews by place_id
|
|
2
|
+
// Requires: GOOGLE_MAPS_API_KEY or hard-coded key
|
|
3
|
+
// Flow: Place Details (reviews)
|
|
4
|
+
export async function getGoogleReviewsByPlaceId(params) {
|
|
5
|
+
const apiKey = 'AIzaSyBtknq7LHzN0xb0lIN3K0CXXf0swVp6ReA';
|
|
6
|
+
if (!apiKey) {
|
|
7
|
+
throw new Error('GOOGLE_MAPS_API_KEY is required');
|
|
8
|
+
}
|
|
9
|
+
const { placeId, language, maxReviews, proxyBase } = params;
|
|
10
|
+
const detailsBase = 'https://maps.googleapis.com/maps/api/place/details/json';
|
|
11
|
+
const fields = encodeURIComponent('reviews,name,place_id,formatted_address');
|
|
12
|
+
const detailsUrl = `${detailsBase}?place_id=${encodeURIComponent(placeId)}&fields=${fields}${language ? `&language=${encodeURIComponent(language)}` : ''}&key=${apiKey}`;
|
|
13
|
+
const detResp = await fetch(proxyBase ? `${proxyBase}${encodeURIComponent(detailsUrl)}` : detailsUrl, { cache: 'no-store' });
|
|
14
|
+
const detData = await detResp.json();
|
|
15
|
+
if (detData.status !== 'OK' || !detData.result) {
|
|
16
|
+
return { reviews: [] };
|
|
17
|
+
}
|
|
18
|
+
const place = {
|
|
19
|
+
name: detData.result.name,
|
|
20
|
+
place_id: detData.result.place_id,
|
|
21
|
+
formatted_address: detData.result.formatted_address,
|
|
22
|
+
};
|
|
23
|
+
const reviews = Array.isArray(detData.result.reviews) ? detData.result.reviews : [];
|
|
24
|
+
const limited = typeof maxReviews === 'number' ? reviews.slice(0, maxReviews) : reviews;
|
|
25
|
+
return { place, reviews: limited };
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { SmartImage } from './cloudinary.image';
|
|
4
|
+
import { usePixelatedConfig } from '../config/config.client';
|
|
5
|
+
export function GravatarCard(props) {
|
|
6
|
+
const { profile, layout = 'horizontal', direction = 'left', avatarSize = 120, compact = false, } = props;
|
|
7
|
+
// Merge: prop overrides take precedence over Gravatar data
|
|
8
|
+
const displayName = props.displayName ?? profile?.displayName ?? 'Unknown';
|
|
9
|
+
const avatarUrl = props.thumbnailUrl ?? profile?.thumbnailUrl ?? `https://www.gravatar.com/avatar/00000000000000000000000000000000?s=${avatarSize}&d=mp`;
|
|
10
|
+
const aboutMe = props.aboutMe ?? profile?.aboutMe;
|
|
11
|
+
const jobTitle = props.job_title ?? props.customRole ?? profile?.job_title;
|
|
12
|
+
const company = props.company ?? profile?.company;
|
|
13
|
+
const location = props.currentLocation ?? profile?.currentLocation;
|
|
14
|
+
const pronouns = props.pronouns ?? profile?.pronouns;
|
|
15
|
+
const profileLink = props.profileUrl ?? profile?.profileUrl;
|
|
16
|
+
// Social links: props override, fallback to Gravatar accounts
|
|
17
|
+
const githubUrl = props.socialLinks?.github ?? profile?.accounts?.find((a) => a.shortname === 'github')?.url;
|
|
18
|
+
const linkedinUrl = props.socialLinks?.linkedin ?? profile?.accounts?.find((a) => a.shortname === 'linkedin')?.url;
|
|
19
|
+
const twitterUrl = props.socialLinks?.twitter ?? profile?.accounts?.find((a) => a.shortname === 'twitter')?.url;
|
|
20
|
+
const instagramUrl = props.socialLinks?.instagram ?? profile?.accounts?.find((a) => a.shortname === 'instagram')?.url;
|
|
21
|
+
const websiteUrl = props.socialLinks?.website;
|
|
22
|
+
const isHorizontal = layout === 'horizontal';
|
|
23
|
+
const photoOnRight = direction === 'right';
|
|
24
|
+
const config = usePixelatedConfig();
|
|
25
|
+
const avatarElement = (_jsx("div", { style: { flexShrink: 0 }, children: _jsx(SmartImage, { src: avatarUrl, alt: displayName, title: displayName, width: avatarSize, height: avatarSize, style: {
|
|
26
|
+
borderRadius: '50%',
|
|
27
|
+
objectFit: 'cover',
|
|
28
|
+
display: 'block',
|
|
29
|
+
}, cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }) }));
|
|
30
|
+
const contentElement = (_jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginBottom: 8 }, children: [_jsx("h3", { style: { margin: 0, fontSize: compact ? '1.1em' : '1.4em' }, children: profileLink ? (_jsx("a", { href: profileLink, target: "_blank", rel: "noopener noreferrer", style: { textDecoration: 'none', color: 'inherit' }, children: displayName })) : (displayName) }), pronouns && _jsxs("span", { style: { fontSize: '0.9em', color: '#666', marginLeft: 8 }, children: ["(", pronouns, ")"] })] }), (jobTitle || company) && (_jsxs("div", { style: { fontSize: '0.95em', color: '#555', marginBottom: 8 }, children: [jobTitle && _jsx("strong", { children: jobTitle }), jobTitle && company && _jsx("span", { children: " at " }), company && _jsx("span", { children: company })] })), location && (_jsxs("div", { style: { fontSize: '0.9em', color: '#777', marginBottom: 8 }, children: ["\uD83D\uDCCD ", location] })), aboutMe && !compact && (_jsx("p", { style: { margin: '12px 0', fontSize: '0.95em', lineHeight: 1.5, color: '#333' }, children: aboutMe })), (githubUrl || linkedinUrl || twitterUrl || instagramUrl || websiteUrl) && (_jsxs("div", { style: { display: 'flex', gap: 12, marginTop: 12, flexWrap: 'wrap' }, children: [githubUrl && (_jsx("a", { href: githubUrl, target: "_blank", rel: "noopener noreferrer", style: { color: '#333', textDecoration: 'none', fontSize: '1.2em' }, children: "GitHub" })), linkedinUrl && (_jsx("a", { href: linkedinUrl, target: "_blank", rel: "noopener noreferrer", style: { color: '#0077b5', textDecoration: 'none', fontSize: '1.2em' }, children: "LinkedIn" })), twitterUrl && (_jsx("a", { href: twitterUrl, target: "_blank", rel: "noopener noreferrer", style: { color: '#1da1f2', textDecoration: 'none', fontSize: '1.2em' }, children: "X" })), instagramUrl && (_jsx("a", { href: instagramUrl, target: "_blank", rel: "noopener noreferrer", style: { color: '#e4405f', textDecoration: 'none', fontSize: '1.2em' }, children: "Instagram" })), websiteUrl && (_jsx("a", { href: websiteUrl, target: "_blank", rel: "noopener noreferrer", style: { color: '#666', textDecoration: 'none', fontSize: '1.2em' }, children: "Website" }))] }))] }));
|
|
31
|
+
return (_jsx("div", { style: {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: isHorizontal ? 'row' : 'column',
|
|
34
|
+
alignItems: isHorizontal ? 'flex-start' : 'center',
|
|
35
|
+
gap: 16,
|
|
36
|
+
padding: 16,
|
|
37
|
+
border: '1px solid #e0e0e0',
|
|
38
|
+
borderRadius: 8,
|
|
39
|
+
maxWidth: isHorizontal ? 600 : 400,
|
|
40
|
+
}, children: isHorizontal && photoOnRight ? (_jsxs(_Fragment, { children: [contentElement, avatarElement] })) : (_jsxs(_Fragment, { children: [avatarElement, contentElement] })) }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Gravatar integration functions
|
|
2
|
+
// Fetch avatar and profile data from Gravatar API
|
|
3
|
+
import md5 from 'md5';
|
|
4
|
+
/**
|
|
5
|
+
* Generate MD5 hash of email for Gravatar lookups (works in browser and Node.js)
|
|
6
|
+
* @param email - Email address
|
|
7
|
+
* @returns MD5 hash (lowercase, trimmed)
|
|
8
|
+
*/
|
|
9
|
+
function getGravatarHash(email) {
|
|
10
|
+
return md5(email.trim().toLowerCase());
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get Gravatar avatar URL from email
|
|
14
|
+
* @param email - Email address
|
|
15
|
+
* @param size - Image size in pixels (default 200)
|
|
16
|
+
* @param defaultImage - Default image type: 404, mp (mystery person), identicon, monsterid, wavatar, retro, blank
|
|
17
|
+
* @returns Gravatar avatar URL
|
|
18
|
+
*/
|
|
19
|
+
export function getGravatarAvatarUrl(email, size = 200, defaultImage = 'mp') {
|
|
20
|
+
const hash = getGravatarHash(email);
|
|
21
|
+
return `https://www.gravatar.com/avatar/${hash}?s=${size}&d=${defaultImage}`;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Fetch full Gravatar profile data
|
|
25
|
+
* @param email - Email address
|
|
26
|
+
* @returns Promise of Gravatar profile or null if not found
|
|
27
|
+
*/
|
|
28
|
+
export async function getGravatarProfile(email) {
|
|
29
|
+
const hash = getGravatarHash(email);
|
|
30
|
+
const url = `https://en.gravatar.com/${hash}.json`;
|
|
31
|
+
try {
|
|
32
|
+
const response = await fetch(url, { cache: 'no-store' });
|
|
33
|
+
if (!response.ok)
|
|
34
|
+
return null;
|
|
35
|
+
const data = await response.json();
|
|
36
|
+
if (!data.entry || data.entry.length === 0)
|
|
37
|
+
return null;
|
|
38
|
+
return data.entry[0];
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Extract social account URL by shortname
|
|
46
|
+
* @param profile - Gravatar profile
|
|
47
|
+
* @param shortname - Account shortname (e.g., 'github', 'linkedin', 'twitter')
|
|
48
|
+
* @returns URL or undefined if not found
|
|
49
|
+
*/
|
|
50
|
+
export function getGravatarAccountUrl(profile, shortname) {
|
|
51
|
+
return profile.accounts?.find((acc) => acc.shortname === shortname)?.url;
|
|
52
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
export function initializeHubSpotScript(region, portalId) {
|
|
6
|
+
if (typeof document === 'undefined')
|
|
7
|
+
return;
|
|
8
|
+
const scriptId = `hubspot-script-${region}-${portalId}`;
|
|
9
|
+
if (document.getElementById(scriptId))
|
|
10
|
+
return;
|
|
11
|
+
const script = document.createElement('script');
|
|
12
|
+
script.id = scriptId;
|
|
13
|
+
script.src = `https://js-${region}.hsforms.net/forms/embed/${portalId}.js`;
|
|
14
|
+
// script.async = true;
|
|
15
|
+
script.defer = true;
|
|
16
|
+
document.head.appendChild(script);
|
|
17
|
+
}
|
|
18
|
+
HubSpotForm.propTypes = {
|
|
19
|
+
region: PropTypes.string.isRequired,
|
|
20
|
+
portalId: PropTypes.string.isRequired,
|
|
21
|
+
formId: PropTypes.string.isRequired,
|
|
22
|
+
target: PropTypes.string,
|
|
23
|
+
containerId: PropTypes.string,
|
|
24
|
+
};
|
|
25
|
+
export function HubSpotForm({ region, portalId, formId, target, containerId = 'hubspot-form-container' }) {
|
|
26
|
+
const formTarget = target || `#${containerId}`;
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const createHubspotForm = () => {
|
|
29
|
+
const win = window;
|
|
30
|
+
if (win.hbspt && win.hbspt.forms) {
|
|
31
|
+
win.hbspt.forms.create({
|
|
32
|
+
region,
|
|
33
|
+
portalId,
|
|
34
|
+
formId,
|
|
35
|
+
target: formTarget
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// no window object yet; this will rerun again
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
createHubspotForm();
|
|
43
|
+
}, [region, portalId, formId, formTarget]);
|
|
44
|
+
return _jsx("div", { className: "hs-form-frame", "data-region": region, "data-form-id": formId, "data-portal-id": portalId });
|
|
45
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
HubspotTrackingCode.propTypes = {
|
|
4
|
+
hubID: PropTypes.string.isRequired,
|
|
5
|
+
};
|
|
6
|
+
export function HubspotTrackingCode(props) {
|
|
7
|
+
return (_jsx(_Fragment, { children: _jsx("script", { type: "text/javascript", id: "hs-script-loader", async: true, defer: true, src: `//js-na2.hs-scripts.com/${props.hubID}.js` }) }));
|
|
8
|
+
}
|
|
9
|
+
getHubspotFormSubmissions.propTypes = {
|
|
10
|
+
proxyURL: PropTypes.string.isRequired,
|
|
11
|
+
formGUID: PropTypes.string.isRequired,
|
|
12
|
+
apiToken: PropTypes.string.isRequired,
|
|
13
|
+
};
|
|
14
|
+
export async function getHubspotFormSubmissions(props) {
|
|
15
|
+
const url = `${props.proxyURL}https://api.hubapi.com/form-integrations/v1/submissions/forms/${props.formGUID}`;
|
|
16
|
+
const headers = {
|
|
17
|
+
Authorization: "Bearer " + props.apiToken,
|
|
18
|
+
};
|
|
19
|
+
try {
|
|
20
|
+
const response = await fetch(url, {
|
|
21
|
+
method: 'GET',
|
|
22
|
+
headers: headers,
|
|
23
|
+
});
|
|
24
|
+
if (!response.ok) {
|
|
25
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
26
|
+
}
|
|
27
|
+
const data = await response.json();
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error('Error fetching HubSpot form submissions:', error);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { getInstagramTiles } from './instagram.functions';
|
|
5
|
+
import { Tiles } from '../tiles/tiles';
|
|
6
|
+
export function InstagramTiles(props) {
|
|
7
|
+
const [tiles, setTiles] = useState([]);
|
|
8
|
+
const [loading, setLoading] = useState(true);
|
|
9
|
+
const [error, setError] = useState(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
(async () => {
|
|
12
|
+
try {
|
|
13
|
+
const result = await getInstagramTiles({
|
|
14
|
+
accessToken: props.accessToken,
|
|
15
|
+
userId: props.userId,
|
|
16
|
+
limit: props.limit ?? 12,
|
|
17
|
+
useThumbnails: props.useThumbnails,
|
|
18
|
+
includeVideos: props.includeVideos,
|
|
19
|
+
includeCaptions: props.includeCaptions,
|
|
20
|
+
});
|
|
21
|
+
setTiles(result);
|
|
22
|
+
setLoading(false);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
setError(e?.message || 'Failed to fetch Instagram media');
|
|
26
|
+
setLoading(false);
|
|
27
|
+
}
|
|
28
|
+
})();
|
|
29
|
+
}, [props.accessToken, props.userId, props.limit, props.useThumbnails, props.includeVideos, props.includeCaptions]);
|
|
30
|
+
if (loading) {
|
|
31
|
+
return (_jsx("div", { style: { padding: 16 }, children: _jsx("p", { children: "Loading Instagram posts..." }) }));
|
|
32
|
+
}
|
|
33
|
+
if (error) {
|
|
34
|
+
return (_jsxs("div", { style: { padding: 16 }, children: [_jsxs("p", { style: { color: 'tomato' }, children: ["Error: ", error] }), _jsx("p", { style: { fontSize: '0.9em', marginTop: 8 }, children: "Make sure you have a valid Instagram user access token with instagram_basic permissions." })] }));
|
|
35
|
+
}
|
|
36
|
+
if (tiles.length === 0) {
|
|
37
|
+
return (_jsx("div", { style: { padding: 16 }, children: _jsx("p", { children: "No Instagram posts found." }) }));
|
|
38
|
+
}
|
|
39
|
+
return _jsx(Tiles, { cards: tiles, rowCount: props.rowCount });
|
|
40
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Server-side: Fetch Instagram media from Instagram Graph API
|
|
2
|
+
// Requires: Instagram Business/Creator account, Facebook Page, OAuth access token
|
|
3
|
+
// Returns: Array compatible with Tiles/Carousel components
|
|
4
|
+
/**
|
|
5
|
+
* Fetch Instagram media for a user/page using Graph API
|
|
6
|
+
* @param accessToken - Long-lived user access token (refresh every 60 days)
|
|
7
|
+
* @param userId - Instagram Business Account ID (get via /me/accounts endpoint)
|
|
8
|
+
* @param limit - Number of posts to fetch (default 25, max 100)
|
|
9
|
+
* @param fields - Comma-separated fields to retrieve
|
|
10
|
+
* @returns Promise of media items
|
|
11
|
+
*/
|
|
12
|
+
export async function getInstagramMedia(params) {
|
|
13
|
+
// TEMP: Hard-coded token for testing
|
|
14
|
+
const accessToken = params.accessToken || 'EAAtmg2zNJnABQCcGOWOUt7tR03RAF3dBZC2HFk9T0XZCvRaTddrUos8qV0UGSswVdc5d2N0o3ZAir5sEjyiglCkoffzvTwn068WTJUgSAdaRzfqRhE6Pb8D9u9wgjJuqIpDqQRIdFTlgsIVbKZBLBP2qPx72yjO3k6IuK2ksQZB4SqkyCr7ZBy7NaVXh9x2AZDZD';
|
|
15
|
+
const { userId = 'me', limit = 25, fields = 'id,media_type,media_url,thumbnail_url,permalink,caption,timestamp,username' } = params;
|
|
16
|
+
const url = `https://graph.instagram.com/${userId}/media?fields=${encodeURIComponent(fields)}&limit=${limit}&access_token=${accessToken}`;
|
|
17
|
+
const response = await fetch(url, { cache: 'no-store' });
|
|
18
|
+
const data = await response.json();
|
|
19
|
+
if (!response.ok || !data.data) {
|
|
20
|
+
throw new Error(`Instagram API error: ${JSON.stringify(data)}`);
|
|
21
|
+
}
|
|
22
|
+
return data.data;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Convert Instagram media to Tiles/Carousel compatible format
|
|
26
|
+
* @param media - Array of Instagram media items
|
|
27
|
+
* @param options - Transformation options
|
|
28
|
+
* @returns Array of CarouselCardType for use in Tiles or Carousel
|
|
29
|
+
*/
|
|
30
|
+
export function instagramMediaToTiles(media, options) {
|
|
31
|
+
const { useThumbnails = true, includeVideos = true, includeCaptions = true } = options ?? {};
|
|
32
|
+
return media
|
|
33
|
+
.filter((item) => {
|
|
34
|
+
if (!includeVideos && item.media_type === 'VIDEO')
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
})
|
|
38
|
+
.map((item, index) => {
|
|
39
|
+
let imageUrl = item.media_url;
|
|
40
|
+
if (item.media_type === 'VIDEO' && useThumbnails && item.thumbnail_url) {
|
|
41
|
+
imageUrl = item.thumbnail_url;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
index,
|
|
45
|
+
cardIndex: index,
|
|
46
|
+
cardLength: media.length,
|
|
47
|
+
link: item.permalink,
|
|
48
|
+
linkTarget: '_blank',
|
|
49
|
+
image: imageUrl,
|
|
50
|
+
imageAlt: item.username ? `@${item.username} on Instagram` : 'Instagram post',
|
|
51
|
+
bodyText: includeCaptions ? item.caption : undefined,
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Convenience: Fetch Instagram media and convert to Tiles format in one call
|
|
57
|
+
* @param accessToken - Instagram Graph API access token
|
|
58
|
+
* @param userId - Instagram Business Account ID
|
|
59
|
+
* @param limit - Number of posts (default 12)
|
|
60
|
+
* @param options - Transformation options
|
|
61
|
+
* @returns Promise of CarouselCardType array ready for Tiles/Carousel
|
|
62
|
+
*/
|
|
63
|
+
export async function getInstagramTiles(params) {
|
|
64
|
+
const { accessToken, userId, limit = 12, useThumbnails, includeVideos, includeCaptions } = params ?? {};
|
|
65
|
+
const media = await getInstagramMedia({ accessToken, userId, limit });
|
|
66
|
+
return instagramMediaToTiles(media, { useThumbnails, includeVideos, includeCaptions });
|
|
67
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { usePixelatedConfig } from "../config/config.client";
|
|
4
|
+
import { SmartImage } from './cloudinary.image';
|
|
5
|
+
import { GridItem } from '../general/layout';
|
|
6
|
+
import { getWordPressItems } from './wordpress.functions';
|
|
7
|
+
import { Loading, ToggleLoading } from '../general/loading';
|
|
8
|
+
import "./wordpress.css";
|
|
9
|
+
// https://microformats.org/wiki/h-entry
|
|
10
|
+
function decodeString(s) {
|
|
11
|
+
let temp = document.createElement('p');
|
|
12
|
+
temp.innerHTML = s;
|
|
13
|
+
const str = temp.textContent || temp.innerText;
|
|
14
|
+
temp = null;
|
|
15
|
+
return str;
|
|
16
|
+
}
|
|
17
|
+
export function BlogPostList(props) {
|
|
18
|
+
const { site, count } = props;
|
|
19
|
+
const [posts, setPosts] = useState([]);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
ToggleLoading({ show: true });
|
|
22
|
+
(async () => {
|
|
23
|
+
const data = (await getWordPressItems({ site, count })) ?? [];
|
|
24
|
+
const sorted = data.sort((a, b) => ((a.date ?? '') < (b.date ?? '')) ? 1 : -1);
|
|
25
|
+
setPosts(sorted);
|
|
26
|
+
ToggleLoading({ show: false });
|
|
27
|
+
})();
|
|
28
|
+
}, [site, count]);
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsx(Loading, {}), posts.map((post) => (_jsx(GridItem, { children: _jsx(BlogPostSummary, { ID: post.ID, title: post.title, date: post.date, excerpt: post.excerpt, URL: post.URL, categories: post.categories, featured_image: post.featured_image }) }, post.ID)))] }));
|
|
30
|
+
}
|
|
31
|
+
export function BlogPostSummary(props) {
|
|
32
|
+
const myCategoryImages = Object.entries(props.categories).map(([category, index]) => [category.trim().toLowerCase().replace(/[ /]+/g, '-'), index]).sort();
|
|
33
|
+
const config = usePixelatedConfig();
|
|
34
|
+
const myExcerpt = decodeString(props.excerpt).replace(/\[…\]/g, '<a href="' + props.URL + '" target="_blank" rel="noopener noreferrer">[…]</a>');
|
|
35
|
+
return (_jsx("div", { className: "blogPostSummary", children: _jsxs("article", { className: "h-entry", children: [_jsx("h2", { className: "p-name", children: _jsx("a", { className: "u-url blog-post-url", href: props.URL, target: "_blank", rel: "noopener noreferrer", children: decodeString(props.title) }) }), _jsxs("div", { className: "dt-published", children: ["Published: ", new Date(props.date).toLocaleDateString()] }), props.featured_image ? (_jsxs("div", { className: "article-body row-12col", children: [_jsx("div", { className: "article-featured-image grid-s1-e4", children: _jsx(SmartImage, { className: "u-photo", src: props.featured_image, alt: decodeString(props.title), title: decodeString(props.title), style: { borderRadius: '20px' }, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined }) }), _jsx("div", { className: "article-excerpt grid-s4-e13", children: _jsx("div", { className: "p-summary", dangerouslySetInnerHTML: { __html: myExcerpt } }) })] })) :
|
|
36
|
+
_jsx("div", { className: "article-excerpt grid-s1-e13", children: _jsx("div", { className: "p-summary", dangerouslySetInnerHTML: { __html: myExcerpt } }) }), _jsxs("div", { children: ["Categories:", myCategoryImages.map(([categoryImg, index]) => (_jsx("span", { className: "p-category", children: _jsx(SmartImage, { src: `/images/icons/${categoryImg}.png`, title: String(categoryImg), alt: String(categoryImg), cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined }) }, categoryImg + "-" + index)))] })] }) }, props.ID));
|
|
37
|
+
}
|
|
38
|
+
export function BlogPostCategories(props) {
|
|
39
|
+
if (!props.categories || props.categories.length === 0) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const myCategoryImages = props.categories.map((category) => (category !== "Uncategorized")
|
|
43
|
+
? category.trim().toLowerCase().replace(/[ /]+/g, '-')
|
|
44
|
+
: undefined).sort();
|
|
45
|
+
const config = usePixelatedConfig();
|
|
46
|
+
return (_jsxs("div", { className: "blogPostCategories", children: [_jsx("div", { children: "Categories: " }), myCategoryImages.map((categoryImg, index) => categoryImg ? (_jsx("span", { className: "p-category", children: _jsx(SmartImage, { className: "u-photo", src: `/images/icons/${categoryImg}.png`, title: String(categoryImg), alt: String(categoryImg), cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined }) }, categoryImg + "-" + index)) : null)] }));
|
|
47
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
/* https://microformats.org/wiki/h-entry */
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
.blogPostSummary {
|
|
6
|
+
border: 1px solid #ccc;
|
|
7
|
+
margin: 10px;
|
|
8
|
+
padding: 20px;
|
|
9
|
+
border-radius: 25px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.blogPostCategories {
|
|
13
|
+
/* border: 1px solid #ccc; */
|
|
14
|
+
margin: 10px;
|
|
15
|
+
padding: 20px;
|
|
16
|
+
border-radius: 25px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.blogPostSummary {
|
|
20
|
+
|
|
21
|
+
article {
|
|
22
|
+
.p-name { --do-nothing: true; }
|
|
23
|
+
.p-summary { padding-bottom: 20px; }
|
|
24
|
+
.e-content { --do-nothing: true }
|
|
25
|
+
.dt-published { padding-bottom: 20px; }
|
|
26
|
+
.dt-updated { --do-nothing: true }
|
|
27
|
+
.p-author { --do-nothing: true }
|
|
28
|
+
.p-category { --do-nothing: true }
|
|
29
|
+
.u-url { --do-nothing: true }
|
|
30
|
+
.u-uid { --do-nothing: true }
|
|
31
|
+
.p-location { --do-nothing: true }
|
|
32
|
+
.u-syndication { --do-nothing: true }
|
|
33
|
+
.u-in-reply-to { --do-nothing: true }
|
|
34
|
+
.p-rsvp { --do-nothing: true }
|
|
35
|
+
.u-like-of { --do-nothing: true }
|
|
36
|
+
.u-repost-of { --do-nothing: true }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
article * {
|
|
40
|
+
overflow-wrap: break-word;
|
|
41
|
+
word-wrap: break-word;
|
|
42
|
+
word-break: break-all;
|
|
43
|
+
word-break: break-word;
|
|
44
|
+
hyphens: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.blogPostSummary .p-category img,
|
|
50
|
+
.blogPostCategories .p-category img {
|
|
51
|
+
width: 30px;
|
|
52
|
+
height: 30px;
|
|
53
|
+
margin: 0 5px;
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
}
|