vue-datocms 8.1.15 → 8.1.16

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 CHANGED
@@ -84,42 +84,20 @@ npm run dev
84
84
 
85
85
  <a href="https://www.datocms.com/"><img src="https://www.datocms.com/images/full_logo.svg" height="60" alt="DatoCMS - The Headless CMS for the Modern Web"></a>
86
86
 
87
- [DatoCMS](https://www.datocms.com/) is the REST & GraphQL Headless CMS for the modern web.
87
+ [DatoCMS](https://www.datocms.com/) is Headless CMS for the modern web. Trusted by 25,000+ businesses, agencies, and individuals, it gives your team one place to manage content and ship it to any website, app, or device via API.
88
88
 
89
- Trusted by over 25,000 enterprise businesses, agencies, and individuals across the world, DatoCMS users create online content at scale from a central hub and distribute it via API. We ❤️ our [developers](https://www.datocms.com/team/best-cms-for-developers), [content editors](https://www.datocms.com/team/content-creators) and [marketers](https://www.datocms.com/team/cms-digital-marketing)!
89
+ **New here?** Start with [Create free account](https://dashboard.datocms.com/signup) and the [Documentation](https://www.datocms.com/docs). Stuck? Ask the [Community](https://community.datocms.com/). Curious what's new? [Product Updates](https://www.datocms.com/product-updates).
90
90
 
91
- **Why DatoCMS?**
91
+ **Building with AI:** [Agent Skills](https://www.datocms.com/docs/agent-skills) turn coding assistants (Claude Code, Cursor) into expert DatoCMS developers, with full read/write via the auto-installed CLI. No local terminal? Use the [MCP Server](https://www.datocms.com/docs/mcp-server) instead.
92
92
 
93
- - **API-First Architecture**: Built for both REST and GraphQL, enabling flexible content delivery
94
- - **Just Enough Features**: We believe in keeping things simple, and giving you [the right feature-set tools](https://www.datocms.com/features) to get the job done
95
- - **Developer Experience**: First-class TypeScript support with powerful developer tools
93
+ **Talking to DatoCMS from code:**
94
+ - [Content Delivery API](https://www.datocms.com/docs/content-delivery-api) (CDA) the fast, read-only GraphQL API your website/app uses to **fetch** published content.
95
+ - [Content Management API](https://www.datocms.com/docs/content-management-api) (CMA) the REST API for **creating and updating** content, models, and project settings (think scripts, migrations, integrations).
96
+ - [CLI](https://www.datocms.com/docs/scripting-migrations/installing-the-cli) — terminal tool for schema migrations and importing from Contentful/WordPress.
96
97
 
97
- **Getting Started:**
98
+ **Framework guides:** end-to-end recipes for fetching content, rendering Structured Text, optimizing images/video, handling SEO, and setting up live preview with visual editing in [Next.js](https://www.datocms.com/docs/next-js), [Nuxt](https://www.datocms.com/docs/nuxt), [Svelte](https://www.datocms.com/docs/svelte), and [Astro](https://www.datocms.com/docs/astro).
98
99
 
99
- - ⚡️ [Create Free Account](https://dashboard.datocms.com/signup) - Get started with DatoCMS in minutes
100
- - 🔖 [Documentation](https://www.datocms.com/docs) - Comprehensive guides and API references
101
- - ⚙️ [Community Support](https://community.datocms.com/) - Get help from our team and community
102
- - 🆕 [Changelog](https://www.datocms.com/product-updates) - Latest features and improvements
100
+ **Want a head start?** Browse our [starter projects](https://www.datocms.com/marketplace/starters) — ready-to-deploy example sites for popular frameworks.
103
101
 
104
- **Official Libraries:**
105
-
106
- - [**Content Delivery Client**](https://github.com/datocms/cda-client) - TypeScript GraphQL client for content fetching
107
- - [**REST API Clients**](https://github.com/datocms/js-rest-api-clients) - Node.js/Browser clients for content management
108
- - [**CLI Tools**](https://github.com/datocms/cli) - Command-line utilities for schema migrations (includes [Contentful](https://github.com/datocms/cli/tree/main/packages/cli-plugin-contentful) and [WordPress](https://github.com/datocms/cli/tree/main/packages/cli-plugin-wordpress) importers)
109
-
110
- **Official Framework Integrations**
111
-
112
- Helpers to manage SEO, images, video and Structured Text coming from your DatoCMS projects:
113
-
114
- - [**React Components**](https://github.com/datocms/react-datocms)
115
- - [**Vue Components**](https://github.com/datocms/vue-datocms)
116
- - [**Svelte Components**](https://github.com/datocms/datocms-svelte)
117
- - [**Astro Components**](https://github.com/datocms/astro-datocms)
118
-
119
- **Additional Resources:**
120
-
121
- - [**Plugin Examples**](https://github.com/datocms/plugins) - Example plugins we've made that extend the editor/admin dashboard
122
- - [**Starter Projects**](https://www.datocms.com/marketplace/starters) - Example website implementations for popular frameworks
123
- - [**All Public Repositories**](https://github.com/orgs/datocms/repositories?q=&type=public&language=&sort=stargazers)
124
102
 
125
103
  <!--datocms-autoinclude-footer end-->
package/dist/index.cjs.js CHANGED
@@ -604,7 +604,7 @@ const Image$1 = vue.defineComponent({
604
604
  };
605
605
  },
606
606
  render() {
607
- var _a, _b, _c, _d, _e, _f;
607
+ var _a, _b, _c, _d;
608
608
  const addImage = imageAddStrategy({
609
609
  priority: this.priority,
610
610
  inView: this.inView,
@@ -615,10 +615,11 @@ const Image$1 = vue.defineComponent({
615
615
  inView: this.inView,
616
616
  loaded: this.loaded
617
617
  });
618
- const webpSource = buildWebpSource(this.data, this.sizes);
618
+ const resolvedSizes = (_b = (_a = this.sizes) != null ? _a : this.data.sizes) != null ? _b : this.priority ? void 0 : "auto, 100vw";
619
+ const webpSource = buildWebpSource(this.data, resolvedSizes);
619
620
  const regularSource = buildRegularSource(
620
621
  this.data,
621
- this.sizes,
622
+ resolvedSizes,
622
623
  this.srcSetCandidates
623
624
  );
624
625
  const transition = typeof this.fadeInDuration === "undefined" || this.fadeInDuration > 0 ? `opacity ${this.fadeInDuration || 500}ms` : void 0;
@@ -652,7 +653,7 @@ const Image$1 = vue.defineComponent({
652
653
  }, basePlaceholderStyle)
653
654
  }) : null;
654
655
  const { width, aspectRatio } = this.data;
655
- const height = (_a = this.data.height) != null ? _a : aspectRatio ? width / aspectRatio : 0;
656
+ const height = (_c = this.data.height) != null ? _c : aspectRatio ? width / aspectRatio : 0;
656
657
  const sizer = this.layout !== "fill" ? vue.h(Sizer, {
657
658
  sizerClass: this.imgClass,
658
659
  sizerStyle: this.imgStyle,
@@ -678,6 +679,8 @@ const Image$1 = vue.defineComponent({
678
679
  src: this.data.src,
679
680
  alt: this.data.alt,
680
681
  title: this.data.title,
682
+ sizes: resolvedSizes,
683
+ loading: this.priority ? void 0 : "lazy",
681
684
  fetchpriority: this.priority ? "high" : void 0,
682
685
  onLoad: this.handleLoad,
683
686
  ref: "imageRef",
@@ -699,7 +702,7 @@ const Image$1 = vue.defineComponent({
699
702
  [
700
703
  this.data.webpSrcSet && tag("source", {
701
704
  srcset: this.data.webpSrcSet,
702
- sizes: (_c = (_b = this.sizes) != null ? _b : this.data.sizes) != null ? _c : void 0,
705
+ sizes: resolvedSizes,
703
706
  type: "image/webp"
704
707
  }),
705
708
  tag("source", {
@@ -708,13 +711,14 @@ const Image$1 = vue.defineComponent({
708
711
  this.data.width,
709
712
  this.srcSetCandidates
710
713
  ),
711
- sizes: (_f = (_e = this.sizes) != null ? _e : this.data.sizes) != null ? _f : void 0
714
+ sizes: resolvedSizes
712
715
  }),
713
716
  tag("img", {
714
717
  src: this.data.src,
715
718
  alt: this.data.alt,
716
719
  title: this.data.title,
717
720
  class: this.imgClass,
721
+ sizes: resolvedSizes,
718
722
  style: toCss(__spreadValues$5(__spreadProps$3(__spreadValues$5({}, absolutePositioning), {
719
723
  objectFit: this.objectFit,
720
724
  objectPosition: this.objectPosition
@@ -851,15 +855,16 @@ const NakedImage = vue.defineComponent({
851
855
  };
852
856
  },
853
857
  render() {
854
- var _a;
855
- const webpSource = buildWebpSource(this.data, this.sizes);
858
+ var _a, _b, _c;
859
+ const resolvedSizes = (_b = (_a = this.sizes) != null ? _a : this.data.sizes) != null ? _b : this.priority ? void 0 : "auto, 100vw";
860
+ const webpSource = buildWebpSource(this.data, resolvedSizes);
856
861
  const regularSource = buildRegularSource(
857
862
  this.data,
858
- this.sizes,
863
+ resolvedSizes,
859
864
  this.srcSetCandidates
860
865
  );
861
866
  const { width } = this.data;
862
- const height = (_a = this.data.height) != null ? _a : Math.round(this.data.aspectRatio ? width / this.data.aspectRatio : 0);
867
+ const height = (_c = this.data.height) != null ? _c : Math.round(this.data.aspectRatio ? width / this.data.aspectRatio : 0);
863
868
  const sizingStyle = {
864
869
  aspectRatio: `${width} / ${height}`,
865
870
  width: "100%",
@@ -891,6 +896,7 @@ const NakedImage = vue.defineComponent({
891
896
  alt: this.data.alt,
892
897
  onLoad: this.handleLoad,
893
898
  title: this.data.title,
899
+ sizes: resolvedSizes,
894
900
  fetchpriority: this.priority ? "high" : void 0,
895
901
  loading: this.priority ? void 0 : "lazy",
896
902
  style: __spreadValues$4(__spreadValues$4(__spreadValues$4({}, placeholderStyle), sizingStyle), this.imgStyle || {}),
@@ -605,7 +605,7 @@ const Image$1 = defineComponent({
605
605
  };
606
606
  },
607
607
  render() {
608
- var _a, _b, _c, _d, _e, _f;
608
+ var _a, _b, _c, _d;
609
609
  const addImage = imageAddStrategy({
610
610
  priority: this.priority,
611
611
  inView: this.inView,
@@ -616,10 +616,11 @@ const Image$1 = defineComponent({
616
616
  inView: this.inView,
617
617
  loaded: this.loaded
618
618
  });
619
- const webpSource = buildWebpSource(this.data, this.sizes);
619
+ const resolvedSizes = (_b = (_a = this.sizes) != null ? _a : this.data.sizes) != null ? _b : this.priority ? void 0 : "auto, 100vw";
620
+ const webpSource = buildWebpSource(this.data, resolvedSizes);
620
621
  const regularSource = buildRegularSource(
621
622
  this.data,
622
- this.sizes,
623
+ resolvedSizes,
623
624
  this.srcSetCandidates
624
625
  );
625
626
  const transition = typeof this.fadeInDuration === "undefined" || this.fadeInDuration > 0 ? `opacity ${this.fadeInDuration || 500}ms` : void 0;
@@ -653,7 +654,7 @@ const Image$1 = defineComponent({
653
654
  }, basePlaceholderStyle)
654
655
  }) : null;
655
656
  const { width, aspectRatio } = this.data;
656
- const height = (_a = this.data.height) != null ? _a : aspectRatio ? width / aspectRatio : 0;
657
+ const height = (_c = this.data.height) != null ? _c : aspectRatio ? width / aspectRatio : 0;
657
658
  const sizer = this.layout !== "fill" ? h(Sizer, {
658
659
  sizerClass: this.imgClass,
659
660
  sizerStyle: this.imgStyle,
@@ -679,6 +680,8 @@ const Image$1 = defineComponent({
679
680
  src: this.data.src,
680
681
  alt: this.data.alt,
681
682
  title: this.data.title,
683
+ sizes: resolvedSizes,
684
+ loading: this.priority ? void 0 : "lazy",
682
685
  fetchpriority: this.priority ? "high" : void 0,
683
686
  onLoad: this.handleLoad,
684
687
  ref: "imageRef",
@@ -700,7 +703,7 @@ const Image$1 = defineComponent({
700
703
  [
701
704
  this.data.webpSrcSet && tag("source", {
702
705
  srcset: this.data.webpSrcSet,
703
- sizes: (_c = (_b = this.sizes) != null ? _b : this.data.sizes) != null ? _c : void 0,
706
+ sizes: resolvedSizes,
704
707
  type: "image/webp"
705
708
  }),
706
709
  tag("source", {
@@ -709,13 +712,14 @@ const Image$1 = defineComponent({
709
712
  this.data.width,
710
713
  this.srcSetCandidates
711
714
  ),
712
- sizes: (_f = (_e = this.sizes) != null ? _e : this.data.sizes) != null ? _f : void 0
715
+ sizes: resolvedSizes
713
716
  }),
714
717
  tag("img", {
715
718
  src: this.data.src,
716
719
  alt: this.data.alt,
717
720
  title: this.data.title,
718
721
  class: this.imgClass,
722
+ sizes: resolvedSizes,
719
723
  style: toCss(__spreadValues$5(__spreadProps$3(__spreadValues$5({}, absolutePositioning), {
720
724
  objectFit: this.objectFit,
721
725
  objectPosition: this.objectPosition
@@ -852,15 +856,16 @@ const NakedImage = defineComponent({
852
856
  };
853
857
  },
854
858
  render() {
855
- var _a;
856
- const webpSource = buildWebpSource(this.data, this.sizes);
859
+ var _a, _b, _c;
860
+ const resolvedSizes = (_b = (_a = this.sizes) != null ? _a : this.data.sizes) != null ? _b : this.priority ? void 0 : "auto, 100vw";
861
+ const webpSource = buildWebpSource(this.data, resolvedSizes);
857
862
  const regularSource = buildRegularSource(
858
863
  this.data,
859
- this.sizes,
864
+ resolvedSizes,
860
865
  this.srcSetCandidates
861
866
  );
862
867
  const { width } = this.data;
863
- const height = (_a = this.data.height) != null ? _a : Math.round(this.data.aspectRatio ? width / this.data.aspectRatio : 0);
868
+ const height = (_c = this.data.height) != null ? _c : Math.round(this.data.aspectRatio ? width / this.data.aspectRatio : 0);
864
869
  const sizingStyle = {
865
870
  aspectRatio: `${width} / ${height}`,
866
871
  width: "100%",
@@ -892,6 +897,7 @@ const NakedImage = defineComponent({
892
897
  alt: this.data.alt,
893
898
  onLoad: this.handleLoad,
894
899
  title: this.data.title,
900
+ sizes: resolvedSizes,
895
901
  fetchpriority: this.priority ? "high" : void 0,
896
902
  loading: this.priority ? void 0 : "lazy",
897
903
  style: __spreadValues$4(__spreadValues$4(__spreadValues$4({}, placeholderStyle), sizingStyle), this.imgStyle || {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-datocms",
3
- "version": "8.1.15",
3
+ "version": "8.1.16",
4
4
  "type": "module",
5
5
  "description": "A set of components and utilities to work faster with DatoCMS in Vue.js environments",
6
6
  "keywords": [