create-tinybase 0.1.5 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +227 -0
  3. package/cli.js +2 -2
  4. package/package.json +6 -3
  5. package/screenshots/chat.png +0 -0
  6. package/screenshots/drawing.png +0 -0
  7. package/screenshots/game.png +0 -0
  8. package/screenshots/todos.png +0 -0
  9. package/templates/README.md.hbs +1 -0
  10. package/templates/{eslint.config.js.hbs → client/eslint.config.js.hbs} +5 -0
  11. package/templates/client/index.html.hbs +182 -0
  12. package/templates/client/package.json.hbs +76 -0
  13. package/templates/client/src/chat/App.tsx.hbs +40 -0
  14. package/templates/client/src/chat/ChatStore.tsx.hbs +70 -0
  15. package/templates/client/src/chat/Message.tsx.hbs +21 -0
  16. package/templates/client/src/chat/MessageInput.tsx.hbs +42 -0
  17. package/templates/client/src/chat/Messages.tsx.hbs +29 -0
  18. package/templates/client/src/chat/SettingsStore.tsx.hbs +34 -0
  19. package/templates/client/src/chat/UsernameInput.tsx.hbs +22 -0
  20. package/templates/client/src/chat/app.ts.hbs +39 -0
  21. package/templates/client/src/chat/chatStore.ts.hbs +50 -0
  22. package/templates/client/src/chat/message.css.hbs +20 -0
  23. package/templates/client/src/chat/message.ts.hbs +27 -0
  24. package/templates/client/src/chat/messageInput.css.hbs +6 -0
  25. package/templates/client/src/chat/messageInput.ts.hbs +42 -0
  26. package/templates/client/src/chat/messages.css.hbs +6 -0
  27. package/templates/client/src/chat/messages.ts.hbs +33 -0
  28. package/templates/client/src/chat/settingsStore.ts.hbs +19 -0
  29. package/templates/client/src/chat/usernameInput.css.hbs +14 -0
  30. package/templates/client/src/chat/usernameInput.ts.hbs +30 -0
  31. package/templates/client/src/drawing/App.tsx.hbs +36 -0
  32. package/templates/client/src/drawing/BrushSize.tsx.hbs +22 -0
  33. package/templates/client/src/drawing/Canvas.tsx.hbs +100 -0
  34. package/templates/client/src/drawing/CanvasStore.tsx.hbs +62 -0
  35. package/templates/client/src/drawing/ColorPicker.tsx.hbs +24 -0
  36. package/templates/client/src/drawing/DrawingControls.tsx.hbs +24 -0
  37. package/templates/client/src/drawing/SettingsStore.tsx.hbs +36 -0
  38. package/templates/client/src/drawing/app.ts.hbs +20 -0
  39. package/templates/client/src/drawing/brushSize.css.hbs +21 -0
  40. package/templates/client/src/drawing/brushSize.ts.hbs +33 -0
  41. package/templates/client/src/drawing/canvas.css.hbs +8 -0
  42. package/templates/client/src/drawing/canvas.ts.hbs +103 -0
  43. package/templates/client/src/drawing/canvasStore.ts.hbs +42 -0
  44. package/templates/client/src/drawing/colorPicker.css.hbs +21 -0
  45. package/templates/client/src/drawing/colorPicker.ts.hbs +34 -0
  46. package/templates/client/src/drawing/drawingControls.css.hbs +12 -0
  47. package/templates/client/src/drawing/drawingControls.ts.hbs +26 -0
  48. package/templates/client/src/drawing/settingsStore.ts.hbs +21 -0
  49. package/templates/client/src/game/App.tsx.hbs +28 -0
  50. package/templates/client/src/game/Board.tsx.hbs +27 -0
  51. package/templates/client/src/game/Game.tsx.hbs +78 -0
  52. package/templates/client/src/game/GameStatus.tsx.hbs +21 -0
  53. package/templates/client/src/game/Square.tsx.hbs +23 -0
  54. package/templates/client/src/game/Store.tsx.hbs +67 -0
  55. package/templates/client/src/game/app.ts.hbs +12 -0
  56. package/templates/client/src/game/board.css.hbs +13 -0
  57. package/templates/client/src/game/board.ts.hbs +39 -0
  58. package/templates/client/src/game/game.ts.hbs +74 -0
  59. package/templates/client/src/game/gameStatus.css.hbs +21 -0
  60. package/templates/client/src/game/gameStatus.ts.hbs +27 -0
  61. package/templates/client/src/game/square.css.hbs +38 -0
  62. package/templates/client/src/game/square.ts.hbs +11 -0
  63. package/templates/client/src/game/store.ts.hbs +47 -0
  64. package/templates/client/src/index.tsx.hbs +24 -0
  65. package/templates/client/src/shared/Button.tsx.hbs +16 -0
  66. package/templates/client/src/shared/Input.tsx.hbs +16 -0
  67. package/templates/client/src/shared/button.css.hbs +25 -0
  68. package/templates/client/src/shared/button.ts.hbs +16 -0
  69. package/templates/client/src/shared/config.ts.hbs +9 -0
  70. package/templates/client/src/shared/input.css.hbs +22 -0
  71. package/templates/client/src/shared/input.ts.hbs +17 -0
  72. package/templates/client/src/todos/App.tsx.hbs +32 -0
  73. package/templates/client/src/todos/Store.tsx.hbs +70 -0
  74. package/templates/client/src/todos/TodoInput.tsx.hbs +30 -0
  75. package/templates/client/src/todos/TodoItem.tsx.hbs +20 -0
  76. package/templates/client/src/todos/TodoList.tsx.hbs +18 -0
  77. package/templates/client/src/todos/app.ts.hbs +23 -0
  78. package/templates/client/src/todos/store.ts.hbs +49 -0
  79. package/templates/client/src/todos/todoInput.css.hbs +9 -0
  80. package/templates/client/src/todos/todoInput.ts.hbs +38 -0
  81. package/templates/client/src/todos/todoItem.css.hbs +33 -0
  82. package/templates/client/src/todos/todoItem.ts.hbs +28 -0
  83. package/templates/client/src/todos/todoList.css.hbs +14 -0
  84. package/templates/client/src/todos/todoList.ts.hbs +38 -0
  85. package/templates/package.json.hbs +21 -56
  86. package/templates/server/index-do.ts.hbs +22 -0
  87. package/templates/server/index-node.ts.hbs +8 -0
  88. package/templates/server/package.json.hbs +51 -0
  89. package/templates/server/tsconfig.json.hbs +13 -0
  90. package/templates/server/wrangler.toml.hbs +12 -0
  91. package/templates/index.html.hbs +0 -55
  92. package/templates/src/App.tsx.hbs +0 -52
  93. package/templates/src/Buttons.tsx.hbs +0 -26
  94. package/templates/src/app.ts.hbs +0 -36
  95. package/templates/src/index.css.hbs +0 -138
  96. package/templates/src/index.tsx.hbs +0 -18
  97. /package/templates/{.prettierrc.hbs → client/.prettierrc.hbs} +0 -0
  98. /package/templates/{public → client/public}/favicon.svg +0 -0
  99. /package/templates/{tsconfig.json.hbs → client/tsconfig.json.hbs} +0 -0
  100. /package/templates/{vite.config.js.hbs → client/vite.config.js.hbs} +0 -0
