New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@prismicio/editor-support

Package Overview
Dependencies
Maintainers
22
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismicio/editor-support - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

dist/String.d.ts

1

dist/Array.d.ts

@@ -0,1 +1,2 @@

export declare function insertAtIndex<A>(array: readonly A[], index: number, item: A): A[];
export declare function removeIndex<A>(array: A[], index: number): A[];

@@ -2,0 +3,0 @@ export declare function swap<A>(array: A[], leftIndex: number, rightIndex: number): A[];

71

dist/Array.es.js

@@ -1,34 +0,38 @@

function l(r, n) {
return r.filter((e, t) => t !== n);
function f(e, t, r) {
const n = e.slice();
return n.splice(t, 0, r), n;
}
function h(r, n, e) {
const t = r.length;
if (f(n, t) || f(e, t))
return r;
const o = [...r], u = o[n], c = o[e];
return o[n] = c, o[e] = u, o;
function h(e, t) {
return e.filter((r, n) => n !== t);
}
function f(r, n) {
return r < 0 || r >= n;
function g(e, t, r) {
const n = e.length;
if (l(t, n) || l(r, n))
return e;
const o = [...e], u = o[t], c = o[r];
return o[t] = c, o[r] = u, o;
}
function g(r, n, e) {
e = e || 1;
const t = [], o = e > 0;
let u = r;
for (; o && u <= n || !o && u >= n; )
t.push(u), u = u + e;
return t;
function l(e, t) {
return e < 0 || e >= t;
}
function m(r, n) {
const e = [];
let t = [];
return r.forEach((o, u) => {
t.length < n && t.push(o), (t.length === n || u === r.length - 1) && (e.push(t), t = []);
}), e;
function p(e, t, r) {
r = r || 1;
const n = [], o = r > 0;
let u = e;
for (; o && u <= t || !o && u >= t; )
n.push(u), u = u + r;
return n;
}
function p(r, ...n) {
const e = r.slice();
return n.length === 0 && (n = [(t) => t]), e.sort((t, o) => {
for (const u of n) {
const c = u(t), i = u(o);
function m(e, t) {
const r = [];
let n = [];
return e.forEach((o, u) => {
n.length < t && n.push(o), (n.length === t || u === e.length - 1) && (r.push(n), n = []);
}), r;
}
function v(e, ...t) {
const r = e.slice();
return t.length === 0 && (t = [(n) => n]), r.sort((n, o) => {
for (const u of t) {
const c = u(n), i = u(o);
if (c == null)

@@ -50,10 +54,11 @@ return 1;

return 0;
}), e;
}), r;
}
export {
m as chunk,
g as range,
l as removeIndex,
p as sort,
h as swap
f as insertAtIndex,
p as range,
h as removeIndex,
v as sort,
g as swap
};

@@ -1,1 +0,2 @@

export declare function mapValues<A, B, C>(map: Map<A, B>, fn: (value: B, key: A) => C): Map<A, C>;
export declare function mapValues<A, B, C>(map: ReadonlyMap<A, B>, fn: (value: B, key: A) => C): Map<A, C>;
export declare function some<A, B>(map: ReadonlyMap<A, B>, fn: (value: B, key: A) => boolean): boolean;

@@ -1,9 +0,16 @@

function o(n, r) {
const t = /* @__PURE__ */ new Map();
return n.forEach((a, e) => {
t.set(e, r(a, e));
}), t;
function u(r, t) {
const e = /* @__PURE__ */ new Map();
return r.forEach((n, o) => {
e.set(o, t(n, o));
}), e;
}
function f(r, t) {
for (const [e, n] of r)
if (t(n, e))
return !0;
return !1;
}
export {
o as mapValues
u as mapValues,
f as some
};
export declare function mapValues<K extends string | number, A, B>(record: Readonly<Record<K, A>>, mapFunction: (value: A, key: K) => B): Record<K, B>;
/**
* Removes a key/value from an object and returns a new object (and type)
*/
export declare function removeKey<T, K extends keyof T>(object: T, keyToRemove: K): Omit<T, K>;

@@ -1,9 +0,14 @@

function s(t, o) {
const e = {};
function r(t, e) {
const o = {};
for (const n in t)
e[n] = o(t[n], n);
return e;
o[n] = e(t[n], n);
return o;
}
function u(t, e) {
const { [e]: o, ...n } = t;
return n;
}
export {
s as mapValues
r as mapValues,
u as removeKey
};

@@ -1,9 +0,9 @@

import { ReactNode } from "react";
export interface ChildrenProps {
children?: ReactNode;
declare module "react" {
interface CSSProperties {
[key: `--${string}`]: string | number;
}
}
declare type Callback<A extends readonly unknown[], R> = (...args: readonly [...A]) => R;
export declare function useCallbackRef<A extends readonly unknown[], R>(callback: Callback<A, R> | undefined): Callback<A, R>;
export declare function useForceUpdate(): () => () => void;
export declare function useStableCallback<T extends (...args: any[]) => any>(callback: T | undefined): T;
export declare function useForceUpdate(): () => void;
export declare function useIsFirstRender(): boolean;
export declare function useDebounce<T>(value: T, ms: number, callback: (value: T) => void): void;
export {};

@@ -1,28 +0,30 @@

import { useRef as o, useEffect as r, useMemo as s, useState as c, useCallback as f } from "react";
function m(t) {
const e = o(t);
return r(() => {
e.current = t;
}), s(
() => (...n) => {
var u;
return (u = e.current) == null ? void 0 : u.call(e, ...n);
},
[]
);
import { useRef as n, useLayoutEffect as s, useMemo as o, useState as c, useCallback as f, useEffect as i } from "react";
function m(e) {
const t = n(e);
return s(() => {
t.current = e;
}), o(() => (...u) => {
var r;
return (r = t.current) == null ? void 0 : r.call(t, ...u);
}, []);
}
function a() {
const [t, e] = c({});
return f(() => () => e({}), []);
function l() {
const [e, t] = c({});
return f(() => t({}), []);
}
function p(t, e, n) {
r(() => {
const u = setTimeout(() => n(t), e);
return () => clearTimeout(u);
}, [t]);
function d() {
const e = n(!0);
return e.current ? (e.current = !1, !0) : !1;
}
function p(e, t, u) {
i(() => {
const r = setTimeout(() => u(e), t);
return () => clearTimeout(r);
}, [e]);
}
export {
m as useCallbackRef,
p as useDebounce,
a as useForceUpdate
l as useForceUpdate,
d as useIsFirstRender,
m as useStableCallback
};
{
"dependencies": {
"fp-ts": "2.12.3",
"tslib": "2.4.0"

@@ -48,2 +47,6 @@ },

},
"./String": {
"types": "./dist/String.d.ts",
"import": "./dist/String.es.js"
},
"./Suspense": {

@@ -93,3 +96,3 @@ "types": "./dist/Suspense.d.ts",

"stableVersion": "0.0.0",
"version": "0.1.0"
"version": "0.2.0"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc