Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@open-editor/shared

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-editor/shared - npm Package Compare versions

Comparing version
0.8.4
to
0.8.5
+3
-1
dist/index.d.ts

@@ -25,2 +25,4 @@ declare const ENTRY_MATCH_RE: RegExp;

export { CLIENT_MODULE_ID, ENTRY_ESM_MATCH_RE, ENTRY_MATCH_RE, ServerApis, camelCase, clamp, hasOwnProperty, injectClient, isArr, isBol, isFn, isNaN, isNum, isObj, isStr };
declare function normalizePath(path: string): string;
export { CLIENT_MODULE_ID, ENTRY_ESM_MATCH_RE, ENTRY_MATCH_RE, ServerApis, camelCase, clamp, hasOwnProperty, injectClient, isArr, isBol, isFn, isNaN, isNum, isObj, isStr, normalizePath };

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

"use strict";const REACT_15_PATH=normalizePath("react/react.js"),REACT_17_PATH=normalizePath("react/index.js"),VUE_2_PATH=normalizePath("vue/dist/vue.runtime.common.js"),VUE_2_ESM_PATH=normalizePath("vue/dist/vue.runtime.esm.js"),VUE_3_PATH=normalizePath("vue/index.js"),VUE_3_ESM_PATH=normalizePath("vue/dist/vue.runtime.esm-bundler.js"),ENTRY_MATCH_RE=createMatchRE([REACT_15_PATH,REACT_17_PATH,VUE_2_PATH,VUE_2_ESM_PATH,VUE_3_PATH,VUE_3_ESM_PATH]),ENTRY_ESM_MATCH_RE=createMatchRE([VUE_2_ESM_PATH,VUE_3_ESM_PATH]),CLIENT_MODULE_ID="@open-editor/client";function normalizePath(path){return path.replace(/\./g,"\\.")}function createMatchRE(paths){return RegExp(`/node_modules/(${paths.join("|")})$`)}const ServerApis={OPEN_EDITOR:"/__open_editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}const camelCaseRE=/(?:(?=^)|(?:[./\-_]+))([a-z])/g;function camelCase(str){return str.replace(camelCaseRE,(...$)=>$[1].toUpperCase())}function clamp(val,start,end){return Math.min(Math.max(val,start),end)}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(source,exclude)=>{var target={};for(var prop in source)__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0&&(target[prop]=source[prop]);if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source))exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop)&&(target[prop]=source[prop]);return target};const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,userOpts){const _a=userOpts,{isCommonjs}=_a,opts=__objRest(_a,["isCommonjs"]);return(useStrictRE.test(code)?`"use strict";
"use strict";const REACT_15_PATH=normalizePath$1("react/react.js"),REACT_17_PATH=normalizePath$1("react/index.js"),VUE_2_PATH=normalizePath$1("vue/dist/vue.runtime.common.js"),VUE_2_ESM_PATH=normalizePath$1("vue/dist/vue.runtime.esm.js"),VUE_3_PATH=normalizePath$1("vue/index.js"),VUE_3_ESM_PATH=normalizePath$1("vue/dist/vue.runtime.esm-bundler.js"),ENTRY_MATCH_RE=createMatchRE([REACT_15_PATH,REACT_17_PATH,VUE_2_PATH,VUE_2_ESM_PATH,VUE_3_PATH,VUE_3_ESM_PATH]),ENTRY_ESM_MATCH_RE=createMatchRE([VUE_2_ESM_PATH,VUE_3_ESM_PATH]),CLIENT_MODULE_ID="@open-editor/client";function normalizePath$1(path){return`/node_modules/${path.replace(/\./g,"\\.")}`.replace(/\//g,"[\\\\/]")}function createMatchRE(paths){return RegExp(`(${paths.join("|")})$`)}const ServerApis={OPEN_EDITOR:"/__open_editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}const camelCaseRE=/(?:(?=^)|(?:[./\-_]+))([a-z])/g;function camelCase(str){return str.replace(camelCaseRE,(...$)=>$[1].toUpperCase())}function clamp(val,start,end){return Math.min(Math.max(val,start),end)}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(source,exclude)=>{var target={};for(var prop in source)__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0&&(target[prop]=source[prop]);if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source))exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop)&&(target[prop]=source[prop]);return target};const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,userOpts){const _a=userOpts,{isCommonjs}=_a,opts=__objRest(_a,["isCommonjs"]);return(useStrictRE.test(code)?`"use strict";
`:"")+(isCommonjs?`const { setupClient } = require("@open-editor/client");

@@ -6,2 +6,2 @@ `:`import { setupClient } from "@open-editor/client";

if(typeof window !== "undefined"){setupClient(`+JSON.stringify(opts)+`)};
`}exports.CLIENT_MODULE_ID=CLIENT_MODULE_ID,exports.ENTRY_ESM_MATCH_RE=ENTRY_ESM_MATCH_RE,exports.ENTRY_MATCH_RE=ENTRY_MATCH_RE,exports.ServerApis=ServerApis,exports.camelCase=camelCase,exports.clamp=clamp,exports.hasOwnProperty=hasOwnProperty,exports.injectClient=injectClient,exports.isArr=isArr,exports.isBol=isBol,exports.isFn=isFn,exports.isNaN=isNaN,exports.isNum=isNum,exports.isObj=isObj,exports.isStr=isStr;
`}function normalizePath(path){return path.replace(/\\/g,"/")}exports.CLIENT_MODULE_ID=CLIENT_MODULE_ID,exports.ENTRY_ESM_MATCH_RE=ENTRY_ESM_MATCH_RE,exports.ENTRY_MATCH_RE=ENTRY_MATCH_RE,exports.ServerApis=ServerApis,exports.camelCase=camelCase,exports.clamp=clamp,exports.hasOwnProperty=hasOwnProperty,exports.injectClient=injectClient,exports.isArr=isArr,exports.isBol=isBol,exports.isFn=isFn,exports.isNaN=isNaN,exports.isNum=isNum,exports.isObj=isObj,exports.isStr=isStr,exports.normalizePath=normalizePath;

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

const REACT_15_PATH=normalizePath("react/react.js"),REACT_17_PATH=normalizePath("react/index.js"),VUE_2_PATH=normalizePath("vue/dist/vue.runtime.common.js"),VUE_2_ESM_PATH=normalizePath("vue/dist/vue.runtime.esm.js"),VUE_3_PATH=normalizePath("vue/index.js"),VUE_3_ESM_PATH=normalizePath("vue/dist/vue.runtime.esm-bundler.js"),ENTRY_MATCH_RE=createMatchRE([REACT_15_PATH,REACT_17_PATH,VUE_2_PATH,VUE_2_ESM_PATH,VUE_3_PATH,VUE_3_ESM_PATH]),ENTRY_ESM_MATCH_RE=createMatchRE([VUE_2_ESM_PATH,VUE_3_ESM_PATH]),CLIENT_MODULE_ID="@open-editor/client";function normalizePath(path){return path.replace(/\./g,"\\.")}function createMatchRE(paths){return RegExp(`/node_modules/(${paths.join("|")})$`)}const ServerApis={OPEN_EDITOR:"/__open_editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}const camelCaseRE=/(?:(?=^)|(?:[./\-_]+))([a-z])/g;function camelCase(str){return str.replace(camelCaseRE,(...$)=>$[1].toUpperCase())}function clamp(val,start,end){return Math.min(Math.max(val,start),end)}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(source,exclude)=>{var target={};for(var prop in source)__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0&&(target[prop]=source[prop]);if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source))exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop)&&(target[prop]=source[prop]);return target};const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,userOpts){const _a=userOpts,{isCommonjs}=_a,opts=__objRest(_a,["isCommonjs"]);return(useStrictRE.test(code)?`"use strict";
const REACT_15_PATH=normalizePath$1("react/react.js"),REACT_17_PATH=normalizePath$1("react/index.js"),VUE_2_PATH=normalizePath$1("vue/dist/vue.runtime.common.js"),VUE_2_ESM_PATH=normalizePath$1("vue/dist/vue.runtime.esm.js"),VUE_3_PATH=normalizePath$1("vue/index.js"),VUE_3_ESM_PATH=normalizePath$1("vue/dist/vue.runtime.esm-bundler.js"),ENTRY_MATCH_RE=createMatchRE([REACT_15_PATH,REACT_17_PATH,VUE_2_PATH,VUE_2_ESM_PATH,VUE_3_PATH,VUE_3_ESM_PATH]),ENTRY_ESM_MATCH_RE=createMatchRE([VUE_2_ESM_PATH,VUE_3_ESM_PATH]),CLIENT_MODULE_ID="@open-editor/client";function normalizePath$1(path){return`/node_modules/${path.replace(/\./g,"\\.")}`.replace(/\//g,"[\\\\/]")}function createMatchRE(paths){return RegExp(`(${paths.join("|")})$`)}const ServerApis={OPEN_EDITOR:"/__open_editor__"};function isFn(value){return typeof value=="function"}function isObj(value){return value!=null&&typeof value=="object"}function isStr(value){return typeof value=="string"}function isNum(value){return typeof value=="number"}function isBol(value){return typeof value=="boolean"}function isArr(value){return Array.isArray(value)}function isNaN(value){return Number.isNaN(value)}const camelCaseRE=/(?:(?=^)|(?:[./\-_]+))([a-z])/g;function camelCase(str){return str.replace(camelCaseRE,(...$)=>$[1].toUpperCase())}function clamp(val,start,end){return Math.min(Math.max(val,start),end)}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(source,exclude)=>{var target={};for(var prop in source)__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0&&(target[prop]=source[prop]);if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source))exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop)&&(target[prop]=source[prop]);return target};const useStrictRE=/^['"]use strict['"];?/;function injectClient(code,userOpts){const _a=userOpts,{isCommonjs}=_a,opts=__objRest(_a,["isCommonjs"]);return(useStrictRE.test(code)?`"use strict";
`:"")+(isCommonjs?`const { setupClient } = require("@open-editor/client");

@@ -6,2 +6,2 @@ `:`import { setupClient } from "@open-editor/client";

if(typeof window !== "undefined"){setupClient(`+JSON.stringify(opts)+`)};
`}export{CLIENT_MODULE_ID,ENTRY_ESM_MATCH_RE,ENTRY_MATCH_RE,ServerApis,camelCase,clamp,hasOwnProperty,injectClient,isArr,isBol,isFn,isNaN,isNum,isObj,isStr};
`}function normalizePath(path){return path.replace(/\\/g,"/")}export{CLIENT_MODULE_ID,ENTRY_ESM_MATCH_RE,ENTRY_MATCH_RE,ServerApis,camelCase,clamp,hasOwnProperty,injectClient,isArr,isBol,isFn,isNaN,isNum,isObj,isStr,normalizePath};

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

"use strict";var node_module=require("node:module");function resolvePath(path,url){return node_module.createRequire(url).resolve(path)}function isDev(){return!(process.env.NODE_ENV&&process.env.NODE_ENV!=="development")}exports.isDev=isDev,exports.resolvePath=resolvePath;
"use strict";var node_module=require("node:module");function normalizePath(path){return path.replace(/\\/g,"/")}function resolvePath(path,url){return node_module.createRequire(normalizePath(url)).resolve(normalizePath(path))}function isDev(){return!(process.env.NODE_ENV&&process.env.NODE_ENV!=="development")}exports.isDev=isDev,exports.resolvePath=resolvePath;

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

import{createRequire}from"node:module";function resolvePath(path,url){return createRequire(url).resolve(path)}function isDev(){return!(process.env.NODE_ENV&&process.env.NODE_ENV!=="development")}export{isDev,resolvePath};
import{createRequire}from"node:module";function normalizePath(path){return path.replace(/\\/g,"/")}function resolvePath(path,url){return createRequire(normalizePath(url)).resolve(normalizePath(path))}function isDev(){return!(process.env.NODE_ENV&&process.env.NODE_ENV!=="development")}export{isDev,resolvePath};
{
"name": "@open-editor/shared",
"version": "0.8.4",
"version": "0.8.5",
"description": "internal utils shared across @open-editor packages",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",