@gramlot/gramlot-examples 0.2.11 → 0.2.14

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 (71) hide show
  1. package/README.md +10 -3
  2. package/package.json +3 -3
  3. package/src/gramlot_examples/catalog.json +36 -6
  4. package/src/gramlot_examples/gallery/dist/frame.js +1742 -5
  5. package/src/gramlot_examples/gallery/dist/gallery.js +4073 -17144
  6. package/src/gramlot_examples/gallery/dist/inspector.js +1801 -0
  7. package/src/gramlot_examples/gallery/dist/notices.json +2 -22
  8. package/src/gramlot_examples/gallery/dist/theme-styles.js +2 -0
  9. package/src/gramlot_examples/gallery/gallery-page.js +35 -67
  10. package/src/gramlot_examples/gallery/gallery.css +23 -94
  11. package/src/gramlot_examples/index.js +2 -1
  12. package/src/gramlot_examples/pages/README.md +84 -1
  13. package/src/gramlot_examples/pages/binding/01_pointers.js +9 -0
  14. package/src/gramlot_examples/pages/binding/01_pointers.md +56 -9
  15. package/src/gramlot_examples/pages/binding/02_variable_datapath.md +50 -4
  16. package/src/gramlot_examples/pages/binding/03_setters_and_defaults.md +45 -6
  17. package/src/gramlot_examples/pages/binding/04_native_editing.md +48 -6
  18. package/src/gramlot_examples/pages/binding/05_checkbox_radio.md +44 -4
  19. package/src/gramlot_examples/pages/binding/06_style_and_visibility.md +40 -6
  20. package/src/gramlot_examples/pages/binding/07_bound_svg.md +48 -3
  21. package/src/gramlot_examples/pages/binding/08_freeze.js +1 -1
  22. package/src/gramlot_examples/pages/binding/08_freeze.md +44 -6
  23. package/src/gramlot_examples/pages/binding/09_forms.js +2 -1
  24. package/src/gramlot_examples/pages/binding/09_forms.md +53 -7
  25. package/src/gramlot_examples/pages/binding/10_svg_shapes.md +50 -5
  26. package/src/gramlot_examples/pages/binding/11_complete_page.md +53 -7
  27. package/src/gramlot_examples/pages/binding/README.md +34 -0
  28. package/src/gramlot_examples/pages/controllers/01_formula.md +48 -7
  29. package/src/gramlot_examples/pages/controllers/02_controller.js +24 -2
  30. package/src/gramlot_examples/pages/controllers/02_controller.md +61 -6
  31. package/src/gramlot_examples/pages/controllers/03_named_logic.md +63 -7
  32. package/src/gramlot_examples/pages/controllers/04_inline_expressions.md +50 -7
  33. package/src/gramlot_examples/pages/controllers/05_node_methods.md +41 -7
  34. package/src/gramlot_examples/pages/controllers/06_button_controller.md +49 -6
  35. package/src/gramlot_examples/pages/controllers/07_events.md +45 -6
  36. package/src/gramlot_examples/pages/controllers/08_end_to_end.js +26 -1
  37. package/src/gramlot_examples/pages/controllers/08_end_to_end.md +138 -9
  38. package/src/gramlot_examples/pages/controllers/09_endpoint.md +47 -7
  39. package/src/gramlot_examples/pages/controllers/10_call_on_change.md +48 -8
  40. package/src/gramlot_examples/pages/controllers/11_call_on_click.js +6 -0
  41. package/src/gramlot_examples/pages/controllers/11_call_on_click.md +58 -6
  42. package/src/gramlot_examples/pages/controllers/12_remote.md +55 -8
  43. package/src/gramlot_examples/pages/controllers/13_cached_remote.js +2 -2
  44. package/src/gramlot_examples/pages/controllers/13_cached_remote.md +62 -7
  45. package/src/gramlot_examples/pages/controllers/14_data_remote.js +10 -2
  46. package/src/gramlot_examples/pages/controllers/14_data_remote.md +65 -6
  47. package/src/gramlot_examples/pages/controllers/15_lifecycle.js +51 -0
  48. package/src/gramlot_examples/pages/controllers/15_lifecycle.md +59 -0
  49. package/src/gramlot_examples/pages/controllers/16_attribute_projection.js +25 -0
  50. package/src/gramlot_examples/pages/controllers/16_attribute_projection.md +58 -0
  51. package/src/gramlot_examples/pages/controllers/17_data_exchange.js +51 -0
  52. package/src/gramlot_examples/pages/controllers/17_data_exchange.md +61 -0
  53. package/src/gramlot_examples/pages/controllers/18_publish_subscribe.js +36 -0
  54. package/src/gramlot_examples/pages/controllers/18_publish_subscribe.md +20 -0
  55. package/src/gramlot_examples/pages/controllers/19_frame_messages.js +39 -0
  56. package/src/gramlot_examples/pages/controllers/19_frame_messages.md +20 -0
  57. package/src/gramlot_examples/pages/controllers/README.md +57 -1
  58. package/src/gramlot_examples/pages/html_svg/01_hello_world.md +48 -4
  59. package/src/gramlot_examples/pages/html_svg/02_text_and_links.md +42 -4
  60. package/src/gramlot_examples/pages/html_svg/03_lists.md +45 -4
  61. package/src/gramlot_examples/pages/html_svg/04_semantic_page.md +44 -4
  62. package/src/gramlot_examples/pages/html_svg/05_tables.md +46 -4
  63. package/src/gramlot_examples/pages/html_svg/06_forms.md +48 -4
  64. package/src/gramlot_examples/pages/html_svg/07_native_disclosure.md +41 -4
  65. package/src/gramlot_examples/pages/html_svg/08_svg_shapes.md +45 -4
  66. package/src/gramlot_examples/pages/html_svg/09_svg_composition.md +44 -4
  67. package/src/gramlot_examples/pages/html_svg/10_cards_with_icons.md +42 -15
  68. package/src/gramlot_examples/pages/html_svg/11_static_report.md +37 -4
  69. package/src/gramlot_examples/pages/html_svg/12_complete_page.md +41 -4
  70. package/src/gramlot_examples/pages/html_svg/13_live_source.md +47 -16
  71. package/src/gramlot_examples/pages/html_svg/README.md +36 -0
