From e2d62e151332dbdefa08e83ab667a30ed27365ab Mon Sep 17 00:00:00 2001 From: maelstrom Date: Wed, 22 Apr 2026 08:25:10 +0200 Subject: [PATCH] example lexicon --- app/_layout.tsx | 19 ++++++- lexicons.json | 6 +++ lexicons/dev/maelstrom/bramblr/post.json | 27 ++++++++++ src/lexicons/dev.ts | 5 ++ src/lexicons/dev/maelstrom.ts | 5 ++ src/lexicons/dev/maelstrom/bramblr.ts | 5 ++ .../dev/maelstrom/bramblr/post.defs.ts | 51 +++++++++++++++++++ src/lexicons/dev/maelstrom/bramblr/post.ts | 6 +++ 8 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 lexicons.json create mode 100644 lexicons/dev/maelstrom/bramblr/post.json create mode 100644 src/lexicons/dev.ts create mode 100644 src/lexicons/dev/maelstrom.ts create mode 100644 src/lexicons/dev/maelstrom/bramblr.ts create mode 100644 src/lexicons/dev/maelstrom/bramblr/post.defs.ts create mode 100644 src/lexicons/dev/maelstrom/bramblr/post.ts diff --git a/app/_layout.tsx b/app/_layout.tsx index d2a8b0b..cc241a2 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -1,5 +1,20 @@ -import { Stack } from "expo-router"; +import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; +import { Stack } from 'expo-router'; +import { StatusBar } from 'expo-status-bar'; +import 'react-native-reanimated'; + +export const unstable_settings = { + anchor: '(tabs)', +}; export default function RootLayout() { - return ; + return ( + + + + + + + + ); } diff --git a/lexicons.json b/lexicons.json new file mode 100644 index 0000000..8d57219 --- /dev/null +++ b/lexicons.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "lexicons": [ + "dev.maelstrom.bramblr.post" + ] +} \ No newline at end of file diff --git a/lexicons/dev/maelstrom/bramblr/post.json b/lexicons/dev/maelstrom/bramblr/post.json new file mode 100644 index 0000000..a88d9aa --- /dev/null +++ b/lexicons/dev/maelstrom/bramblr/post.json @@ -0,0 +1,27 @@ +{ + "$type": "com.atproto.lexicon.schema", + "id": "dev.maelstrom.bramblr.post", + "lexicon": 1, + "defs": { + "main": { + "key": "tid", + "type": "record", + "description": "Record describing a text post, plain repost, or repost with text", + "record": { + "type": "object", + "properties": { + "text": { + "type": "string", + "maxLength": 4096000, + "description": "Temporary text content" + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "The time when the post was originally created." + } + } + } + } + } +} \ No newline at end of file diff --git a/src/lexicons/dev.ts b/src/lexicons/dev.ts new file mode 100644 index 0000000..012e322 --- /dev/null +++ b/src/lexicons/dev.ts @@ -0,0 +1,5 @@ +/* + * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. + */ + +export * as maelstrom from './dev/maelstrom.js' diff --git a/src/lexicons/dev/maelstrom.ts b/src/lexicons/dev/maelstrom.ts new file mode 100644 index 0000000..ea3e634 --- /dev/null +++ b/src/lexicons/dev/maelstrom.ts @@ -0,0 +1,5 @@ +/* + * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. + */ + +export * as bramblr from './maelstrom/bramblr.js' diff --git a/src/lexicons/dev/maelstrom/bramblr.ts b/src/lexicons/dev/maelstrom/bramblr.ts new file mode 100644 index 0000000..90e2330 --- /dev/null +++ b/src/lexicons/dev/maelstrom/bramblr.ts @@ -0,0 +1,5 @@ +/* + * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. + */ + +export * as post from './bramblr/post.js' diff --git a/src/lexicons/dev/maelstrom/bramblr/post.defs.ts b/src/lexicons/dev/maelstrom/bramblr/post.defs.ts new file mode 100644 index 0000000..89ed0a3 --- /dev/null +++ b/src/lexicons/dev/maelstrom/bramblr/post.defs.ts @@ -0,0 +1,51 @@ +/* + * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. + */ + +import { l } from '@atproto/lex' + +const $nsid = 'dev.maelstrom.bramblr.post' + +export { $nsid } + +/** Record describing a text post, plain repost, or repost with text */ +type Main = { + $type: 'dev.maelstrom.bramblr.post' + + /** + * Temporary text content + */ + text?: string + + /** + * The time when the post was originally created. + */ + createdAt?: l.DatetimeString +} + +export type { Main } + +/** Record describing a text post, plain repost, or repost with text */ +const main = l.record<'tid', Main>( + 'tid', + $nsid, + l.object({ + text: l.optional(l.string({ maxLength: 4096000 })), + createdAt: l.optional(l.string({ format: 'datetime' })), + }), +) + +export { main } + +export const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main), + $build = /*#__PURE__*/ main.build.bind(main), + $type = /*#__PURE__*/ main.$type +export const $assert = /*#__PURE__*/ main.assert.bind(main), + $check = /*#__PURE__*/ main.check.bind(main), + $cast = /*#__PURE__*/ main.cast.bind(main), + $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main), + $matches = /*#__PURE__*/ main.matches.bind(main), + $parse = /*#__PURE__*/ main.parse.bind(main), + $safeParse = /*#__PURE__*/ main.safeParse.bind(main), + $validate = /*#__PURE__*/ main.validate.bind(main), + $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main) diff --git a/src/lexicons/dev/maelstrom/bramblr/post.ts b/src/lexicons/dev/maelstrom/bramblr/post.ts new file mode 100644 index 0000000..774a5f4 --- /dev/null +++ b/src/lexicons/dev/maelstrom/bramblr/post.ts @@ -0,0 +1,6 @@ +/* + * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. + */ + +export * from './post.defs.js' +export * as $defs from './post.defs.js' -- 2.51.2