import { RichTextContentSegmentTypeEnum } from 'expo-schema';
export const block = {
id: 'abcd6',
// etc -- other block fields
richTextContent: [
// richTextContent is an array of segment objects
{
id: 'abcd7',
segmentType: RichTextContentSegmentTypeEnum.Paragraph, // all segments have a type which relate to the block types and other uses. Allowed values are: paragraph, header 1, header 2, header 3, bulletted list item, numbered list item. Block types, messages usually only allow a single segment and may ignore the type when rendering, but our spec allows multiple, therefore richTextContent is an array of segments rather than a single segment object.
strings: [
// all segments have one or multiple strings.
{
id: 'abcd8',
value: 'Hello,', // The actual Unicode content of the string
style: {
bold: false,
underline: false,
italics: false,
strikethrough: true,
codeStyle: false, // simple monospace code style, not actual syntact highlighting.
textColor: 'green', // We don't support actual hex codes, rather we support specific colors that we know how to handle nicely in both dark mode and light mode. We also support 'DEFAULT'.
backgroundColor: '', // backgroundColor can be set to specific colors that we know how to handle nicely in both dark mode and light mode.
},
linkURL: '', // If the string should link to some URL, that is added as a string here.
onNewLine: false, // if true, then this segment starts on a new line. A new line != a paragraph break. Paragraph breaks are accomplished through multiple segments. onNewLine is like
and is generally accomplished using Shift + Rtrn.
mentionedBlockId: '', // If the string is @mention of a block, we include the block id here so the client can fetch the block name.
mentionedUserId: '', // If the string is @mention of a user, we inlude the block id here so the client can fetch the user name and so the notification service can parse and possibly send a notification to that user.
mentionedDate: '', // If the string is @mention of a date, we inlude the unix epoch date here so the client and server can handle that correctly.
},
{
id: 'abcd9',
value: ' World',
style: {
bold: false,
underline: false,
italics: true,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd1',
value: ' <, >!',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: true,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: true,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd2',
value: ' Name',
style: {
bold: true,
underline: true,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd3',
value: ' is',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd4',
value: ' Muhammad',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd5',
value: ' Sarmad',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd15',
value: '.',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'a3545bc454d15',
value: '',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: true,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd35',
value: ' I',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd25',
value: ' am',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd45',
value: ' full-stack',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd55',
value: ' engineer',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd55fr',
value: '.',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2343423343,
},
{
id: 'ab43recd55',
value: ' I',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2343433454543,
},
{
id: 'abc4ttc3cd54655',
value: ' live',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2341234309843,
},
{
id: 'abc4ttw23e334c3cd5476ytr655',
value: ' in',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 234124342323243,
},
{
id: 'abc4ttw23e334c3cd54655',
value: ' pakistan',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 32342343423243,
},
],
},
],
richTextContent2: [
// richTextContent is an array of segment objects
{
id: 'abcd7',
segmentType: RichTextContentSegmentTypeEnum.Paragraph, // all segments have a type which relate to the block types and other uses. Allowed values are: paragraph, header 1, header 2, header 3, bulletted list item, numbered list item. Block types, messages usually only allow a single segment and may ignore the type when rendering, but our spec allows multiple, therefore richTextContent is an array of segments rather than a single segment object.
strings: [
// all segments have one or multiple strings.
{
id: 'abcd8',
value: 'Hi,', // The actual Unicode content of the string
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false, // simple monospace code style, not actual syntact highlighting.
textColor: '', // We don't support actual hex codes, rather we support specific colors that we know how to handle nicely in both dark mode and light mode. We also support 'DEFAULT'.
backgroundColor: '', // backgroundColor can be set to specific colors that we know how to handle nicely in both dark mode and light mode.
},
linkURL: '', // If the string should link to some URL, that is added as a string here.
onNewLine: false, // if true, then this segment starts on a new line. A new line != a paragraph break. Paragraph breaks are accomplished through multiple segments. onNewLine is like
and is generally accomplished using Shift + Rtrn.
mentionedBlockId: '', // If the string is @mention of a block, we include the block id here so the client can fetch the block name.
mentionedUserId: '', // If the string is @mention of a user, we inlude the block id here so the client can fetch the user name and so the notification service can parse and possibly send a notification to that user.
mentionedDate: '', // If the string is @mention of a date, we inlude the unix epoch date here so the client and server can handle that correctly.
},
{
id: 'abcd45',
value: ' Sarmad',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abc43ed45',
value: '!',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abc5df55fr',
value: ' It`s',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2343423343,
},
{
id: 'abc5trd55fr',
value: ' Reference.',
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2343423343,
},
],
},
],
richTextContent3: [
// richTextContent is an array of segment objects
{
id: 'abcd7',
segmentType: RichTextContentSegmentTypeEnum.Paragraph, // all segments have a type which relate to the block types and other uses. Allowed values are: paragraph, header 1, header 2, header 3, bulletted list item, numbered list item. Block types, messages usually only allow a single segment and may ignore the type when rendering, but our spec allows multiple, therefore richTextContent is an array of segments rather than a single segment object.
strings: [
// all segments have one or multiple strings.
{
id: 'abcd8',
value: 'ok,', // The actual Unicode content of the string
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false, // simple monospace code style, not actual syntact highlighting.
textColor: '', // We don't support actual hex codes, rather we support specific colors that we know how to handle nicely in both dark mode and light mode. We also support 'DEFAULT'.
backgroundColor: '', // backgroundColor can be set to specific colors that we know how to handle nicely in both dark mode and light mode.
},
linkURL: '', // If the string should link to some URL, that is added as a string here.
onNewLine: false, // if true, then this segment starts on a new line. A new line != a paragraph break. Paragraph breaks are accomplished through multiple segments. onNewLine is like
and is generally accomplished using Shift + Rtrn.
mentionedBlockId: '', // If the string is @mention of a block, we include the block id here so the client can fetch the block name.
mentionedUserId: '', // If the string is @mention of a user, we inlude the block id here so the client can fetch the user name and so the notification service can parse and possibly send a notification to that user.
mentionedDate: '', // If the string is @mention of a date, we inlude the unix epoch date here so the client and server can handle that correctly.
},
{
id: 'abcd45',
value: ' thanks',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd55fr',
value: '.',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2343423343,
},
],
},
],
richTextContent4: [
// richTextContent is an array of segment objects
{
id: 'abc54red7',
segmentType: RichTextContentSegmentTypeEnum.Paragraph, // all segments have a type which relate to the block types and other uses. Allowed values are: paragraph, header 1, header 2, header 3, bulletted list item, numbered list item. Block types, messages usually only allow a single segment and may ignore the type when rendering, but our spec allows multiple, therefore richTextContent is an array of segments rather than a single segment object.
strings: [
// all segments have one or multiple strings.
{
id: 'abcd8',
value: 'nice,', // The actual Unicode content of the string
style: {
bold: false,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false, // simple monospace code style, not actual syntact highlighting.
textColor: '', // We don't support actual hex codes, rather we support specific colors that we know how to handle nicely in both dark mode and light mode. We also support 'DEFAULT'.
backgroundColor: '', // backgroundColor can be set to specific colors that we know how to handle nicely in both dark mode and light mode.
},
linkURL: '', // If the string should link to some URL, that is added as a string here.
onNewLine: false, // if true, then this segment starts on a new line. A new line != a paragraph break. Paragraph breaks are accomplished through multiple segments. onNewLine is like
and is generally accomplished using Shift + Rtrn.
mentionedBlockId: '', // If the string is @mention of a block, we include the block id here so the client can fetch the block name.
mentionedUserId: '', // If the string is @mention of a user, we inlude the block id here so the client can fetch the user name and so the notification service can parse and possibly send a notification to that user.
mentionedDate: '', // If the string is @mention of a date, we inlude the unix epoch date here so the client and server can handle that correctly.
},
{
id: 'abcd45',
value: ' to see',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 23434343,
},
{
id: 'abcd55fr',
value: '.',
style: {
bold: true,
underline: false,
italics: false,
strikethrough: false,
codeStyle: false,
textColor: 'DEFAULT',
backgroundColor: '',
},
linkURL: '',
onNewLine: false,
mentionedBlockId: '',
mentionedUserId: '',
mentionedDate: 2343423343,
},
],
},
],
};