openink 0.1.0

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 (52) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +21 -0
  3. package/README.md +164 -0
  4. package/bin/openink.js +4 -0
  5. package/docs/ai-assistants.md +35 -0
  6. package/docs/architecture.md +50 -0
  7. package/docs/blocks.md +604 -0
  8. package/docs/extending.md +86 -0
  9. package/docs/getting-started.md +97 -0
  10. package/docs/spec.md +215 -0
  11. package/package.json +38 -0
  12. package/schema/spec.schema.json +2641 -0
  13. package/src/build.js +82 -0
  14. package/src/cli.js +133 -0
  15. package/src/dev.js +53 -0
  16. package/src/export.js +68 -0
  17. package/src/icons.js +47 -0
  18. package/src/index.js +14 -0
  19. package/src/render/blocks/actions.js +68 -0
  20. package/src/render/blocks/content.js +86 -0
  21. package/src/render/blocks/data.js +24 -0
  22. package/src/render/blocks/feedback.js +29 -0
  23. package/src/render/blocks/forms.js +86 -0
  24. package/src/render/blocks/index.js +42 -0
  25. package/src/render/blocks/layout.js +102 -0
  26. package/src/render/blocks/media.js +65 -0
  27. package/src/render/blocks/navigation.js +67 -0
  28. package/src/render/blocks/overlay.js +18 -0
  29. package/src/render/blocks/shared.js +20 -0
  30. package/src/render/blocks/text.js +49 -0
  31. package/src/render/context.js +63 -0
  32. package/src/render/page.js +76 -0
  33. package/src/runtime/chart.js +85 -0
  34. package/src/runtime/dom.js +21 -0
  35. package/src/runtime/i18n.js +24 -0
  36. package/src/runtime/icon.js +28 -0
  37. package/src/runtime/index.js +64 -0
  38. package/src/runtime/navigation.js +27 -0
  39. package/src/runtime/placeholder.js +88 -0
  40. package/src/spec/docs.js +65 -0
  41. package/src/spec/schema.js +110 -0
  42. package/src/spec/validate.js +219 -0
  43. package/src/styles/openink.css +250 -0
  44. package/src/styles/themes/blueprint.css +31 -0
  45. package/src/styles/themes/color.css +28 -0
  46. package/src/styles/themes/dark.css +31 -0
  47. package/src/styles/themes/pastel.css +26 -0
  48. package/src/themes.js +10 -0
  49. package/templates/starter/AGENTS.md +18 -0
  50. package/templates/starter/README.md +11 -0
  51. package/templates/starter/gitignore +3 -0
  52. package/templates/starter/spec.yaml +55 -0
@@ -0,0 +1,55 @@
1
+ # yaml-language-server: $schema=https://unpkg.com/openink/schema/spec.schema.json
2
+ #
3
+ # {{name}}: describe your screens here, then run `npx openink dev`.
4
+ # Block reference: `npx openink blocks`
5
+
6
+ name: {{name}}
7
+
8
+ nav:
9
+ - { label: Home, go: home }
10
+ - { label: Sign up, go: signup }
11
+
12
+ screens:
13
+ - id: home
14
+ title: Home
15
+ note: Replace this with what the screen is for, or behaviour a sketch cannot show.
16
+ blocks:
17
+ - { type: h1, text: A short promise }
18
+ - { type: text, muted: true, text: One sentence that explains it. }
19
+ - type: grid
20
+ cols: 3
21
+ children:
22
+ - type: card
23
+ children:
24
+ - { type: image, h: 90, label: Icon }
25
+ - { type: h3, text: Feature one }
26
+ - type: card
27
+ children:
28
+ - { type: image, h: 90, label: Icon }
29
+ - { type: h3, text: Feature two }
30
+ - type: card
31
+ children:
32
+ - { type: image, h: 90, label: Icon }
33
+ - { type: h3, text: Feature three }
34
+ - { type: button, label: Get started, primary: true, go: signup }
35
+
36
+ - id: signup
37
+ title: Sign up
38
+ blocks:
39
+ - { type: h1, text: Create your account }
40
+ - type: card
41
+ children:
42
+ - { type: input, label: Email, inputType: email, placeholder: you@company.com }
43
+ - { type: input, label: Password, inputType: password }
44
+ - { type: button, label: Create account, primary: true, go: dashboard }
45
+
46
+ - id: dashboard
47
+ title: Dashboard
48
+ blocks:
49
+ - { type: h1, text: Dashboard }
50
+ - type: table
51
+ columns: [Name, Status]
52
+ rows:
53
+ - [First item, { type: badge, status: on, text: Active }]
54
+ - [Second item, { type: badge, status: wait, text: Pending }]
55
+ - { type: nextbar, text: End of the flow., button: Start over, go: home }