@gramlot/gramlot-examples 0.2.11 → 0.2.12
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.
- package/README.md +3 -3
- package/package.json +3 -3
- package/src/gramlot_examples/catalog.json +23 -5
- package/src/gramlot_examples/gallery/dist/frame.js +1473 -5
- package/src/gramlot_examples/gallery/dist/gallery.js +3822 -17162
- package/src/gramlot_examples/gallery/dist/notices.json +2 -22
- package/src/gramlot_examples/gallery/dist/theme-styles.js +2 -0
- package/src/gramlot_examples/gallery/gallery-page.js +38 -67
- package/src/gramlot_examples/gallery/gallery.css +22 -94
- package/src/gramlot_examples/index.js +2 -1
- package/src/gramlot_examples/pages/README.md +83 -1
- package/src/gramlot_examples/pages/binding/01_pointers.js +9 -0
- package/src/gramlot_examples/pages/binding/01_pointers.md +56 -9
- package/src/gramlot_examples/pages/binding/02_variable_datapath.md +50 -4
- package/src/gramlot_examples/pages/binding/03_setters_and_defaults.md +45 -6
- package/src/gramlot_examples/pages/binding/04_native_editing.md +48 -6
- package/src/gramlot_examples/pages/binding/05_checkbox_radio.md +44 -4
- package/src/gramlot_examples/pages/binding/06_style_and_visibility.md +40 -6
- package/src/gramlot_examples/pages/binding/07_bound_svg.md +48 -3
- package/src/gramlot_examples/pages/binding/08_freeze.js +1 -1
- package/src/gramlot_examples/pages/binding/08_freeze.md +44 -6
- package/src/gramlot_examples/pages/binding/09_forms.js +2 -1
- package/src/gramlot_examples/pages/binding/09_forms.md +53 -7
- package/src/gramlot_examples/pages/binding/10_svg_shapes.md +50 -5
- package/src/gramlot_examples/pages/binding/11_complete_page.md +53 -7
- package/src/gramlot_examples/pages/binding/README.md +34 -0
- package/src/gramlot_examples/pages/controllers/01_formula.md +48 -7
- package/src/gramlot_examples/pages/controllers/02_controller.js +24 -2
- package/src/gramlot_examples/pages/controllers/02_controller.md +61 -6
- package/src/gramlot_examples/pages/controllers/03_named_logic.md +63 -7
- package/src/gramlot_examples/pages/controllers/04_inline_expressions.md +50 -7
- package/src/gramlot_examples/pages/controllers/05_node_methods.md +41 -7
- package/src/gramlot_examples/pages/controllers/06_button_controller.md +49 -6
- package/src/gramlot_examples/pages/controllers/07_events.md +45 -6
- package/src/gramlot_examples/pages/controllers/08_end_to_end.js +26 -1
- package/src/gramlot_examples/pages/controllers/08_end_to_end.md +138 -9
- package/src/gramlot_examples/pages/controllers/09_endpoint.md +47 -7
- package/src/gramlot_examples/pages/controllers/10_call_on_change.md +48 -8
- package/src/gramlot_examples/pages/controllers/11_call_on_click.js +6 -0
- package/src/gramlot_examples/pages/controllers/11_call_on_click.md +58 -6
- package/src/gramlot_examples/pages/controllers/12_remote.md +55 -8
- package/src/gramlot_examples/pages/controllers/13_cached_remote.js +2 -2
- package/src/gramlot_examples/pages/controllers/13_cached_remote.md +62 -7
- package/src/gramlot_examples/pages/controllers/14_data_remote.js +10 -2
- package/src/gramlot_examples/pages/controllers/14_data_remote.md +65 -6
- package/src/gramlot_examples/pages/controllers/15_lifecycle.js +51 -0
- package/src/gramlot_examples/pages/controllers/15_lifecycle.md +59 -0
- package/src/gramlot_examples/pages/controllers/16_attribute_projection.js +25 -0
- package/src/gramlot_examples/pages/controllers/16_attribute_projection.md +58 -0
- package/src/gramlot_examples/pages/controllers/17_data_exchange.js +51 -0
- package/src/gramlot_examples/pages/controllers/17_data_exchange.md +61 -0
- package/src/gramlot_examples/pages/controllers/README.md +55 -1
- package/src/gramlot_examples/pages/html_svg/01_hello_world.md +48 -4
- package/src/gramlot_examples/pages/html_svg/02_text_and_links.md +42 -4
- package/src/gramlot_examples/pages/html_svg/03_lists.md +45 -4
- package/src/gramlot_examples/pages/html_svg/04_semantic_page.md +44 -4
- package/src/gramlot_examples/pages/html_svg/05_tables.md +46 -4
- package/src/gramlot_examples/pages/html_svg/06_forms.md +48 -4
- package/src/gramlot_examples/pages/html_svg/07_native_disclosure.md +41 -4
- package/src/gramlot_examples/pages/html_svg/08_svg_shapes.md +45 -4
- package/src/gramlot_examples/pages/html_svg/09_svg_composition.md +44 -4
- package/src/gramlot_examples/pages/html_svg/10_cards_with_icons.md +42 -15
- package/src/gramlot_examples/pages/html_svg/11_static_report.md +37 -4
- package/src/gramlot_examples/pages/html_svg/12_complete_page.md +41 -4
- package/src/gramlot_examples/pages/html_svg/13_live_source.md +47 -16
- package/src/gramlot_examples/pages/html_svg/README.md +36 -0
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# HTML / SVG
|
|
2
2
|
|
|
3
|
+
Build pages from text, lists, tables, forms and drawings, then combine those pieces into a complete page.
|
|
4
|
+
|
|
5
|
+
**This section uses only Source to declare native HTML and SVG: the core 0.1.x foundation, before Data binding and controllers.** Forms already allow typing and Reset because those are browser features.
|
|
6
|
+
|
|
7
|
+
Start with **Hello World**. The Binding section later revisits the same forms, drawings and complete page to show what binding adds.
|
|
8
|
+
|
|
9
|
+
**Later follow-ups:** the × buttons in **Cards with icons** and the **Live Source playground** use browser actions from 0.2.0 and the `src` name from 0.2.10. Return to these parts after **Events** and **Lifecycle**.
|
|
10
|
+
|
|
11
|
+
<details>
|
|
12
|
+
<summary>More detail</summary>
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
Learn to build a page with Gramlot: each instruction adds an element, and nested instructions describe its structure.
|
|
4
16
|
|
|
5
17
|
Start with **Hello World**, then explore text, lists, tables and form controls. Continue with SVG shapes and combine them with HTML. The final examples use methods and loops to compose larger pages from simple parts.
|
|
@@ -8,3 +20,27 @@ Compare each preview with its code, then try the small change suggested in the e
|
|
|
8
20
|
|
|
9
21
|
Finish with **Live Source playground**: change the page while it is running and
|
|
10
22
|
watch a small SVG animation driven by Source attributes. The live examples also run in the static gallery of `gramlot-serverless gallery <folder>`, opened from disk, offline.
|
|
23
|
+
|
|
24
|
+
## Prerequisites within the release sequence
|
|
25
|
+
|
|
26
|
+
Start with e01/e03 for structure. HTML details (e02/e04/e05/e06/e07) and
|
|
27
|
+
SVG (e08/e09/e11) are optional branches. e10/e13 are advanced live Source lessons:
|
|
28
|
+
read c07's event explanation first and learn removal/cleanup before adapting the
|
|
29
|
+
animation. A loop in main builds Source once; it is not reactive Data. See the
|
|
30
|
+
[release-by-release route](https://github.com/gramlot-org/gramlot/blob/main/docs/public/025-try.md#gc-025-015). Prerequisites support the
|
|
31
|
+
chronological sequence; they do not replace it. The maintained files may use
|
|
32
|
+
later APIs, so they are not snapshots of the earliest release.
|
|
33
|
+
|
|
34
|
+
## How to work through a lesson
|
|
35
|
+
|
|
36
|
+
Read its core release stage first, then its goal and prerequisites. Open the
|
|
37
|
+
existing preview, predict the guided result, and only then try the source-change
|
|
38
|
+
exercise in your own editable page. Each exercise includes an answer. Follow
|
|
39
|
+
"The same example across stages" links to compare earlier/later declarations;
|
|
40
|
+
keep both stages visible. A newer interactive page can contain more total code
|
|
41
|
+
while requiring less explicit state synchronization or request coordination.
|
|
42
|
+
|
|
43
|
+
e10/e13 contain inline actions/scripts; their empty Logic class is not the source
|
|
44
|
+
of those actions. They are advanced bridges to the 0.2.0 behavior lessons.
|
|
45
|
+
|
|
46
|
+
</details>
|