@keystatic/core

Search for an npm package
import { bc as CloudImagePreviewForNewEditor, bd as cloudImageToolbarIcon, be as handleFile } from './index-48f075ab.js';
import { c as cloudImageSchema } from './cloud-image-schema-95e844a6.js';
import './react-compiler-runtime-0011f46e.js';
import 'react';
import '@react-stately/overlays';
import 'slate-react';
import 'superstruct';
import '@keystar/ui/button';
import '@keystar/ui/dialog';
import '@keystar/ui/drag-and-drop';
import '@keystar/ui/icon';
import '@keystar/ui/icon/icons/imageIcon';
import '@keystar/ui/icon/icons/link2Icon';
import '@keystar/ui/icon/icons/link2OffIcon';
import '@keystar/ui/icon/icons/pencilIcon';
import '@keystar/ui/icon/icons/trash2Icon';
import '@keystar/ui/icon/icons/undo2Icon';
import '@keystar/ui/layout';
import '@keystar/ui/link';
import '@keystar/ui/number-field';
import '@keystar/ui/progress';
import '@keystar/ui/slots';
import '@keystar/ui/text-field';
import '@keystar/ui/toast';
import '@keystar/ui/tooltip';
import '@keystar/ui/typography';
import '@keystar/ui/utils';
import '@keystar/ui/style';
import 'slate';
import '@react-aria/overlays';
import '@react-aria/utils';
import '@keystar/ui/overlays';
import 'emery';
import 'react/jsx-runtime';
import '@emotion/css';
import 'y-protocols/awareness';
import 'yjs';
import '@toeverything/y-indexeddb';
import 'lib0/broadcastchannel';
import 'lib0/time';
import 'lib0/encoding';
import 'lib0/decoding';
import 'y-protocols/sync';
import 'y-protocols/auth';
import 'lib0/mutex';
import 'lib0/math';
import '@emotion/weak-memoize';
import 'cookie';
import '@ts-gql/tag/no-transform';
import 'urql';
import './base64-3538d789.js';
import '@react-aria/i18n';
import 'idb-keyval';
import 'lru-cache';
import 'partysocket/ws';
import 'lib0/encoding.js';
import '@keystar/ui/avatar';
import './index-e5d08c0c.js';
function wrapper(config) {
return {
kind: 'wrapper',
...config
};
}
function block(config) {
return {
kind: 'block',
...config
};
}
function inline(config) {
return {
kind: 'inline',
...config
};
}
function mark(config) {
return {
kind: 'mark',
...config
};
}
function repeating(config) {
var _config$validation$ch, _config$validation, _config$validation$ch2, _config$validation2;
return {
kind: 'repeating',
...config,
children: Array.isArray(config.children) ? config.children : [config.children],
validation: {
children: {
min: (_config$validation$ch = (_config$validation = config.validation) === null || _config$validation === void 0 || (_config$validation = _config$validation.children) === null || _config$validation === void 0 ? void 0 : _config$validation.min) !== null && _config$validation$ch !== void 0 ? _config$validation$ch : 0,
max: (_config$validation$ch2 = (_config$validation2 = config.validation) === null || _config$validation2 === void 0 || (_config$validation2 = _config$validation2.children) === null || _config$validation2 === void 0 ? void 0 : _config$validation2.max) !== null && _config$validation$ch2 !== void 0 ? _config$validation$ch2 : Infinity
}
}
};
}
function cloudImage(args) {
return {
kind: 'block',
label: args.label,
schema: cloudImageSchema,
NodeView: CloudImagePreviewForNewEditor,
icon: cloudImageToolbarIcon,
handleFile: handleFile
};
}
export { block, cloudImage, inline, mark, repeating, wrapper };