Skip to content

Commit d787fa1

Browse files
committed
add demo user
1 parent bc5c399 commit d787fa1

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

packages/editor/public/_docs/manual/5. Imports and NPM.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ You can split your code into multiple documents.
88

99
This is a great way to create reusable components that you can use across documents, or even share with the community.
1010

11-
`import * as myNotebook from "!@username/notebook";`
11+
_import \* as document from "!<typecell document id>";_
1212

13-
See this example, where we import a message from an external notebook [`@yousef/demo-message`](https://www.typecell.org/@yousef/demo-message).
13+
See this example, where we import a message from an external document created by user "@demo": [`simple-message~dq3rFeML3Rs7Y`](/@demo/public/simple-message~dq3rFeML3Rs7Y).
1414

1515
```typescript
16-
import * as myNotebook from "!@yousef/demo-message";
16+
import * as demoDocument from "!simple-message~dq3rFeML3Rs7Y";
1717

18-
export default myNotebook.message;
18+
export default demoDocument.message;
1919
```
2020

2121
**🚀 TypeCell documents are designed to be as "live" as possible**: when you change the code of your imported document,

packages/editor/src/store/DocumentResourceModelProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class DocumentResourceModelProvider
3939
if (!data) {
4040
return;
4141
}
42-
const codeNodes = data.querySelectorAll("monaco");
42+
const codeNodes = data.querySelectorAll("codeblock");
4343
const seenIds = new Set<string>();
4444
const createdModels = new Set<BasicCodeModel>();
4545

@@ -77,7 +77,7 @@ export class DocumentResourceModelProvider
7777
model = new BasicCodeModel(
7878
"!" + identifier.toString() + "/" + id + ".cell.tsx",
7979
code.toString(),
80-
attrLanguage
80+
attrLanguage,
8181
);
8282
this.modelMap.set(id, model);
8383
createdModels.add(model);

packages/server/supabase/seed.sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
INSERT INTO "auth"."users" ("instance_id", "id", "aud", "role", "email", "encrypted_password", "email_confirmed_at", "invited_at", "confirmation_token", "confirmation_sent_at", "recovery_token", "recovery_sent_at", "email_change_token_new", "email_change", "email_change_sent_at", "last_sign_in_at", "raw_app_meta_data", "raw_user_meta_data", "is_super_admin", "created_at", "updated_at", "phone", "phone_confirmed_at", "phone_change", "phone_change_token", "phone_change_sent_at", "confirmed_at", "email_change_token_current", "email_change_confirm_status", "banned_until", "reauthentication_token", "reauthentication_sent_at", "is_sso_user", "deleted_at") VALUES
4+
('00000000-0000-0000-0000-000000000000', '4c74a357-3551-4e2c-879d-a6fda9f322bc', 'authenticated', 'authenticated', '[email protected]', '$2a$10$VrsDfkYprEiruWEuCtMl0OiSF1ElRR72rcdrJ8h9NAJDhMagh5wp6', '2023-08-24 04:42:26.540106+00', NULL, '', NULL, '', NULL, '', '', NULL, '2023-08-24 04:42:26.543103+00', '{"provider": "email", "providers": ["email"]}', '{"typecell_username": "demo", "typecell_profile_nano_id": "dRmepjAedTyDH"}', NULL, '2023-08-24 04:42:26.533469+00', '2023-08-24 04:42:55.351648+00', NULL, NULL, '', '', NULL, '2023-08-24 04:42:26.540106+00', '', 0, NULL, '', NULL, 'f', NULL);
5+
6+
INSERT INTO "public"."workspaces" ("id", "created_at", "name", "owner_user_id", "is_username", "document_nano_id") VALUES
7+
('c9676445-09cc-4eea-bb58-8950736d0635', '2023-08-24 04:42:55.334968+00', 'demo', '4c74a357-3551-4e2c-879d-a6fda9f322bc', 't', 'dRmepjAedTyDH');
8+
9+
INSERT INTO "public"."documents" ("id", "nano_id", "created_at", "user_id", "updated_at", "data", "public_access_level") VALUES
10+
('2f03aff7-f9b0-4be0-976d-88d8778c0df2', 'dq3rFeML3Rs7Y', '2023-08-24 04:44:04.575+00', '4c74a357-3551-4e2c-879d-a6fda9f322bc', '2023-08-24 04:44:04.675+00', '\x0223f6c78f960700070103646f63030a626c6f636b47726f75700700f6c78f960700030e626c6f636b436f6e7461696e65720100f6c78f9607010100032800f6c78f96070102696401772439313534646430632d393636332d343465662d626164372d3437316634643165376231392800f6c78f9607010974657874436f6c6f7201770764656661756c742800f6c78f9607010f6261636b67726f756e64436f6c6f7201770764656661756c7487f6c78f960701030e626c6f636b436f6e7461696e65720700f6c78f96070903097061726167726170682800f6c78f96070a0d74657874416c69676e6d656e740177046c6566742100f6c78f960709026964012800f6c78f9607090974657874436f6c6f7201770764656661756c742800f6c78f9607090f6261636b67726f756e64436f6c6f7201770764656661756c7447f6c78f960702030768656164696e672800f6c78f96070f0d74657874416c69676e6d656e740177046c6566742800f6c78f96070f056c6576656c017701310700f6c78f96070f060400f6c78f9607120e53696d706c65206d657373616765a8f6c78f96070c01772434333362323639342d626436322d346532342d386138332d633931653662306261613164c7f6c78f960701f6c78f960709030e626c6f636b436f6e7461696e65720100f6c78f9607220100032800f6c78f96072202696401772435393231343837612d663564652d346361662d623338392d3231353636626439323830372800f6c78f9607220974657874436f6c6f7201770764656661756c742800f6c78f9607220f6261636b67726f756e64436f6c6f7201770764656661756c74000447f6c78f9607230309636f6465626c6f636b2800f6c78f96072e086c616e677561676501770a747970657363726970740700f6c78f96072e060400f6c78f9607300b6578706f7274206c65742081f6c78f96073b0284f6c78f96073d0b6d657373616765203d202284f6c78f9607480122c4f6c78f960748f6c78f9607491c48656c6c6f2066726f6d20616e6f7468657220646f63756d656e742184f6c78f960749013b028e81c9a906002801046d65746104747970650177092172696368746578742801046d6574610a637265617465645f6174017b4278a25db505f00001f6c78f96070502040c0123042a043c02', 'read'),
11+
('50ae6beb-1535-42de-9e67-42367779395b', 'dq3rFeML3Rs7Y/.inbox', '2023-08-24 04:44:04.571+00', '4c74a357-3551-4e2c-879d-a6fda9f322bc', '2023-08-24 04:44:04.902+00', '\x0103e6fd97b90c002801046d657461047479706501770621696e626f782801046d6574610a637265617465645f6174017b4278a25db505d000280109696e626f786d657461067461726765740177237479706563656c6c3a7479706563656c6c2e6f72672f6471337246654d4c335273375900', 'write'),
12+
('a90132f7-b947-48d3-a9e1-5c73b04d754a', 'dRmepjAedTyDH', '2023-08-24 04:42:55.325+00', '4c74a357-3551-4e2c-879d-a6fda9f322bc', '2023-08-24 04:43:43.609+00', '\x0105eec881ae0e002801046d65746104747970650177082170726f66696c652801046d6574610a637265617465645f6174017b4278a25da41db00028010a776f726b737061636573067075626c69630177237479706563656c6c3a7479706563656c6c2e6f72672f644168596233365363416b535428010770726f66696c6508757365726e616d6501770464656d6f28010770726f66696c65096a6f696e65645f6174017b4278a25da41dc00000', 'read'),
13+
('f979d5eb-0802-484e-a7cc-666a4950fefa', 'dAhYb36ScAkST', '2023-08-24 04:42:55.303+00', '4c74a357-3551-4e2c-879d-a6fda9f322bc', '2023-08-24 04:44:04.768+00', '\x0201e4afd48a0e00280104726566730a31333939393938373330017605026964770d7279323553365a553435513943096e616d65737061636577087479706563656c6c047479706577086861734368696c640674617267657477237479706563656c6c3a7479706563656c6c2e6f72672f6471337246654d4c335273375907736f72744b65797702613003d2efd0ef03002801046d65746104747970650177082170726f6a6563742801046d6574610a637265617465645f6174017b4278a25da41c60002801046d657461057469746c650177105075626c696320776f726b737061636500', 'read');

0 commit comments

Comments
 (0)