@measured/puck 0.21.0-canary.e9d5c0ea → 0.21.0-canary.eb8ea5ce

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.
@@ -0,0 +1,199 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ var __esm = (fn, res) => function __init() {
37
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
38
+ };
39
+ var __commonJS = (cb, mod) => function __require() {
40
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
41
+ };
42
+ var __copyProps = (to, from, except, desc) => {
43
+ if (from && typeof from === "object" || typeof from === "function") {
44
+ for (let key of __getOwnPropNames(from))
45
+ if (!__hasOwnProp.call(to, key) && key !== except)
46
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
47
+ }
48
+ return to;
49
+ };
50
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
51
+ // If the importer is in node compatibility mode or this is not an ESM
52
+ // file that has been converted to a CommonJS file using a Babel-
53
+ // compatible transform (i.e. "__esModule" has not been set), then set
54
+ // "default" to the CommonJS "module.exports" for node compatibility.
55
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
56
+ mod
57
+ ));
58
+ var __async = (__this, __arguments, generator) => {
59
+ return new Promise((resolve, reject) => {
60
+ var fulfilled = (value) => {
61
+ try {
62
+ step(generator.next(value));
63
+ } catch (e) {
64
+ reject(e);
65
+ }
66
+ };
67
+ var rejected = (value) => {
68
+ try {
69
+ step(generator.throw(value));
70
+ } catch (e) {
71
+ reject(e);
72
+ }
73
+ };
74
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
75
+ step((generator = generator.apply(__this, __arguments)).next());
76
+ });
77
+ };
78
+
79
+ // ../tsup-config/react-import.js
80
+ import React from "react";
81
+ var init_react_import = __esm({
82
+ "../tsup-config/react-import.js"() {
83
+ "use strict";
84
+ }
85
+ });
86
+
87
+ // ../../node_modules/classnames/index.js
88
+ var require_classnames = __commonJS({
89
+ "../../node_modules/classnames/index.js"(exports, module) {
90
+ "use strict";
91
+ init_react_import();
92
+ (function() {
93
+ "use strict";
94
+ var hasOwn = {}.hasOwnProperty;
95
+ function classNames() {
96
+ var classes = "";
97
+ for (var i = 0; i < arguments.length; i++) {
98
+ var arg = arguments[i];
99
+ if (arg) {
100
+ classes = appendClass(classes, parseValue(arg));
101
+ }
102
+ }
103
+ return classes;
104
+ }
105
+ function parseValue(arg) {
106
+ if (typeof arg === "string" || typeof arg === "number") {
107
+ return arg;
108
+ }
109
+ if (typeof arg !== "object") {
110
+ return "";
111
+ }
112
+ if (Array.isArray(arg)) {
113
+ return classNames.apply(null, arg);
114
+ }
115
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
116
+ return arg.toString();
117
+ }
118
+ var classes = "";
119
+ for (var key in arg) {
120
+ if (hasOwn.call(arg, key) && arg[key]) {
121
+ classes = appendClass(classes, key);
122
+ }
123
+ }
124
+ return classes;
125
+ }
126
+ function appendClass(value, newClass) {
127
+ if (!newClass) {
128
+ return value;
129
+ }
130
+ if (value) {
131
+ return value + " " + newClass;
132
+ }
133
+ return value + newClass;
134
+ }
135
+ if (typeof module !== "undefined" && module.exports) {
136
+ classNames.default = classNames;
137
+ module.exports = classNames;
138
+ } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
139
+ define("classnames", [], function() {
140
+ return classNames;
141
+ });
142
+ } else {
143
+ window.classNames = classNames;
144
+ }
145
+ })();
146
+ }
147
+ });
148
+
149
+ // lib/get-class-name-factory.ts
150
+ init_react_import();
151
+ var import_classnames = __toESM(require_classnames());
152
+ var getClassNameFactory = (rootClass, styles, config = { baseClass: "" }) => (options = {}) => {
153
+ if (typeof options === "string") {
154
+ const descendant = options;
155
+ const style = styles[`${rootClass}-${descendant}`];
156
+ if (style) {
157
+ return config.baseClass + styles[`${rootClass}-${descendant}`] || "";
158
+ }
159
+ return "";
160
+ } else if (typeof options === "object") {
161
+ const modifiers = options;
162
+ const prefixedModifiers = {};
163
+ for (let modifier in modifiers) {
164
+ prefixedModifiers[styles[`${rootClass}--${modifier}`]] = modifiers[modifier];
165
+ }
166
+ const c = styles[rootClass];
167
+ return config.baseClass + (0, import_classnames.default)(__spreadValues({
168
+ [c]: !!c
169
+ }, prefixedModifiers));
170
+ } else {
171
+ return config.baseClass + styles[rootClass] || "";
172
+ }
173
+ };
174
+ var get_class_name_factory_default = getClassNameFactory;
175
+
176
+ // css-module:/home/runner/work/puck/puck/packages/core/components/RichTextEditor/styles.module.css#css-module
177
+ init_react_import();
178
+ var styles_module_default = { "RichTextEditor": "_RichTextEditor_1elol_1", "RichTextEditor--editor": "_RichTextEditor--editor_1elol_50", "RichTextEditor--disabled": "_RichTextEditor--disabled_1elol_106", "RichTextEditor--isActive": "_RichTextEditor--isActive_1elol_110", "RichTextEditor-menu": "_RichTextEditor-menu_1elol_116" };
179
+
180
+ export {
181
+ __spreadValues,
182
+ __spreadProps,
183
+ __objRest,
184
+ __commonJS,
185
+ __toESM,
186
+ __async,
187
+ init_react_import,
188
+ get_class_name_factory_default,
189
+ styles_module_default
190
+ };
191
+ /*! Bundled license information:
192
+
193
+ classnames/index.js:
194
+ (*!
195
+ Copyright (c) 2018 Jed Watson.
196
+ Licensed under the MIT License (MIT), see
197
+ http://jedwatson.github.io/classnames
198
+ *)
199
+ */