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

@sendbird/uikit-message-template

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sendbird/uikit-message-template - npm Package Compare versions

Comparing version 0.0.1-alpha.8 to 0.0.1-alpha.12

README.md

1

dist/index.d.ts

@@ -8,1 +8,2 @@ export * from './core/parser';

export * from './types/components';
export * from './test/data';

@@ -8,1 +8,2 @@ export * from './core/parser';

export * from './types/components';
export * from './test/data';

@@ -5,1 +5,2 @@ import type { Template } from '../types/template';

export declare const sample_3: Template;
export declare const sample_4: Template;

@@ -223,3 +223,3 @@ import { ComponentType } from '../types/components';

'imageUrl': 'https://1000logos.net/wp-content/uploads/2021/12/Globe-Telecom-logo.png',
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
'imageStyle': { 'contentMode': MediaContentMode.AspectFill, tintColor: '#a49a9a' },
},

@@ -330,1 +330,265 @@ {

};
export const sample_4 = {
'version': 1,
'body': {
'items': [
{
'type': ComponentType.Box,
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Image,
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
'metaData': {
'pixelWidth': 512,
'pixelHeight': 512,
},
'imageStyle': {
'tintColor': '#44ff1188',
},
},
{
'type': ComponentType.Box,
'viewStyle': {
'padding': {
'top': 12,
'right': 12,
'bottom': 12,
'left': 12,
},
},
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Box,
'layout': Layout.Row,
'items': [
{
'type': ComponentType.Box,
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Text,
'text': 'hi',
'maxTextLines': 3,
'viewStyle': {
'padding': {
'top': 0,
'bottom': 6,
'left': 0,
'right': 0,
},
},
'textStyle': {
'size': 16,
'weight': FontWeight.Bold,
},
},
{
'type': ComponentType.Text,
'text': 'bye',
'maxTextLines': 10,
'textStyle': {
'size': 14,
},
},
],
},
{
'type': ComponentType.ImageButton,
'action': {
'type': ActionType.UIKit,
'data': 'sendbirduikit://delete',
},
'width': {
'type': 'fixed',
'value': 20,
},
'height': {
'type': 'fixed',
'value': 20,
},
'metaData': {
'pixelWidth': 60,
'pixelHeight': 60,
},
'imageUrl': 'https://dxstmhyqfqr1o.cloudfront.net/sendbird-message-builder/icon-more.png',
'imageStyle': {
'tintColor': '#ff8d5a',
},
},
],
},
{
'type': ComponentType.Box,
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 16,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'align': {
'horizontal': AlignValue.Left,
'vertical': AlignValue.Center,
},
'layout': Layout.Row,
'items': [
{
'type': ComponentType.Image,
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
'width': {
'type': 'fixed',
'value': 40,
},
'height': {
'type': 'fixed',
'value': 40,
},
'metaData': {
'pixelWidth': 512,
'pixelHeight': 512,
},
'viewStyle': {
'backgroundColor': '#BDBDBD',
'radius': 20,
},
'imageStyle': {
'contentMode': MediaContentMode.AspectFill,
},
},
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 0,
'bottom': 0,
'left': 12,
'right': 0,
},
},
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Text,
'text': 'Chongbu',
'maxTextLines': 1,
'textStyle': {
'size': 16,
'weight': FontWeight.Bold,
},
},
{
'type': ComponentType.Text,
'viewStyle': {
'margin': {
'top': 4,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'text': ' ',
'maxTextLines': 1,
'textStyle': {
'size': 14,
},
},
],
},
],
},
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 16,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'align': {
'horizontal': AlignValue.Left,
'vertical': AlignValue.Center,
},
'layout': Layout.Row,
'items': [
{
'type': ComponentType.Image,
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
'width': {
'type': 'fixed',
'value': 40,
},
'height': {
'type': 'fixed',
'value': 40,
},
'metaData': {
'pixelWidth': 512,
'pixelHeight': 512,
},
'viewStyle': {
'backgroundColor': '#BDBDBD',
'radius': 20,
},
'imageStyle': {
'contentMode': MediaContentMode.AspectFill,
},
},
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 0,
'bottom': 0,
'left': 12,
'right': 0,
},
},
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Text,
'text': 'Amanda',
'maxTextLines': 1,
'textStyle': {
'size': 16,
'weight': FontWeight.Bold,
},
},
{
'type': ComponentType.Text,
'viewStyle': {
'margin': {
'top': 4,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'text': 'This is title message',
'maxTextLines': 1,
'textStyle': {
'size': 14,
},
},
],
},
],
},
],
},
],
},
],
},
],
},
};

7