@@ -1,138 +0,0 @@
1
- body {
2
- color: #bbb;
3
- background: #111;
4
- font-family: 'Inter', sans-serif;
5
- user-select: none;
6
- }
7
-
8
- #app {
9
- max-width: 40rem;
10
- margin: 2rem auto;
11
- display: grid;
12
- grid-template-columns: 1fr;
13
- column-gap: 2rem;
14
- align-items: start;
15
- row-gap: 1rem;
16
- }
17
-
18
- a {
19
- color: #bbb;
20
- }
21
-
22
- h1 {
23
- font-weight: 600;
24
- img {
25
- margin-right: 1rem;
26
- height: 2.5rem;
27
- vertical-align: text-bottom;
28
- }
29
- }
30
-
31
- h2 {
32
- font-weight: 800;
33
- font-size: 1.3rem;
34
- margin: 1rem 0 0;
35
- }
36
-
37
- p {
38
- margin: 0 0 1rem;
39
- line-height: 1.5;
40
- }
41
-
42
- details {
43
- border: 1px solid #333;
44
- border-radius: 0.25rem;
45
- padding: 0.5rem;
46
- }
47
-
48
- details summary {
49
- cursor: pointer;
50
- font-weight: 800;
51
- margin: -0.5rem -0.5rem 0;
52
- padding: 0.5rem;
53
- }
54
-
55
- details[open] summary {
56
- margin-bottom: 0.5rem;
57
- border-bottom: 1px solid #333;
58
- }
59
-
60
- pre {
61
- margin: 0;
62
- white-space: pre-wrap;
63
- word-wrap: break-word;
64
- }
65
-
66
- #buttons {
67
- border: solid #666;
68
- border-width: 1px 0;
69
- text-align: center;
70
- }
71
-
72
- #buttons button {
73
- border: 1px solid #666;
74
- border-radius: 0.25rem;
75
- padding: 0.5rem 1rem;
76
- background: #222;
77
- color: #fff;
78
- font-family: inherit;
79
- font-weight: 800;
80
- font-size: 0.8rem;
81
- width: 10rem;
82
- margin: 1rem;
83
- }
84
- #buttons button:hover {
85
- border-color: #d81b60;
86
- }
87
-
88
- table {
89
- border-collapse: collapse;
90
- font-size: inherit;
91
- line-height: inherit;
92
- margin-top: 0.5rem;
93
- table-layout: fixed;
94
- width: 100%;
95
- margin-bottom: 2rem;
96
- caption-side: bottom;
97
- }
98
- table caption {
99
- text-align: left;
100
- button {
101
- border: 0;
102
- margin-right: 0.25rem;
103
- }
104
- }
105
- table caption button {
106
- line-height: 0.7rem;
107
- margin: 0 0.25rem 0 0;
108
- vertical-align: middle;
109
- }
110
- th,
111
- td {
112
- padding: 0.25rem 0.5rem 0.25rem 0;
113
- text-align: left;
114
- }
115
- thead th,
116
- thead td {
117
- border: solid #999;
118
- border-width: 1px 0;
119
- }
120
- tbody th,
121
- tbody td {
122
- border-bottom: 1px solid #333;
123
- }
124
-
125
- table.sortedTable thead th {
126
- cursor: pointer;
127
- }
128
-
129
- @media (min-width: 40rem) {
130
- #app {
131
- grid-template-columns: 1fr 1fr;
132
- }
133
- header,
134
- p,
135
- #buttons {
136
- grid-column: span 2;
137
- }
138
- }
@@ -1,18 +0,0 @@
1
- {{includeFile template="src/index.css.hbs" output="src/index.css"}}
2
- import './index.css';
3
- {{#if react}}
4
- import ReactDOM from 'react-dom/client';
5
- import {App} from './App';
6
- {{includeFile template="src/App.tsx.hbs" output="src/App.{{ext}}"}}
7
- {{includeFile template="src/Buttons.tsx.hbs" output="src/Buttons.{{ext}}"}}
8
-
9
- addEventListener('load', () =>
10
- ReactDOM.createRoot(document.getElementById('app')!).render(
11
- <App />),
12
- );
13
- {{else}}
14
- import {app} from './app';
15
- {{includeFile template="src/app.ts.hbs" output="src/app.{{ext}}"}}
16
-
17
- addEventListener('load', app);
18
- {{/if}}
File without changes