Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cord-sdk/components

Package Overview
Dependencies
Maintainers
3
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cord-sdk/components - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

6

dist/index.d.ts

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

import { BadgeStyle, JsonValue } from '@cord-sdk/types';
import type { BadgeStyle, JsonValue } from '@cord-sdk/types';
export declare const componentNames: {

@@ -20,2 +20,4 @@ readonly 'cord-collaboration': "Collaboration";

readonly 'show-presence': "boolean";
readonly 'show-all-activity': "boolean";
readonly 'exclude-viewer-from-presence': "boolean";
};

@@ -53,2 +55,4 @@ readonly MultipleCursors: {

readonly 'show-launcher': "boolean";
readonly 'show-all-activity': "boolean";
readonly 'exclude-viewer-from-presence': "boolean";
};

@@ -55,0 +59,0 @@ readonly SidebarLauncher: {

61

dist/index.js

@@ -5,3 +5,3 @@ 'use strict';

var componentNames = {
const componentNames = {
'cord-collaboration': 'Collaboration',

@@ -17,3 +17,3 @@ 'cord-multiple-cursors': 'MultipleCursors',

};
var componentAttributes = {
const componentAttributes = {
Collaboration: {

@@ -23,2 +23,4 @@ context: 'json',

'show-presence': 'boolean',
'show-all-activity': 'boolean',
'exclude-viewer-from-presence': 'boolean',
},

@@ -56,2 +58,4 @@ MultipleCursors: {

'show-launcher': 'boolean',
'show-all-activity': 'boolean',
'exclude-viewer-from-presence': 'boolean',
},

@@ -72,15 +76,13 @@ SidebarLauncher: {

};
var enumAttributeConverter = function (possibleValues) { return function (value) {
return value === null
? undefined
: possibleValues.includes(value)
? value
: undefined;
}; };
var attributeToPropertyConverters = {
json: function (value) { return (value ? JSON.parse(value) : undefined); },
boolean: function (value) { return value === 'true'; },
number: function (value) { return (value ? parseInt(value) : undefined); },
string: function (value) { return value !== null && value !== void 0 ? value : undefined; },
array: function (value) { return value === null || value === void 0 ? void 0 : value.split(',').filter(function (x) { return x.length > 0; }); },
const enumAttributeConverter = (possibleValues) => (value) => value === null
? undefined
: possibleValues.includes(value)
? value
: undefined;
const attributeToPropertyConverters = {
json: (value) => (value ? JSON.parse(value) : undefined),
boolean: (value) => value === 'true',
number: (value) => (value ? parseInt(value) : undefined),
string: (value) => value !== null && value !== void 0 ? value : undefined,
array: (value) => value === null || value === void 0 ? void 0 : value.split(',').filter((x) => x.length > 0),
'badge-style': enumAttributeConverter([

@@ -92,11 +94,9 @@ 'none',

};
var propertyToAttributeConverters = {
json: function (value) {
return value !== undefined ? JSON.stringify(value) : undefined;
},
boolean: function (value) { return value === null || value === void 0 ? void 0 : value.toString(); },
number: function (value) { return value === null || value === void 0 ? void 0 : value.toString(); },
string: function (value) { return (value === undefined ? undefined : value || ''); },
array: function (value) { return value === null || value === void 0 ? void 0 : value.join(','); },
'badge-style': function (value) { return (value === undefined ? undefined : value || ''); },
const propertyToAttributeConverters = {
json: (value) => value !== undefined ? JSON.stringify(value) : undefined,
boolean: (value) => value === null || value === void 0 ? void 0 : value.toString(),
number: (value) => value === null || value === void 0 ? void 0 : value.toString(),
string: (value) => (value === undefined ? undefined : value || ''),
array: (value) => value === null || value === void 0 ? void 0 : value.join(','),
'badge-style': (value) => (value === undefined ? undefined : value || ''),
};

@@ -108,8 +108,7 @@ function attributeNameToPropName(attributeName) {

}
var propsToAttributeConverter = function (attributeMetadata) { return function (props) {
var result = {};
for (var _i = 0, _a = Object.keys(attributeMetadata); _i < _a.length; _i++) {
var key = _a[_i];
var attributeName = key;
var propName = attributeNameToPropName(attributeName);
const propsToAttributeConverter = (attributeMetadata) => (props) => {
const result = {};
for (const key of Object.keys(attributeMetadata)) {
const attributeName = key;
const propName = attributeNameToPropName(attributeName);
if (propName in props) {

@@ -120,3 +119,3 @@ result[attributeName] = propertyToAttributeConverters[attributeMetadata[attributeName]](props[propName]);

return result;
}; };
};

@@ -123,0 +122,0 @@ exports.attributeNameToPropName = attributeNameToPropName;

{
"name": "@cord-sdk/components",
"version": "0.0.3",
"version": "0.0.4",
"homepage": "https://docs.cord.com/",

@@ -22,3 +22,3 @@ "license": "MIT",

"dependencies": {
"@cord-sdk/types": "*"
"@cord-sdk/types": "0.0.4"
},

@@ -25,0 +25,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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