drupal-canvas 0.1.3 → 0.2.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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as getSiteData, r as sortMenu, t as getPageData } from "./drupal-utils-C41ZWu0D.js";
2
2
  import { t as FormattedText } from "./FormattedText-B8Lu3ByU.js";
3
- import { t as CanvasJsonApiClient } from "./jsonapi-client-jLXdE88j.js";
3
+ import { t as CanvasJsonApiClient } from "./jsonapi-client-BydDHnEY.js";
4
4
  import { n as sortMenu$1, t as getNodePath } from "./jsonapi-utils-oywSkEdN.js";
5
5
  import { t as Image } from "./next-image-standalone-B4uHVOA8.js";
6
6
  import { t as cn } from "./utils-DG-hPO0N.js";
@@ -1,5 +1,4 @@
1
- import { Jsona } from "jsona";
2
- import { JsonApiClient } from "@drupal-api-client/json-api-client";
1
+ import { DefaultSerializer, JsonApiClient } from "@drupal-api-client/json-api-client";
3
2
 
4
3
  //#region src/jsonapi-client.ts
5
4
  var CanvasJsonApiClient = class extends JsonApiClient {
@@ -9,7 +8,7 @@ var CanvasJsonApiClient = class extends JsonApiClient {
9
8
  if (!baseUrl && !clientBaseUrl) throw new Error("Could not determine your site's base URL for the JSON:API client. If working outside of Drupal Canvas, you can use the @drupal-canvas/vite-plugin to automatically configure it for you. Otherwise you must explicitly provide a base URL, i.e. `const client = new JsonApiClient(\"https://...\")`");
10
9
  const clientOptions = {
11
10
  apiPrefix: window.drupalSettings?.canvasData?.v0?.jsonapiSettings?.apiPrefix,
12
- serializer: new Jsona(),
11
+ serializer: new DefaultSerializer(),
13
12
  ...options
14
13
  };
15
14
  super(clientBaseUrl, clientOptions);
@@ -1,4 +1,4 @@
1
- import { t as CanvasJsonApiClient } from "./jsonapi-client-jLXdE88j.js";
1
+ import { t as CanvasJsonApiClient } from "./jsonapi-client-BydDHnEY.js";
2
2
 
3
3
  export * from "@drupal-api-client/json-api-client"
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drupal-canvas",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Utilities and base components for building Drupal Canvas Code Components",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,9 +50,8 @@
50
50
  "drupal"
51
51
  ],
52
52
  "dependencies": {
53
- "@drupal-api-client/json-api-client": "^1.3.0",
53
+ "@drupal-api-client/json-api-client": "^1.4.0",
54
54
  "clsx": "^2.1.1",
55
- "jsona": "^1.12.1",
56
55
  "next-image-standalone": "^0.1.3",
57
56
  "tailwind-merge": "^3.0.2"
58
57
  },