@canva/design 1.11.0-beta.1 → 2.0.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.
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- selection: function() {
13
- return selection;
14
- },
15
- addNativeElement: function() {
16
- return addNativeElement;
17
- },
18
- createRichtextRange: function() {
19
- return createRichtextRange;
20
- },
21
- readContent: function() {
22
- return readContent;
23
- }
24
- });
25
- _export_star(require("./public"), exports);
26
- function _export_star(from, to) {
27
- Object.keys(from).forEach(function(k) {
28
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
29
- Object.defineProperty(to, k, {
30
- enumerable: true,
31
- get: function() {
32
- return from[k];
33
- }
34
- });
35
- }
36
- });
37
- return from;
38
- }
39
- const { canva } = window;
40
- const selection = canva.designInteraction.selection;
41
- function addNativeElement(element) {
42
- return canva.designInteraction.addNativeElement(element);
43
- }
44
- function createRichtextRange() {
45
- return canva.designInteraction.createRichtextRange();
46
- }
47
- function readContent(options, callback) {
48
- return canva.designInteraction.readContent(options, callback);
49
- }
@@ -1,26 +0,0 @@
1
- const { canva } = window;
2
- /**
3
- * @beta
4
- * An alias for the DesignSelection interface, providing access to design selection related functionality
5
- */ export const selection = canva.designInteraction.selection;
6
- /**
7
- * @internal
8
- * @param element
9
- */ export function addNativeElement(element) {
10
- return canva.designInteraction.addNativeElement(element);
11
- }
12
- /**
13
- * @beta
14
- * Creates a new RichtextRange object, which contains methods to manipulate text.
15
- */ export function createRichtextRange() {
16
- return canva.designInteraction.createRichtextRange();
17
- }
18
- /**
19
- * @beta
20
- * Reads content of the specified type from the user's design.
21
- * @param options - Options for configuring how a design is read.
22
- * @param callback - A callback for operating on the queried content.
23
- */ export function readContent(options, callback) {
24
- return canva.designInteraction.readContent(options, callback);
25
- }
26
- export * from './public';