@@ -1,27 +1,7 @@
1
1
  [
2
2
  {
3
- "name": "@genrojs/bag",
4
- "text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to the Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n\ngenro-bag-js\nCopyright 2025 Softwell S.r.l.\n\nThis product includes software developed at Softwell S.r.l.\n(https://www.softwell.it/).\n\nLicensed under the Apache License, Version 2.0.\n"
5
- },
6
- {
7
- "name": "@genrojs/tytx",
8
- "text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright 2025 Softwell S.r.l.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n\nGenro Project\nCopyright 2025-2026 Softwell S.r.l.\n\nThis product includes software developed by Softwell S.r.l.\n\nLicensed under the Apache License 2.0.\nYou may obtain a copy of the License at:\n\n https://www.apache.org/licenses/LICENSE-2.0\n"
9
- },
10
- {
11
- "name": "big.js",
12
- "text": "The MIT License (MIT)\r\n=====================\r\n\r\nCopyright © `<2024>` `Michael Mclaughlin`\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the “Software”), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\n"
13
- },
14
- {
15
- "name": "@msgpack/msgpack",
16
- "text": "Copyright 2019 The MessagePack Community.\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
17
- },
18
- {
19
- "name": "@xmldom/xmldom",
20
- "text": "Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors\nCopyright 2012 - 2017 @jindw <jindw@xidea.org> and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
21
- },
22
- {
23
- "name": "decimal.js",
24
- "text": "The MIT Licence.\r\n\r\nCopyright (c) 2025 Michael Mclaughlin\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n"
3
+ "name": "@gramlot/gramlot",
4
+ "text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to the Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n\nGramlot\nCopyright 2025-2026 Softwell S.r.l.\n\nThis product includes software developed at Softwell S.r.l.\n(https://www.softwell.it/), originally in Genro Pages and Genro DOM JS.\nThe original Genro DOM JS notice states: Copyright 2025 Softwell S.r.l.\n\nLicensed under the Apache License, Version 2.0.\n"
25
5
  },
26
6
  {
27
7
  "name": "dompurify",
@@ -0,0 +1,2 @@
1
+ // Generated from Gramlot Compact; edit the core theme, not this file.
2
+ export const compactStyle = "/* Gramlot Compact: load after gramlot-base/theme.css. Colors and behavior stay in Base. */\n@layer gramlot.tokens {\n :root {\n --gramlot-space-1: .2rem;\n --gramlot-space-2: .4rem;\n --gramlot-space-3: .5rem;\n --gramlot-space-4: .6rem;\n --gramlot-space-6: .9rem;\n --gramlot-space-8: 1.2rem;\n --gramlot-space-12: 1.8rem;\n --gramlot-radius-sm: .25rem;\n --gramlot-radius: .35rem;\n --gramlot-radius-lg: .4rem;\n }\n}\n\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.35; }\n :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre, figure) { margin-block: 0 .5rem; }\n h1 { font-size: 1.35rem; }\n h2 { font-size: 1.15rem; }\n h3 { font-size: 1.05rem; }\n pre { padding: .5rem; }\n blockquote { padding-inline-start: .6rem; }\n hr { margin-block: 1rem; }\n}\n\n@layer gramlot.components {\n :where(button, input[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"], .button) {\n min-block-size: 28px;\n padding: .25rem .5rem;\n font-size: 1rem;\n line-height: 1.35;\n }\n :where(label) { font-size: .95rem; }\n :where(input:not([type=\"button\"]):not([type=\"submit\"]):not([type=\"reset\"]):not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"range\"]):not([type=\"color\"]):not([type=\"file\"]):not([type=\"hidden\"]), select, textarea) {\n min-block-size: 28px;\n padding: .25rem .5rem;\n font-size: 1rem;\n line-height: 1.35;\n }\n :where(textarea) { min-block-size: 5rem; }\n :where(input[type=\"color\"]) { min-block-size: 28px; }\n :where(input[type=\"file\"])::file-selector-button { margin-inline-end: .5rem; padding: .25rem .5rem; }\n :where(fieldset) { margin-block-end: .6rem; padding: .5rem; }\n :where(table) { font-size: 1rem; }\n :where(th, td) { padding: .4rem .5rem; }\n :where(details) { padding: .4rem .5rem; }\n :where(details[open] > summary) { margin-block-end: .5rem; }\n :where(dialog) { padding: .75rem; }\n}\n\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 1.2rem, var(--gramlot-page-width)); padding-block: .6rem; }\n .card { padding: .6rem; box-shadow: none; }\n}\n";
@@ -1,72 +1,35 @@
1
- /** Browser-safe gallery UI authored with Gramlot Source. */
2
- import {Page as GramlotPage} from '@gramlot/gramlot/page';
3
-
4
- export class GalleryPage extends GramlotPage {
1
+ /** Gallery content on Gramlot's reusable index page. */
2
+ import {IndexPage} from '@gramlot/gramlot/page';
3
+ export class GalleryPage extends IndexPage {
5
4
  static title = 'Gramlot examples';
5
+ static installable = true;
6
+ static appIcon = '/assets/branding/app-icon.png';
7
+ static shellId = 'gallery';
6
8
  static galleryScript = '/gallery/dist/gallery.js';
7
- static css = ['/themes/gramlot-base/theme.css', '/gallery/gallery.css'];
8
-
9
- main(root) {
10
- const families = this.constructor.families;
11
- const shell = root.div({class: 'gallery', id: 'gallery'});
12
- const sidebar = shell.aside({class: 'gallery-sidebar'});
13
- const brand = sidebar.header();
14
- brand.img({src: this.constructor.logoUrl, alt: 'Gramlot', class: 'gallery-logo'});
15
- brand.h1('Examples');
16
- const navigation = sidebar.nav({'aria-label': 'Examples'}).ul({class: 'gallery-list'});
17
- for (const family of families) {
18
- const category = navigation.li().details({open: family === families[0]});
19
- category.summary({tabindex: -1}).a(family.title, {id: `open-${family.key}`, href: `#panel-${family.key}`,
20
- class: 'gallery-family', aria_current: null, tabindex: -1});
21
- const examplesList = category.ul({class: 'gallery-list'});
22
- for (const example of family.examples) {
23
- examplesList.li().a(example.title, {id: `open-${example.key}`, href: example.frameUrl,
24
- aria_current: null, tabindex: -1});
25
- }
26
- }
27
- const footer = sidebar.footer({class: 'gallery-keyboard'});
28
- const label = footer.html_label({for: 'keyboard-navigation'});
29
- label.input({type: 'checkbox', id: 'keyboard-navigation',
30
- checked: false});
31
- label.span('Keyboard navigation');
32
- const theme = sidebar.footer({class: 'gallery-theme'});
33
- theme.html_label('Theme', {for: 'gallery-theme'});
34
- const choices = theme.select({id: 'gallery-theme', value: 'light'});
35
- choices.option('Light', {value: 'light', selected: true});
36
- choices.option('Dark', {value: 'dark', selected: false});
37
-
38
- const content = shell.main({class: 'gallery-main'});
39
- const tabs = content.div({class: 'gallery-tabs', role: 'tablist', aria_label: 'Open examples'});
40
- tabs.button('Introduction', {type: 'button', role: 'tab', id: 'tab-intro',
41
- aria_controls: 'panel-intro',
42
- aria_selected: 'true', tabindex: -1, hidden: false});
43
- for (const family of families) {
44
- for (const {key, title} of [family, ...family.examples]) {
45
- tabs.button(title, {type: 'button', role: 'tab', id: `tab-${key}`,
46
- aria_controls: `panel-${key}`,
47
- aria_selected: 'false', tabindex: -1, hidden: true});
48
- }
49
- }
50
-
51
- const panels = content.div({class: 'gallery-panels'});
52
- const intro = panels.section({id: 'panel-intro', class: 'gallery-intro', role: 'tabpanel',
53
- aria_labelledby: 'tab-intro', hidden: false});
9
+ static css = [...IndexPage.css, '/gallery/gallery.css'];
10
+ static get navigation() {
11
+ return this.families.map(group => ({...group,
12
+ children: group.examples.map(item => ({...item, url: item.frameUrl}))}));
13
+ }
14
+ introduction(intro) {
54
15
  intro.h2('Example gallery');
55
16
  intro.p('This gallery shows each example page beside the code that creates it. ' +
56
17
  'The Python and JavaScript integrations have the same examples.');
57
18
  intro.p('Choose an example from the list. Its tab stays open so you can return to it. ' +
58
- 'Enable Keyboard navigation in the sidebar to move through tabs by keyboard. ' +
59
- 'The vertical divider resizes the preview and code.');
19
+ 'Enable Keyboard navigation in the footer to move through tabs by keyboard. ' +
20
+ 'Drag the dividers to resize the sidebar or the preview and code. ' +
21
+ 'Choose Base or Compact independently of the color mode.');
22
+
23
+ }
24
+ groupPanel(pane, group) { pane.div(group.readme, {id: `readme-${group.key}`}); }
25
+ footer(footer) {
26
+ super.footer(footer);
27
+ const inspector = footer.button({type: 'button', id: 'gallery-inspector', class: 'gallery-inspector',
28
+ title: 'Open inspector', aria_label: 'Inspector', aria_pressed: 'false', disabled: true});
29
+ inspector.span('🔍', {aria_hidden: 'true'});
60
30
 
61
- for (const family of families) {
62
- const categoryPanel = panels.section({id: `panel-${family.key}`, class: 'gallery-category',
63
- role: 'tabpanel',
64
- aria_labelledby: `tab-${family.key}`, hidden: true});
65
- categoryPanel.div(family.readme, {id: `readme-${family.key}`});
66
- for (const example of family.examples) this.panel(panels, example);
67
- }
68
- shell.script({src: this.constructor.galleryScript});
69
31
  }
32
+ behavior(shell) { shell.script({src: this.constructor.galleryScript}); }
70
33
 
71
34
  panel(parent, example) {
72
35
  const key = example.key;
@@ -85,13 +48,18 @@ export class GalleryPage extends GramlotPage {
85
48
  aria_label: 'Resize preview and code', aria_valuemin: 20,
86
49
  aria_valuemax: 80, aria_valuenow: 65});
87
50
  const codepane = split.div({class: 'gallery-codepane', id: `codepane-${key}`});
88
- codepane.h3(`JavaScript · ${example.folder}.js`);
89
- codepane.pre().code(example.source, {class: 'language-javascript',
90
- id: `code-${key}`});
51
+ const tabs = codepane.div({class: 'gallery-source-tabs', role: 'tablist', aria_label: 'Source files'});
52
+ tabs.button('JavaScript', {title: `${example.folder}.js`, type: 'button', role: 'tab',
53
+ id: `code-tab-${key}`, aria_controls: `code-panel-${key}`, aria_selected: 'true', tabindex: 0});
54
+ if (example.logic != null) {
55
+ tabs.button('logic.js', {hidden: true, title: `${example.folder}_aux.js`, type: 'button', role: 'tab',
56
+ id: `logic-tab-${key}`, aria_controls: `logic-panel-${key}`, aria_selected: 'false', tabindex: -1});
57
+ }
58
+ codepane.pre({id: `code-panel-${key}`, role: 'tabpanel', aria_labelledby: `code-tab-${key}`, tabindex: 0})
59
+ .code(example.source, {class: 'language-javascript', id: `code-${key}`});
91
60
  if (example.logic != null) {
92
- codepane.h3(`Logic · ${example.folder}_aux.js`);
93
- codepane.pre().code(example.logic, {class: 'language-javascript',
94
- id: `logic-${key}`});
61
+ codepane.pre({id: `logic-panel-${key}`, role: 'tabpanel', aria_labelledby: `logic-tab-${key}`,
62
+ tabindex: 0, hidden: true}).code(example.logic, {class: 'language-javascript', id: `logic-${key}`});
95
63
  }
96
64
  }
97
65
  }
@@ -1,102 +1,20 @@
1
- .gallery { block-size: 100dvh; display: grid; grid-template-columns: 14rem minmax(0, 1fr); overflow: hidden; }
2
- .gallery-sidebar { min-block-size: 0; overflow: auto; padding: 1.25rem .75rem; background: var(--gramlot-surface-subtle); border-inline-end: 1px solid var(--gramlot-border); }
3
- .gallery-sidebar h1 { margin: 0 .5rem 1.25rem; font-size: 1.35rem; }
4
- .gallery-list { list-style: none; margin: 0; padding: 0; }
5
- .gallery-list li + li { margin: .125rem 0 0; }
6
- .gallery-list a { display: block; inline-size: 100%; min-block-size: 2.5rem; padding: .5rem .75rem; border: 0; background: transparent; color: var(--gramlot-ink); text-align: start; font-weight: 450; }
7
- .gallery-list a:hover, .gallery-list a[aria-current="page"] { background: var(--gramlot-selected); color: var(--gramlot-action); }
8
- .gallery-list a[aria-current="page"] { font-weight: 650; }
9
- .gallery-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-inline-size: 0; min-block-size: 0; }
10
- .gallery-tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .75rem .75rem 0; border-block-end: 1px solid var(--gramlot-border); background: var(--gramlot-surface-subtle); }
11
- .gallery-tabs button { flex: none; white-space: nowrap; border: 1px solid var(--gramlot-border); border-block-end: 0; border-radius: var(--gramlot-radius) var(--gramlot-radius) 0 0; background: transparent; color: var(--gramlot-text-secondary); padding: .65rem 1rem; }
12
- .gallery-tabs button:hover, .gallery-tabs button[aria-selected="true"] { background: var(--gramlot-surface); color: var(--gramlot-action); }
13
- .gallery-panels { min-block-size: 0; min-inline-size: 0; overflow: hidden; }
14
- .gallery-intro { block-size: 100%; overflow: auto; padding: clamp(1.5rem, 4vw, 3rem); background: var(--gramlot-surface); }
15
- .gallery-intro > * { max-inline-size: 65ch; }
16
- .gallery-intro h2 { font-size: 1.75rem; margin-block: 0 1rem; }
17
- .gallery-intro p { font-size: 1.05rem; }
18
1
  .gallery-panel { block-size: 100%; min-block-size: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
19
- .gallery-explanation { max-block-size: 35dvh; overflow: auto; padding: 1.1rem 1.5rem; background: var(--gramlot-surface); border-block-end: 1px solid var(--gramlot-border); }
20
- .gallery-explanation h2 { margin-block-end: .5rem; }
21
- .gallery-explanation p { max-inline-size: 80ch; margin-block-end: .5rem; font-size: .9rem; }
2
+ .gallery-explanation { max-block-size: 28dvh; overflow: auto; padding: .5rem .75rem; background: var(--gramlot-surface); border-block-end: 1px solid var(--gramlot-border); font-size: 1rem; }
3
+ .gallery-explanation h1 { font-size: 1.25rem; margin-block: 0 .35rem; }
4
+ .gallery-explanation h2 { font-size: 1.1rem; margin-block: .6rem .25rem; }
5
+ .gallery-explanation :is(p, ul, ol, pre) { max-inline-size: none; margin-block: 0 .35rem; font-size: inherit; }
6
+ .gallery-explanation pre { padding: .45rem .6rem; }
7
+ .gallery-explanation :last-child { margin-block-end: 0; }
22
8
  .gallery-description { font-weight: 600; }
23
- .gallery-resources { display: flex; gap: 1rem; font-size: .8rem; }
24
- .gallery-split { min-inline-size: 0; min-block-size: 0; display: grid; grid-template-columns: minmax(0, var(--split-position)) .75rem minmax(0, 1fr); background: var(--gramlot-surface); }
9
+ .gallery-resources { display: flex; gap: .6rem; font-size: .95rem; }
10
+ .gallery-split { min-inline-size: 0; min-block-size: 0; display: grid; grid-template-columns: minmax(0, calc(var(--split-position) - 4px)) 8px minmax(0, 1fr); background: var(--gramlot-surface); }
25
11
  .gallery-preview { min-inline-size: 0; min-block-size: 0; overflow: hidden; }
26
12
  .gallery-preview iframe { display: block; inline-size: 100%; block-size: 100%; min-block-size: 0; border: 0; background: var(--gramlot-surface); }
27
- .gallery-divider { min-inline-size: .75rem; block-size: 100%; cursor: col-resize; touch-action: none; user-select: none; background: var(--gramlot-surface-subtle); border-inline: 1px solid var(--gramlot-border); position: relative; }
28
- .gallery-divider::after { content: ''; position: absolute; inline-size: .2rem; block-size: 2.25rem; inset-inline-start: calc(50% - .1rem); inset-block-start: calc(50% - 1.125rem); border-radius: var(--gramlot-radius); background: var(--gramlot-border-control); }
29
- .gallery-divider:focus-visible { outline: 3px solid var(--gramlot-focus-ring); outline-offset: -2px; }
30
- .gallery-codepane { min-inline-size: 0; min-block-size: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--gramlot-surface-subtle); }
31
- .gallery-codepane h3 { margin: 0; padding: .7rem 1rem; border-block-end: 1px solid var(--gramlot-border); font-size: .9rem; }
32
- .gallery-codepane pre { min-inline-size: 0; min-block-size: 0; margin: 0; padding: 1rem; overflow: auto; font-size: .82rem; line-height: 1.5; background: transparent; }
33
- .gallery-codepane code { white-space: pre; }
34
- @media (max-width: 640px) {
35
- .gallery { grid-template-columns: 9rem minmax(0, 1fr); }
36
- .gallery-sidebar { padding: .75rem .25rem; }
37
- .gallery-list a { font-size: .8rem; padding: .5rem; }
38
- .gallery-intro { padding: 1.25rem; }
39
- .gallery-explanation { padding: .75rem; max-block-size: 35dvh; }
40
- .gallery-tabs { padding: .5rem .5rem 0; }
41
- .gallery-tabs button { padding: .5rem .7rem; }
42
- .gallery-codepane h3 { padding: .4rem; }
43
- .gallery-codepane pre { padding: .5rem; font-size: .7rem; }
44
- }
45
-
46
- /* Compact workbench; colors come from the approved Gramlot palette. */
47
- .gallery-sidebar { display: flex; flex-direction: column; padding: .75rem .5rem; background: var(--gramlot-navigation); color: var(--gramlot-navigation-text); border-block-start: 3px solid var(--gramlot-brand-yellow); }
48
- .gallery-sidebar nav { flex: 1; min-block-size: 0; overflow: auto; }
49
- .gallery-sidebar h1 { margin: 0 .5rem .75rem; font-size: 1.1rem; }
50
- .gallery-list a { min-block-size: 2rem; padding: .35rem .6rem; color: var(--gramlot-navigation-text); border-radius: .25rem; font-size: .9rem; }
51
- .gallery-list a:hover { background: var(--gramlot-action-hover); color: var(--gramlot-navigation-text); }
52
- .gallery-list a[aria-current="page"] { background: var(--gramlot-brand-blue); color: #fff; }
53
- .gallery-keyboard { flex: none; margin-block-start: .75rem; padding: .6rem .3rem 0; border-block-start: 1px solid var(--gramlot-border-control); font-size: .8rem; }
54
- .gallery-keyboard label { display: flex; align-items: center; gap: .5rem; margin: 0; color: inherit; }
55
- .gallery-keyboard input { margin: 0; }
56
- .gallery:not(:has(#keyboard-navigation:checked)) :is(.gallery-list a, .gallery-list summary, .gallery-tabs button):focus-visible { outline: none; }
57
- .gallery:has(#keyboard-navigation:checked) :is(.gallery-list a, .gallery-list summary):focus-visible { outline: 2px solid var(--gramlot-brand-yellow); outline-offset: -2px; }
58
- .gallery-tabs { padding: .35rem .5rem 0; gap: .15rem; }
59
- .gallery-tabs button { min-block-size: 1.8rem; padding: .2rem .6rem; font-size: .85rem; line-height: 1.25; border-radius: .25rem .25rem 0 0; }
60
- .gallery-tabs button[aria-selected="true"] { border-block-start: 2px solid var(--gramlot-brand-blue); }
61
- .gallery-intro { padding: 1.25rem; }
62
- .gallery-intro h2 { font-size: 1.4rem; margin-block: 0 .75rem; }
63
- .gallery-intro p { font-size: .95rem; }
64
- .gallery-explanation { padding: .65rem 1rem; max-block-size: 30dvh; font-size: .9rem; }
65
- .gallery-explanation h1 { font-size: 1.25rem; margin-block: 0 .4rem; }
66
- .gallery-explanation h2 { font-size: 1rem; margin-block: .7rem .3rem; }
67
- .gallery-explanation p { max-inline-size: none; margin-block: 0 .4rem; font-size: inherit; }
68
- .gallery-explanation :last-child { margin-block-end: 0; }
69
- .gallery-codepane h3 { padding: .4rem .7rem; font-size: .85rem; }
70
- .gallery-codepane pre { padding: .6rem; border: 0; border-radius: 0; font-size: .85rem; }
71
- .gallery-sidebar { background: #182333; }
72
- .gallery-logo { display: block; inline-size: 90px; block-size: auto; margin: 0 auto .5rem; }
73
- .gallery-theme { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .6rem; margin-block-start: .65rem; font-size: .8rem; }
74
- .gallery-theme label { margin: 0; }
75
- .gallery-theme select { min-inline-size: 0; min-block-size: 1.8rem; padding: .2rem .4rem; font-size: inherit; }
76
-
77
- .gallery-list .gallery-list { margin-inline-start: .6rem; padding-inline-start: .4rem; border-inline-start: 1px solid var(--gramlot-border-control); }
78
- .gallery-list .gallery-family { font-weight: 650; }
79
- .gallery-list details { border: 0; border-radius: 0; background: transparent; padding: 0; }
80
- .gallery-list summary { display: flex; align-items: center; list-style: none; cursor: pointer; border-radius: .25rem; }
81
- .gallery-list summary::-webkit-details-marker { display: none; }
82
- .gallery-list summary::before { content: '\25B8'; flex: none; inline-size: 1.25rem; text-align: center; font-size: .9rem; color: var(--gramlot-navigation-text); opacity: .75; transition: transform .15s; }
83
- .gallery-list summary:hover::before { opacity: 1; }
84
- .gallery-list details[open] > summary::before { transform: rotate(90deg); }
85
- .gallery-list details[open] > summary { margin-block-end: 0; }
86
- .gallery-list summary > .gallery-family { flex: 1; min-inline-size: 0; padding-inline-start: .15rem; }
87
- .gallery-category { block-size: 100%; overflow: auto; padding: 1rem 1.25rem; font-size: .95rem; }
88
- .gallery-category h1 { font-size: 1.4rem; }
89
- .gallery-category table { font-size: .9rem; }
90
- .gallery-codepane pre { font-size: .8rem; }
91
- .gallery-split { grid-template-columns: minmax(0, calc(var(--split-position) - .375rem)) .75rem minmax(0, 1fr); }
92
-
93
- .gallery-list a { text-decoration: none; }
94
- /* Code panel: dark editor look, token colors of the highlight.js "vs2015" style (BSD-3-Clause, highlight.js). */
95
- .gallery-codepane { background: #1e1e1e; }
96
- .gallery-codepane h3 { background: #2d2d30; color: #cccccc; border-block-end-color: #111111; font-family: var(--gramlot-font-code); font-weight: 500; }
97
- .gallery-codepane pre { background: #1e1e1e; color: #dcdcdc; font-family: var(--gramlot-font-code); padding-inline-start: 0; }
13
+ .gallery-codepane { min-inline-size: 0; min-block-size: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #1e1e1e; }
14
+ .gallery-codepane pre { min-inline-size: 0; min-block-size: 0; margin: 0; padding: .4rem .4rem .4rem 0; border: 0; border-radius: 0; overflow: auto; font: 12px/1.4 var(--gramlot-font-code); background: #1e1e1e; color: #dcdcdc; }
15
+ .gallery-codepane code { white-space: pre; font-size: inherit; }
98
16
  .gallery-codepane .hljs { color: #dcdcdc; counter-reset: code-line; }
99
- .gallery-codepane .code-line::before { counter-increment: code-line; content: counter(code-line); display: inline-block; inline-size: 3em; margin-inline-end: 1em; padding-inline-end: .25em; text-align: end; color: #6e7681; user-select: none; }
17
+ .gallery-codepane .code-line::before { counter-increment: code-line; content: counter(code-line); display: inline-block; inline-size: 2.5em; margin-inline-end: .75em; padding-inline-end: .25em; text-align: end; color: #6e7681; user-select: none; }
100
18
  .gallery-codepane :is(.hljs-keyword, .hljs-literal, .hljs-symbol, .hljs-name, .hljs-link) { color: #569cd6; }
101
19
  .gallery-codepane :is(.hljs-built_in, .hljs-type) { color: #4ec9b0; }
102
20
  .gallery-codepane :is(.hljs-number, .hljs-class) { color: #b8d7a3; }
@@ -108,3 +26,14 @@
108
26
  .gallery-codepane :is(.hljs-meta, .hljs-meta .hljs-keyword, .hljs-tag) { color: #9b9b9b; }
109
27
  .gallery-codepane :is(.hljs-variable, .hljs-template-variable) { color: #bd63c5; }
110
28
  .gallery-codepane :is(.hljs-attr, .hljs-attribute) { color: #9cdcfe; }
29
+ .gallery-codepane > pre[hidden] { display: none; }
30
+ .gallery-source-tabs { display: flex; min-inline-size: 0; overflow-x: auto; background: #2d2d30; }
31
+ .gallery-source-tabs button { flex: none; min-block-size: 28px; margin: 0; padding: .2rem .6rem; border: 0; border-radius: 0; background: transparent; color: #ccc; font: 600 12px/1.35 var(--gramlot-font-code); white-space: nowrap; }
32
+ .gallery-source-tabs button[aria-selected="true"] { background: #1e1e1e; color: #fff; box-shadow: inset 0 2px var(--gramlot-brand-blue); }
33
+ .gallery-source-tabs button:focus-visible { outline: 2px solid var(--gramlot-focus-ring); outline-offset: -2px; }
34
+ .gallery-source-tabs button[hidden] { display: none; }
35
+ .gallery-explanation { padding: .4rem; }
36
+ .gallery-inspector { display: inline-flex; align-items: center; justify-content: center; flex: none; margin-inline-start: auto; padding: 0; inline-size: 28px; block-size: 28px; min-block-size: 28px; border: 0; background: transparent; box-shadow: none; font-size: 16px; line-height: 1; }
37
+ .gallery-inspector:hover { background: var(--gramlot-surface); }
38
+ .gallery-inspector:focus-visible { outline: 2px solid var(--gramlot-focus-ring); outline-offset: 2px; }
39
+ .gallery-inspector[aria-pressed="true"] { background: var(--gramlot-action); color: var(--gramlot-navigation-text); }
@@ -4,7 +4,7 @@ import {basename, extname, join} from 'node:path';
4
4
  import {fileURLToPath} from 'node:url';
5
5
 
6
6
  const PACKAGE = fileURLToPath(new URL('./', import.meta.url));
7
- const MEDIA_TYPES = {'.css': 'text/css', '.svg': 'image/svg+xml', '.json': 'application/json'};
7
+ const MEDIA_TYPES = {'.css': 'text/css', '.svg': 'image/svg+xml', '.png': 'image/png', '.json': 'application/json'};
8
8
  const SUFFIXES = ['.py', '.js', '.css', '.md', '_aux.js'];
9
9
  const DIST = ['gallery.js', 'frame.js', 'notices.json', 'LICENSE', 'NOTICE'];
10
10
 
@@ -53,6 +53,7 @@ export function buildGallery({catalogs = []} = {}) {
53
53
  const filesByUrl = [
54
54
  ['/themes/gramlot-base/theme.css', resolve('@gramlot/gramlot/themes/gramlot-base/theme.css')],
55
55
  ['/assets/branding/gramlot-logo-dark.svg', resolve('@gramlot/gramlot/assets/branding/gramlot-logo-dark.svg')],
56
+ ['/assets/branding/app-icon.png', resolve('@gramlot/gramlot/assets/branding/app-icon.png')],
56
57
  ['/gallery/gallery.css', join(gallery, 'gallery.css')],
57
58
  ...['page.py', 'page.js'].filter(name => existsSync(join(gallery, name)))
58
59
  .map(name => [`/gallery/${name}`, join(gallery, name)]),
@@ -7,7 +7,7 @@ JavaScript, in three families:
7
7
  - [`binding/`](binding/): eleven pages whose DOM follows the Data through pointers,
8
8
  editing, booleans, style, SVG and freeze. The last three take the content of
9
9
  `html_svg` examples 06, 08 and 12 and add the binding.
10
- - [`controllers/`](controllers/): fourteen pages with formulas, controllers, named
10
+ - [`controllers/`](controllers/): seventeen pages with formulas, controllers, named
11
11
  logic in the `Logic` class of the page module, inline expressions, node methods, buttons,
12
12
  events, the end-to-end story, `dataRpc` calls to the endpoints of the page, `remote`
13
13
  fragments and `dataRemote` values.
@@ -24,3 +24,86 @@ assets ([GE-010 §025](https://github.com/gramlot-org/gramlot-examples/blob/main
24
24
  The pages depend only on the Gramlot core. Shared visual styling is the
25
25
  `gramlot-base` theme shipped in the core package, served by each environment at
26
26
  `/themes/gramlot-base/theme.css`.
27
+
28
+ ## Learn through the release sequence
29
+
30
+ The sections follow the chronological growth of Gramlot. Start with Source, then
31
+ return to the same interface as later releases add Data bindings, controllers,
32
+ endpoint calls and remote content. The same example may appear more than once:
33
+ compare the earlier code with the later declaration, identify what is removed and
34
+ explain why the result still works. Repetition for this comparison is intentional.
35
+
36
+ Use the [core release-by-release learning route](https://github.com/gramlot-org/gramlot/blob/main/docs/public/025-try.md#gc-025-015) for the milestones and
37
+ references. These labels name **core** releases, not the independent release
38
+ numbers of this package. The gallery's maintained pages are not frozen executable
39
+ copies of old packages: historical forms must be labelled, not installed through
40
+ pinned/downgraded dependencies. Each of the 41 lessons opens with a short description and feature scope.
41
+ Section introductions state which library features are used at each release stage.
42
+ Guided trials, exercises and limits remain available under **More detail**, closed
43
+ initially so the gallery starts with just the introduction. Before/after comparisons distinguish reduced
44
+ coordination from added behavior; the complete-page lesson retains its local stage and adds a separate endpoint
45
+ trial; explicitly blocked advanced topics remain separate work. The identity-aware auth walkthrough lives in the Kajenn
46
+ adapter guide.
47
+
48
+ | Stage | Existing examples | Comparison to make |
49
+ | --- | --- | --- |
50
+ | 0.1.x Source foundation | e01–e13, beginning with e01 | Structure, native controls and SVG before Data binding. The maintained live Source demonstrations add later inline browser actions. |
51
+ | 0.2.0 binding and controllers | b01–b11, c01–c08, c15 and the first part of c16 | Return to forms e06→b09, SVG e08→b10 and composition e12→b11. Follow Data instead of manually synchronizing presentation. c08 combines local behavior. |
52
+ | 0.2.3 Data-srcdoc sandbox | Later section of c16 | Distinguish bound text from a separate sandboxed HTML preview. |
53
+ | 0.2.5 page module and Data exchange | c03, c17 and the shared Logic beside Python | Save/restore the same form record; distinguish TYTX from JSON/XML exports. The public utility path changed in 0.2.10. |
54
+ | 0.2.14 endpoints | c09–c11, then return to c08’s later section | Move from local effects to a Page method returning a value into Data. Explain success, error and default refusal. |
55
+ | 0.2.15 Source authorization | Later section of c11; identity-aware adapter guide | Server removes refused Source subtrees. Common pages do not demonstrate authenticated allow/deny. |
56
+ | 0.2.16 remote and lazy Data | c12–c14 | Compare returning a value with mounting Source and with loading a value only when read. |
57
+
58
+ Within a stage, use prerequisites to understand a page; they do not reorder the
59
+ release narrative. c08 retains its original local stage and appends a labelled 0.2.14 quote trial.
60
+ Return there after c09/c11: compare live local totals with an explicit server
61
+ snapshot, failure retaining the last quote, and recovery.
62
+ The runtime naming changes between the page module and endpoint milestones are
63
+ covered in the core reference, without inventing extra example stages.
64
+
65
+ ## Setup and use
66
+
67
+ Basic Python, an editor and a browser are enough for the Python route. Follow the
68
+ [core setup guide](https://github.com/gramlot-org/gramlot/blob/main/docs/public/025-try.md#gc-025-010)
69
+ to open a gallery and create a separate editable page. The gallery shows source;
70
+ it does not save edits to source files. Python builds Source on its server; the
71
+ JavaScript Logic beside it runs in the browser. JS Pages also run on Node/Bun or
72
+ in a standalone Worker. After saving a change, reload/reopen as the environment
73
+ guide explains. Predict the result first, then explain it using Source and Data.
74
+
75
+ For example, in c01 changing VAT alone does not recalculate gross; changing
76
+ quantity afterwards uses the new VAT. This exercise checks ^ versus =; it is not
77
+ a reason to move the lesson out of its release stage.
78
+
79
+ ## Current teaching limits
80
+
81
+ The catalogue now has 41 lessons: the 38 revised pages and three focused additions.
82
+ c15 demonstrates lifecycle, c16 templates/mask and sandboxed srcdoc, and c17 local
83
+ Data exchange; b01/c02/c11 add paths, path filtering and Source authorization.
84
+ Keys remain stable; the controller menu places c15/c16/c17 before c09 to follow
85
+ core 0.2.0 → 0.2.3 → 0.2.5 → 0.2.14, not numeric key order.
86
+ The nested-Date initialization extension of c17 is blocked by an owning-library
87
+ defect; dates/decimals are not claimed as covered by that page. Mail/HTTP need
88
+ explicit actions or environment-owned fixtures. Named resource groups need
89
+ genro-kajenn. c08 now includes its bounded later endpoint exercise. D6 checks
90
+ qualify the local teaching candidate in the eight documented environments; owner
91
+ teaching acceptance remains separate. See the dated qualification record linked
92
+ from [the gallery guide](https://github.com/gramlot-org/gramlot-examples/blob/main/docs/010-gallery.md#ge-010-030).
93
+ c13/c14 separate the basic trial from advanced cache/error/lifetime exercises.
94
+ In c13, “Mounted fragments” counts successful mounts; HTTP calls must be observed
95
+ independently. c14 has an explicit read button to distinguish a stored snapshot
96
+ from a later response. The corrected cache behavior is included from core 0.2.17. Update older
97
+ installations before following the advanced trials; a startup check alone does
98
+ not qualify every exercise in an environment.
99
+
100
+ The common FileServer gallery has no named resource groups: css_requires,
101
+ js_requires and named connect_on handlers need genro-kajenn's resource host.
102
+ The Kajenn adapter's auth capability is separate from that resource system.
103
+ Authentication allow/deny needs an identity-aware environment; c11 demonstrates
104
+ anonymous refusal. Planned lessons are not part of this catalogue until delivered.
105
+
106
+ The environment controls CSP: a strict named-Logic starter project cannot execute
107
+ inline gallery code unchanged. A standalone Worker is not an external server and
108
+ does not provide secret storage or database access. Keep these limits visible
109
+ when adapting a lesson.
@@ -28,6 +28,15 @@ export class Page extends BasePage {
28
28
  person.html_label('Role', {for: 'role-field'});
29
29
  person.input({value: '^.name?role', id: 'role-field'});
30
30
 
31
+ const anchor = pane.section({datapath: 'contexts', _anchor: true, class: 'card stack'});
32
+ anchor.h2('An anchor outside a nested context');
33
+ const child = anchor.div({datapath: '.child'});
34
+ child.p('^.name', {id: 'local-name'});
35
+ child.p('^#ANCHOR.name', {id: 'anchor-name'});
36
+ child.p('^.#parent.name', {id: 'parent-name'});
37
+ pane.dataSetter({destination_path: 'contexts.name', value: 'Outer'});
38
+ pane.dataSetter({destination_path: 'contexts.child.name', value: 'Inner'});
39
+
31
40
  pane.dataSetter({destination_path: 'settings.caption', value: 'Pointers'});
32
41
  pane.dataSetter({destination_path: 'settings.intro', value: 'Type in the fields: every ^ pointer follows the Data.'});
33
42
  pane.dataSetter({destination_path: 'person.name', value: 'Ada Lovelace', role: 'Mathematician'});
@@ -1,14 +1,61 @@
1
1
  # 01 · Pointers
2
2
 
3
- A pointer is a string that names a Data path. `^path` reads the path and follows it; `=path` reads it once.
3
+ Fields and text share the same values. Edit a field and see which text follows it. You learn the difference between `^` (keep following) and `=` (read once), and how a Data path locates a value.
4
4
 
5
- - `^settings.caption` is an absolute path. The heading shows it and changes when you type a new caption.
6
- - `datapath='settings'` gives the section a context: `.caption` inside it means `settings.caption`.
7
- - `=.caption` is read at the first render only. The paragraph keeps the first caption.
8
- - `#settings.caption` starts from the context of the node with `node_id='settings'`.
9
- - `#FORM.name` starts from the context of the nearest ancestor with `formId`.
10
- - `.name?role` reads the attribute `role` of the Data node `person.name`. The field edits the attribute.
5
+ **Uses:** Source, Data, pointers and native binding — core 0.2.0. No endpoint calls.
11
6
 
12
- The `dataSetter` nodes at the end put the first values in the Data before anything is shown.
7
+ <details>
8
+ <summary>More detail</summary>
13
9
 
14
- **Try it:** Type a caption, then a role, and watch which texts follow.
10
+
11
+ **Release stage:** Data binding and browser behavior (core 0.2.0).
12
+
13
+ **Goal:** Resolve Data paths and predict which texts follow an edit.
14
+
15
+ **Before this lesson:** [e01 · Hello World](https://github.com/gramlot-org/gramlot-examples/blob/main/src/gramlot_examples/pages/html_svg/01_hello_world.md), [e06 · Forms](https://github.com/gramlot-org/gramlot-examples/blob/main/src/gramlot_examples/pages/html_svg/06_forms.md). These prerequisites support the release sequence; later comparisons are explicitly labelled below.
16
+
17
+ **Open and edit:** select **b01 · Pointers** in your environment’s gallery. For source changes, copy/edit the matching page in your own project using the [setup guide](https://github.com/gramlot-org/gramlot/blob/main/docs/public/025-try.md); the gallery is a source viewer. Save, then reload/reopen as that guide explains. The snippets below are excerpts/edits within that Page, not standalone launch commands.
18
+
19
+ ## Read the page
20
+
21
+ `^` reads and subscribes; `=` reads without subscribing. `datapath="settings"` makes `.caption` relative to `settings`. Setters initialize Data before the first display.
22
+
23
+ ```python
24
+ settings.input(value="^.caption", id="caption-field")
25
+ settings.p("=.caption", id="first-caption")
26
+ ```
27
+
28
+ The heading uses absolute `^settings.caption`. `#settings.caption` uses the context of the Source node with `node_id="settings"`; `#FORM.name` uses the nearest form context. `.name?role` reads a Data **attribute**, not a DOM attribute.
29
+
30
+ Python builds Source on the server; its JavaScript counterpart builds it on Node/Bun or in a standalone Worker. Bindings, actions and any Logic execute in the browser; Python strings containing JavaScript are not executed by Python.
31
+
32
+ ## Try it and predict the result
33
+
34
+ 1. Initially expect “Pointers”, Ada Lovelace and Mathematician.
35
+ 2. Type “My caption” and **leave the field**: the heading and symbolic reference change, but the `=` paragraph still says “Pointers”.
36
+ 3. Change Role to Writer and leave the field: the role display changes; the person’s name does not.
37
+
38
+ ## Change it and check yourself
39
+
40
+ Change only the paragraph from `"=.caption"` to `"^.caption"` and reload; edit the caption again.
41
+
42
+ **Answer:** now it follows too. The one-character change adds a subscription, not another event handler. A `=` argument of a controller is different: it is read at each controller run, without triggering that run.
43
+
44
+ ## The same example across stages
45
+
46
+ Earlier e01 rendered a literal heading. Here the declaration is `pane.h1("^settings.caption")` plus initialized Data. On an edit, no authored Source lookup/`setValue` is needed: the pointer provides that connection. Initial state and runtime behavior are now separate.
47
+
48
+
49
+ ## Advanced: the same name from different origins (0.2.0)
50
+
51
+ The added section has an `_anchor` at Data context `contexts`, then a child with `.child`. Read the three paragraphs: the local `.name` reads Inner; `#ANCHOR.name` reads Outer. `^.#parent.name` starts from the resolved local Data context `contexts.child`, cancels its last segment and reads Outer. `#parent` is a Data-path segment, not a Source-node lookup. A bare leading `^#parent.name` is not the declaration used here.
52
+
53
+ Change `contexts.name` to Outside in the initial setter and reload. **Answer:** the anchor and parent-path paragraphs change; the local read stays Inner. Now change `contexts.child.name`: only the local paragraph changes. The `node_id`, HTML `id`, and Data context are distinct identities.
54
+
55
+ ## Limits and next step
56
+
57
+ Inputs here use `change`, not live keystrokes. Do not prefix Data paths with the Source `main` path. The advanced section distinguishes `#ANCHOR` from the Data-path segment `.#parent`; do not treat `#parent` as a Source-node identifier.
58
+
59
+ Continue with [b02 · Variable datapath](https://github.com/gramlot-org/gramlot-examples/blob/main/src/gramlot_examples/pages/binding/02_variable_datapath.md). The [authoring reference](https://github.com/gramlot-org/gramlot/blob/main/docs/public/095-writing-pages.md) explains the full contract.
60
+
61
+ </details>