dist/types/components.d.ts
import type React from 'react';
import type { Action } from './properties';
import type { Align, ImageMetaData, ImageStyle, Layout, SizeSpec, TextStyle, ViewStyle } from './styles';
export declare type BasicProps<T, ParsedProperties> = React.PropsWithChildren<{
export type BasicProps<T, ParsedProperties> = React.PropsWithChildren<{
parsedProperties?: ParsedProperties;
} & T>;
export declare type GetProperties<Type extends ComponentType, U extends ComponentsUnion> = U extends {
export type GetProperties<Type extends ComponentType, U extends ComponentsUnion> = U extends {
type: Type;
properties: infer P;
} ? P : never;
export declare type ComponentsUnion = {
export type ComponentsUnion = {
type: ComponentType.Box;

@@ -40,2 +40,3 @@ properties: Box;

viewStyle?: ViewStyle;
elementId?: string;
}

@@ -42,0 +43,0 @@ export interface Box extends View {

@@ -25,3 +25,3 @@ export declare enum Layout {

}
export declare type SizeSpec = {
export type SizeSpec = {
type: 'fixed';

@@ -65,2 +65,3 @@ value: number;

contentMode?: MediaContentMode;
tintColor?: string;
}

@@ -67,0 +68,0 @@ export interface ImageMetaData {

{
"name": "@sendbird/uikit-message-template",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.12",
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"source": "src",
"devDependencies": {
"@types/react": "^18.0.24",
"@types/react": "^18.0.24"
},
"peerDependencies": {
"react": "^18.2.0"
},
"scripts": {
"build": "tsc"
"build": "tsc",
"clean": "rm -rf dist"
},
"gitHead": "486ba2c8f4fcc9ae09d95ccbbfaf4ebac366d69a"
"gitHead": "22f8610f96ffee6d35de12f269f7e6252162b834"
}

@@ -9,1 +9,3 @@ export * from './core/parser';

export * from './types/components';
export * from './test/data';

@@ -230,3 +230,3 @@ import { ComponentType } from '../types/components';

'imageUrl': 'https://1000logos.net/wp-content/uploads/2021/12/Globe-Telecom-logo.png',
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
'imageStyle': { 'contentMode': MediaContentMode.AspectFill, tintColor: '#a49a9a' },
},

@@ -338,1 +338,266 @@ {

};
export const sample_4: Template = {
'version': 1,
'body': {
'items': [
{
'type': ComponentType.Box,
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Image,
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
'metaData': {
'pixelWidth': 512,
'pixelHeight': 512,
},
'imageStyle': {
'tintColor': '#44ff1188',
},
},
{
'type': ComponentType.Box,
'viewStyle': {
'padding': {
'top': 12,
'right': 12,
'bottom': 12,
'left': 12,
},
},
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Box,
'layout': Layout.Row,
'items': [
{
'type': ComponentType.Box,
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Text,
'text': 'hi',
'maxTextLines': 3,
'viewStyle': {
'padding': {
'top': 0,
'bottom': 6,
'left': 0,
'right': 0,
},
},
'textStyle': {
'size': 16,
'weight': FontWeight.Bold,
},
},
{
'type': ComponentType.Text,
'text': 'bye',
'maxTextLines': 10,
'textStyle': {
'size': 14,
},
},
],
},
{
'type': ComponentType.ImageButton,
'action': {
'type': ActionType.UIKit,
'data': 'sendbirduikit://delete',
},
'width': {
'type': 'fixed',
'value': 20,
},
'height': {
'type': 'fixed',
'value': 20,
},
'metaData': {
'pixelWidth': 60,
'pixelHeight': 60,
},
'imageUrl': 'https://dxstmhyqfqr1o.cloudfront.net/sendbird-message-builder/icon-more.png',
'imageStyle': {
'tintColor': '#ff8d5a',
},
},
],
},
{
'type': ComponentType.Box,
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 16,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'align': {
'horizontal': AlignValue.Left,
'vertical': AlignValue.Center,
},
'layout': Layout.Row,
'items': [
{
'type': ComponentType.Image,
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
'width': {
'type': 'fixed',
'value': 40,
},
'height': {
'type': 'fixed',
'value': 40,
},
'metaData': {
'pixelWidth': 512,
'pixelHeight': 512,
},
'viewStyle': {
'backgroundColor': '#BDBDBD',
'radius': 20,
},
'imageStyle': {
'contentMode': MediaContentMode.AspectFill,
},
},
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 0,
'bottom': 0,
'left': 12,
'right': 0,
},
},
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Text,
'text': 'Chongbu',
'maxTextLines': 1,
'textStyle': {
'size': 16,
'weight': FontWeight.Bold,
},
},
{
'type': ComponentType.Text,
'viewStyle': {
'margin': {
'top': 4,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'text': ' ',
'maxTextLines': 1,
'textStyle': {
'size': 14,
},
},
],
},
],
},
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 16,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'align': {
'horizontal': AlignValue.Left,
'vertical': AlignValue.Center,
},
'layout': Layout.Row,
'items': [
{
'type': ComponentType.Image,
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
'width': {
'type': 'fixed',
'value': 40,
},
'height': {
'type': 'fixed',
'value': 40,
},
'metaData': {
'pixelWidth': 512,
'pixelHeight': 512,
},
'viewStyle': {
'backgroundColor': '#BDBDBD',
'radius': 20,
},
'imageStyle': {
'contentMode': MediaContentMode.AspectFill,
},
},
{
'type': ComponentType.Box,
'viewStyle': {
'margin': {
'top': 0,
'bottom': 0,
'left': 12,
'right': 0,
},
},
'layout': Layout.Column,
'items': [
{
'type': ComponentType.Text,
'text': 'Amanda',
'maxTextLines': 1,
'textStyle': {
'size': 16,
'weight': FontWeight.Bold,
},
},
{
'type': ComponentType.Text,
'viewStyle': {
'margin': {
'top': 4,
'bottom': 0,
'left': 0,
'right': 0,
},
},
'text': 'This is title message',
'maxTextLines': 1,
'textStyle': {
'size': 14,
},
},
],
},
],
},
],
},
],
},
],
},
],
},
};

@@ -51,2 +51,3 @@ import type React from 'react';

viewStyle?: ViewStyle;
elementId?: string;
}

@@ -53,0 +54,0 @@

@@ -80,2 +80,3 @@ export enum Layout {

contentMode?: MediaContentMode;
tintColor?: string;
}

@@ -82,0 +83,0 @@

{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src",
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"include": ["src"],
"exclude": ["node_modules", "**/*.spec.ts"]
}

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