vue-datocms 7.0.4 → 7.0.6
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 +8 -1
- package/dist/index.cjs.js +25 -48
- package/dist/index.d.ts +24 -24
- package/dist/index.esm.mjs +25 -48
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<!--datocms-autoinclude-header start-->
|
|
2
|
+
|
|
2
3
|
<a href="https://www.datocms.com/"><img src="https://www.datocms.com/images/full_logo.svg" height="60"></a>
|
|
3
4
|
|
|
4
5
|
👉 [Visit the DatoCMS homepage](https://www.datocms.com) or see [What is DatoCMS?](#what-is-datocms)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
5
9
|
<!--datocms-autoinclude-header end-->
|
|
6
10
|
|
|
7
11
|
# vue-datocms
|
|
@@ -71,7 +75,9 @@ npm run dev
|
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
<!--datocms-autoinclude-footer start-->
|
|
74
|
-
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
75
81
|
# What is DatoCMS?
|
|
76
82
|
<a href="https://www.datocms.com/"><img src="https://www.datocms.com/images/full_logo.svg" height="60"></a>
|
|
77
83
|
|
|
@@ -94,4 +100,5 @@ Trusted by over 25,000 enterprise businesses, agency partners, and individuals a
|
|
|
94
100
|
- [DatoCMS Starters](https://www.datocms.com/marketplace/starters) has examples for various Javascript frontend frameworks
|
|
95
101
|
|
|
96
102
|
Or see [all our public repos](https://github.com/orgs/datocms/repositories?q=&type=public&language=&sort=stargazers)
|
|
103
|
+
|
|
97
104
|
<!--datocms-autoinclude-footer end-->
|
package/dist/index.cjs.js
CHANGED
|
@@ -186,17 +186,17 @@ function buildRegularSource(data, sizes, srcSetCandidates) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
var __defProp$6 = Object.defineProperty;
|
|
189
|
-
var __getOwnPropSymbols$
|
|
190
|
-
var __hasOwnProp$
|
|
191
|
-
var __propIsEnum$
|
|
189
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
190
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
192
192
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
193
193
|
var __spreadValues$6 = (a, b) => {
|
|
194
194
|
for (var prop in b || (b = {}))
|
|
195
|
-
if (__hasOwnProp$
|
|
195
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
196
196
|
__defNormalProp$6(a, prop, b[prop]);
|
|
197
|
-
if (__getOwnPropSymbols$
|
|
198
|
-
for (var prop of __getOwnPropSymbols$
|
|
199
|
-
if (__propIsEnum$
|
|
197
|
+
if (__getOwnPropSymbols$6)
|
|
198
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
199
|
+
if (__propIsEnum$6.call(b, prop))
|
|
200
200
|
__defNormalProp$6(a, prop, b[prop]);
|
|
201
201
|
}
|
|
202
202
|
return a;
|
|
@@ -234,17 +234,17 @@ const Sizer = vue.defineComponent({
|
|
|
234
234
|
var __defProp$5 = Object.defineProperty;
|
|
235
235
|
var __defProps$3 = Object.defineProperties;
|
|
236
236
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
237
|
-
var __getOwnPropSymbols$
|
|
238
|
-
var __hasOwnProp$
|
|
239
|
-
var __propIsEnum$
|
|
237
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
238
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
239
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
240
240
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
241
241
|
var __spreadValues$5 = (a, b) => {
|
|
242
242
|
for (var prop in b || (b = {}))
|
|
243
|
-
if (__hasOwnProp$
|
|
243
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
244
244
|
__defNormalProp$5(a, prop, b[prop]);
|
|
245
|
-
if (__getOwnPropSymbols$
|
|
246
|
-
for (var prop of __getOwnPropSymbols$
|
|
247
|
-
if (__propIsEnum$
|
|
245
|
+
if (__getOwnPropSymbols$5)
|
|
246
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
247
|
+
if (__propIsEnum$5.call(b, prop))
|
|
248
248
|
__defNormalProp$5(a, prop, b[prop]);
|
|
249
249
|
}
|
|
250
250
|
return a;
|
|
@@ -507,17 +507,17 @@ const DatocmsImagePlugin = {
|
|
|
507
507
|
};
|
|
508
508
|
|
|
509
509
|
var __defProp$4 = Object.defineProperty;
|
|
510
|
-
var __getOwnPropSymbols$
|
|
511
|
-
var __hasOwnProp$
|
|
512
|
-
var __propIsEnum$
|
|
510
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
511
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
512
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
513
513
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
514
514
|
var __spreadValues$4 = (a, b) => {
|
|
515
515
|
for (var prop in b || (b = {}))
|
|
516
|
-
if (__hasOwnProp$
|
|
516
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
517
517
|
__defNormalProp$4(a, prop, b[prop]);
|
|
518
|
-
if (__getOwnPropSymbols$
|
|
519
|
-
for (var prop of __getOwnPropSymbols$
|
|
520
|
-
if (__propIsEnum$
|
|
518
|
+
if (__getOwnPropSymbols$4)
|
|
519
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
520
|
+
if (__propIsEnum$4.call(b, prop))
|
|
521
521
|
__defNormalProp$4(a, prop, b[prop]);
|
|
522
522
|
}
|
|
523
523
|
return a;
|
|
@@ -643,34 +643,11 @@ const DatocmsNakedImagePlugin = {
|
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
645
|
|
|
646
|
-
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
647
|
-
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
648
|
-
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
649
|
-
var __objRest$2 = (source, exclude) => {
|
|
650
|
-
var target = {};
|
|
651
|
-
for (var prop in source)
|
|
652
|
-
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
653
|
-
target[prop] = source[prop];
|
|
654
|
-
if (source != null && __getOwnPropSymbols$4)
|
|
655
|
-
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
656
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
657
|
-
target[prop] = source[prop];
|
|
658
|
-
}
|
|
659
|
-
return target;
|
|
660
|
-
};
|
|
661
|
-
const hAdapter = (tagName, props, childOrChildren) => {
|
|
662
|
-
const _a = props || {}; __objRest$2(_a, ["href", "target", "rel"]);
|
|
663
|
-
return vue.h(
|
|
664
|
-
tagName,
|
|
665
|
-
props,
|
|
666
|
-
typeof childOrChildren === "undefined" || Array.isArray(childOrChildren) ? childOrChildren : [childOrChildren]
|
|
667
|
-
);
|
|
668
|
-
};
|
|
669
646
|
const defaultAdapter = {
|
|
670
|
-
renderNode:
|
|
671
|
-
renderMark:
|
|
672
|
-
renderFragment: (children,
|
|
673
|
-
renderText: (text,
|
|
647
|
+
renderNode: vue.h,
|
|
648
|
+
renderMark: vue.h,
|
|
649
|
+
renderFragment: (children, _key) => children,
|
|
650
|
+
renderText: (text, _key) => text
|
|
674
651
|
};
|
|
675
652
|
function appendKeyToValidElement(element, key) {
|
|
676
653
|
if (element !== null && typeof element !== "string" && element.key === null) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { PropType,
|
|
2
|
+
import { PropType, h, VNode, Ref, UnwrapRef, CSSProperties } from 'vue';
|
|
3
3
|
import { TransformedMeta, RenderMarkRule, TransformMetaFn } from 'datocms-structured-text-generic-html-renderer';
|
|
4
4
|
export { renderMarkRule, renderNodeRule, renderNodeRule as renderRule } from 'datocms-structured-text-generic-html-renderer';
|
|
5
5
|
import { Record as Record$1, RenderResult, StructuredText as StructuredText$1, Document, Node, RenderRule } from 'datocms-structured-text-utils';
|
|
@@ -406,10 +406,10 @@ declare const DatocmsNakedImagePlugin: {
|
|
|
406
406
|
|
|
407
407
|
type AdapterReturn = VNode | string | null;
|
|
408
408
|
declare const defaultAdapter: {
|
|
409
|
-
renderNode:
|
|
410
|
-
renderMark:
|
|
411
|
-
renderFragment: (children: AdapterReturn[],
|
|
412
|
-
renderText: (text: string,
|
|
409
|
+
renderNode: typeof h;
|
|
410
|
+
renderMark: typeof h;
|
|
411
|
+
renderFragment: (children: AdapterReturn[], _key: string) => AdapterReturn;
|
|
412
|
+
renderText: (text: string, _key: string) => AdapterReturn;
|
|
413
413
|
};
|
|
414
414
|
type H = typeof defaultAdapter.renderNode;
|
|
415
415
|
type T = typeof defaultAdapter.renderText;
|
|
@@ -433,27 +433,27 @@ declare const StructuredText: vue.DefineComponent<{
|
|
|
433
433
|
};
|
|
434
434
|
/** @deprecated use customNodeRules **/
|
|
435
435
|
customRules: {
|
|
436
|
-
type: PropType<RenderRule<
|
|
436
|
+
type: PropType<RenderRule<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>[]>;
|
|
437
437
|
};
|
|
438
438
|
/** A set of additional rules to convert the document to JSX **/
|
|
439
439
|
customNodeRules: {
|
|
440
|
-
type: PropType<RenderRule<
|
|
440
|
+
type: PropType<RenderRule<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>[]>;
|
|
441
441
|
};
|
|
442
442
|
/** A set of additional rules to convert the document to JSX **/
|
|
443
443
|
customMarkRules: {
|
|
444
|
-
type: PropType<RenderMarkRule<
|
|
444
|
+
type: PropType<RenderMarkRule<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>[]>;
|
|
445
445
|
};
|
|
446
446
|
/** Fuction that converts an 'inlineItem' node into React **/
|
|
447
447
|
renderInlineRecord: {
|
|
448
|
-
type: PropType<(context: RenderInlineRecordContext) => AdapterReturn>;
|
|
448
|
+
type: PropType<(context: RenderInlineRecordContext<any>) => AdapterReturn>;
|
|
449
449
|
};
|
|
450
450
|
/** Fuction that converts an 'itemLink' node into React **/
|
|
451
451
|
renderLinkToRecord: {
|
|
452
|
-
type: PropType<(context: RenderRecordLinkContext) => AdapterReturn>;
|
|
452
|
+
type: PropType<(context: RenderRecordLinkContext<any>) => AdapterReturn>;
|
|
453
453
|
};
|
|
454
454
|
/** Fuction that converts a 'block' node into React **/
|
|
455
455
|
renderBlock: {
|
|
456
|
-
type: PropType<(context: RenderBlockContext) => AdapterReturn>;
|
|
456
|
+
type: PropType<(context: RenderBlockContext<any>) => AdapterReturn>;
|
|
457
457
|
};
|
|
458
458
|
/** Function that converts 'link' and 'itemLink' `meta` into HTML props */
|
|
459
459
|
metaTransformer: {
|
|
@@ -461,44 +461,44 @@ declare const StructuredText: vue.DefineComponent<{
|
|
|
461
461
|
};
|
|
462
462
|
/** Fuction that converts a simple string text into React **/
|
|
463
463
|
renderText: {
|
|
464
|
-
type: PropType<(text: string,
|
|
464
|
+
type: PropType<(text: string, _key: string) => AdapterReturn>;
|
|
465
465
|
};
|
|
466
466
|
/** React.createElement-like function to use to convert a node into React **/
|
|
467
467
|
renderNode: {
|
|
468
|
-
type: PropType<
|
|
468
|
+
type: PropType<typeof h>;
|
|
469
469
|
};
|
|
470
470
|
/** Function to use to generate a React.Fragment **/
|
|
471
471
|
renderFragment: {
|
|
472
|
-
type: PropType<(children: AdapterReturn[],
|
|
472
|
+
type: PropType<(children: AdapterReturn[], _key: string) => AdapterReturn>;
|
|
473
473
|
};
|
|
474
|
-
}, () => RenderResult<
|
|
474
|
+
}, () => RenderResult<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
475
475
|
/** The actual field value you get from DatoCMS **/
|
|
476
476
|
data: {
|
|
477
477
|
type: PropType<StructuredText$1<Record$1, Record$1> | Document | Node | null | undefined>;
|
|
478
478
|
};
|
|
479
479
|
/** @deprecated use customNodeRules **/
|
|
480
480
|
customRules: {
|
|
481
|
-
type: PropType<RenderRule<
|
|
481
|
+
type: PropType<RenderRule<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>[]>;
|
|
482
482
|
};
|
|
483
483
|
/** A set of additional rules to convert the document to JSX **/
|
|
484
484
|
customNodeRules: {
|
|
485
|
-
type: PropType<RenderRule<
|
|
485
|
+
type: PropType<RenderRule<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>[]>;
|
|
486
486
|
};
|
|
487
487
|
/** A set of additional rules to convert the document to JSX **/
|
|
488
488
|
customMarkRules: {
|
|
489
|
-
type: PropType<RenderMarkRule<
|
|
489
|
+
type: PropType<RenderMarkRule<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>[]>;
|
|
490
490
|
};
|
|
491
491
|
/** Fuction that converts an 'inlineItem' node into React **/
|
|
492
492
|
renderInlineRecord: {
|
|
493
|
-
type: PropType<(context: RenderInlineRecordContext) => AdapterReturn>;
|
|
493
|
+
type: PropType<(context: RenderInlineRecordContext<any>) => AdapterReturn>;
|
|
494
494
|
};
|
|
495
495
|
/** Fuction that converts an 'itemLink' node into React **/
|
|
496
496
|
renderLinkToRecord: {
|
|
497
|
-
type: PropType<(context: RenderRecordLinkContext) => AdapterReturn>;
|
|
497
|
+
type: PropType<(context: RenderRecordLinkContext<any>) => AdapterReturn>;
|
|
498
498
|
};
|
|
499
499
|
/** Fuction that converts a 'block' node into React **/
|
|
500
500
|
renderBlock: {
|
|
501
|
-
type: PropType<(context: RenderBlockContext) => AdapterReturn>;
|
|
501
|
+
type: PropType<(context: RenderBlockContext<any>) => AdapterReturn>;
|
|
502
502
|
};
|
|
503
503
|
/** Function that converts 'link' and 'itemLink' `meta` into HTML props */
|
|
504
504
|
metaTransformer: {
|
|
@@ -506,15 +506,15 @@ declare const StructuredText: vue.DefineComponent<{
|
|
|
506
506
|
};
|
|
507
507
|
/** Fuction that converts a simple string text into React **/
|
|
508
508
|
renderText: {
|
|
509
|
-
type: PropType<(text: string,
|
|
509
|
+
type: PropType<(text: string, _key: string) => AdapterReturn>;
|
|
510
510
|
};
|
|
511
511
|
/** React.createElement-like function to use to convert a node into React **/
|
|
512
512
|
renderNode: {
|
|
513
|
-
type: PropType<
|
|
513
|
+
type: PropType<typeof h>;
|
|
514
514
|
};
|
|
515
515
|
/** Function to use to generate a React.Fragment **/
|
|
516
516
|
renderFragment: {
|
|
517
|
-
type: PropType<(children: AdapterReturn[],
|
|
517
|
+
type: PropType<(children: AdapterReturn[], _key: string) => AdapterReturn>;
|
|
518
518
|
};
|
|
519
519
|
}>>, {}, {}>;
|
|
520
520
|
declare const DatocmsStructuredTextPlugin: {
|
package/dist/index.esm.mjs
CHANGED
|
@@ -162,17 +162,17 @@ function buildRegularSource(data, sizes, srcSetCandidates) {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
var __defProp$6 = Object.defineProperty;
|
|
165
|
-
var __getOwnPropSymbols$
|
|
166
|
-
var __hasOwnProp$
|
|
167
|
-
var __propIsEnum$
|
|
165
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
166
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
167
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
168
168
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
169
169
|
var __spreadValues$6 = (a, b) => {
|
|
170
170
|
for (var prop in b || (b = {}))
|
|
171
|
-
if (__hasOwnProp$
|
|
171
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
172
172
|
__defNormalProp$6(a, prop, b[prop]);
|
|
173
|
-
if (__getOwnPropSymbols$
|
|
174
|
-
for (var prop of __getOwnPropSymbols$
|
|
175
|
-
if (__propIsEnum$
|
|
173
|
+
if (__getOwnPropSymbols$6)
|
|
174
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
175
|
+
if (__propIsEnum$6.call(b, prop))
|
|
176
176
|
__defNormalProp$6(a, prop, b[prop]);
|
|
177
177
|
}
|
|
178
178
|
return a;
|
|
@@ -210,17 +210,17 @@ const Sizer = defineComponent({
|
|
|
210
210
|
var __defProp$5 = Object.defineProperty;
|
|
211
211
|
var __defProps$3 = Object.defineProperties;
|
|
212
212
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
213
|
-
var __getOwnPropSymbols$
|
|
214
|
-
var __hasOwnProp$
|
|
215
|
-
var __propIsEnum$
|
|
213
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
214
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
215
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
216
216
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
217
217
|
var __spreadValues$5 = (a, b) => {
|
|
218
218
|
for (var prop in b || (b = {}))
|
|
219
|
-
if (__hasOwnProp$
|
|
219
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
220
220
|
__defNormalProp$5(a, prop, b[prop]);
|
|
221
|
-
if (__getOwnPropSymbols$
|
|
222
|
-
for (var prop of __getOwnPropSymbols$
|
|
223
|
-
if (__propIsEnum$
|
|
221
|
+
if (__getOwnPropSymbols$5)
|
|
222
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
223
|
+
if (__propIsEnum$5.call(b, prop))
|
|
224
224
|
__defNormalProp$5(a, prop, b[prop]);
|
|
225
225
|
}
|
|
226
226
|
return a;
|
|
@@ -483,17 +483,17 @@ const DatocmsImagePlugin = {
|
|
|
483
483
|
};
|
|
484
484
|
|
|
485
485
|
var __defProp$4 = Object.defineProperty;
|
|
486
|
-
var __getOwnPropSymbols$
|
|
487
|
-
var __hasOwnProp$
|
|
488
|
-
var __propIsEnum$
|
|
486
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
487
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
488
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
489
489
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
490
490
|
var __spreadValues$4 = (a, b) => {
|
|
491
491
|
for (var prop in b || (b = {}))
|
|
492
|
-
if (__hasOwnProp$
|
|
492
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
493
493
|
__defNormalProp$4(a, prop, b[prop]);
|
|
494
|
-
if (__getOwnPropSymbols$
|
|
495
|
-
for (var prop of __getOwnPropSymbols$
|
|
496
|
-
if (__propIsEnum$
|
|
494
|
+
if (__getOwnPropSymbols$4)
|
|
495
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
496
|
+
if (__propIsEnum$4.call(b, prop))
|
|
497
497
|
__defNormalProp$4(a, prop, b[prop]);
|
|
498
498
|
}
|
|
499
499
|
return a;
|
|
@@ -619,34 +619,11 @@ const DatocmsNakedImagePlugin = {
|
|
|
619
619
|
}
|
|
620
620
|
};
|
|
621
621
|
|
|
622
|
-
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
623
|
-
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
624
|
-
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
625
|
-
var __objRest$2 = (source, exclude) => {
|
|
626
|
-
var target = {};
|
|
627
|
-
for (var prop in source)
|
|
628
|
-
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
629
|
-
target[prop] = source[prop];
|
|
630
|
-
if (source != null && __getOwnPropSymbols$4)
|
|
631
|
-
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
632
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
633
|
-
target[prop] = source[prop];
|
|
634
|
-
}
|
|
635
|
-
return target;
|
|
636
|
-
};
|
|
637
|
-
const hAdapter = (tagName, props, childOrChildren) => {
|
|
638
|
-
const _a = props || {}; __objRest$2(_a, ["href", "target", "rel"]);
|
|
639
|
-
return h(
|
|
640
|
-
tagName,
|
|
641
|
-
props,
|
|
642
|
-
typeof childOrChildren === "undefined" || Array.isArray(childOrChildren) ? childOrChildren : [childOrChildren]
|
|
643
|
-
);
|
|
644
|
-
};
|
|
645
622
|
const defaultAdapter = {
|
|
646
|
-
renderNode:
|
|
647
|
-
renderMark:
|
|
648
|
-
renderFragment: (children,
|
|
649
|
-
renderText: (text,
|
|
623
|
+
renderNode: h,
|
|
624
|
+
renderMark: h,
|
|
625
|
+
renderFragment: (children, _key) => children,
|
|
626
|
+
renderText: (text, _key) => text
|
|
650
627
|
};
|
|
651
628
|
function appendKeyToValidElement(element, key) {
|
|
652
629
|
if (element !== null && typeof element !== "string" && element.key === null) {
|