├── Samples ├── 1-basic_component │ ├── embedded │ │ ├── basic_template │ │ │ ├── mimetype │ │ │ ├── EPUB │ │ │ │ ├── img │ │ │ │ │ └── cover.jpg │ │ │ │ ├── xhtml │ │ │ │ │ ├── cover.xhtml │ │ │ │ │ ├── toc.xhtml │ │ │ │ │ └── chapter1.xhtml │ │ │ │ ├── components │ │ │ │ │ └── component_author │ │ │ │ │ │ └── component_name │ │ │ │ │ │ ├── css │ │ │ │ │ │ └── style.css │ │ │ │ │ │ ├── xhtml │ │ │ │ │ │ ├── fallback.xhtml │ │ │ │ │ │ └── component.xhtml │ │ │ │ │ │ └── js │ │ │ │ │ │ └── main.js │ │ │ │ ├── css │ │ │ │ │ └── style.css │ │ │ │ └── package.opf │ │ │ └── META-INF │ │ │ │ └── container.xml │ │ ├── embedded_basic_template.epub │ │ └── README.md │ └── packaged │ │ ├── basic_template │ │ ├── mimetype │ │ ├── META-INF │ │ │ └── container.xml │ │ └── EPUB │ │ │ ├── css │ │ │ └── style.css │ │ │ ├── xhtml │ │ │ ├── fallback.xhtml │ │ │ ├── component.xhtml │ │ │ └── toc.xhtml │ │ │ ├── js │ │ │ └── main.js │ │ │ └── package.opf │ │ ├── packaged_basic_template.epub │ │ └── README.md ├── 2-nested_component │ ├── packaged │ │ └── README.md │ └── embedded │ │ └── README.md └── 3-messaging_component │ ├── packaged │ └── README.md │ └── embedded │ └── README.md ├── LICENSE └── README.md /Samples/1-basic_component/embedded/basic_template/mimetype: -------------------------------------------------------------------------------- 1 | application/epub+zip -------------------------------------------------------------------------------- /Samples/1-basic_component/packaged/basic_template/mimetype: -------------------------------------------------------------------------------- 1 | application/epub+zip -------------------------------------------------------------------------------- /Samples/1-basic_component/embedded/embedded_basic_template.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDPF/scriptable-components/HEAD/Samples/1-basic_component/embedded/embedded_basic_template.epub -------------------------------------------------------------------------------- /Samples/1-basic_component/packaged/packaged_basic_template.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDPF/scriptable-components/HEAD/Samples/1-basic_component/packaged/packaged_basic_template.epub -------------------------------------------------------------------------------- /Samples/1-basic_component/embedded/basic_template/EPUB/img/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDPF/scriptable-components/HEAD/Samples/1-basic_component/embedded/basic_template/EPUB/img/cover.jpg -------------------------------------------------------------------------------- /Samples/2-nested_component/packaged/README.md: -------------------------------------------------------------------------------- 1 | # Nested Componenet Sample 2 | 3 | This is the future home to the nested Scriptable Component in it's packaged form. 4 | Meaning that the SC will a stand-alone EPUB utilizing SC metadata to identify itself and it's parts for toolchain ingestion. 5 | 6 | -------------------------------------------------------------------------------- /Samples/3-messaging_component/packaged/README.md: -------------------------------------------------------------------------------- 1 | # Messaging Componenet Sample 2 | 3 | This is the future home to the messaging Scriptable Component in it's packaged form. 4 | Meaning that the SC will a stand-alone EPUB utilizing SC metadata to identify itself and it's parts for toolchain ingestion. 5 | 6 | -------------------------------------------------------------------------------- /Samples/1-basic_component/packaged/README.md: -------------------------------------------------------------------------------- 1 | # Basic "Packaged" Component Sample 2 | 3 | This basic "Hello World" Scriptable Component (SC) uses a Fixed Layout viewport and appropriate accessible metadata for keyboard control. This sample is purely a packaging example showing the before and after embedding states of the SC. 4 | -------------------------------------------------------------------------------- /Samples/1-basic_component/embedded/basic_template/META-INF/container.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/1-basic_component/packaged/basic_template/META-INF/container.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/2-nested_component/embedded/README.md: -------------------------------------------------------------------------------- 1 | # Nested Componenet Sample 2 | 3 | This is the future home to the nested Scriptable Component in it's embedded form. 4 | Meaning that the SC will be a child to a parent EPUB utilizing the `` manifest item and ` 29 | 30 |
Scriptable Component 1: Hello WorldA basic packaged EPUB Scriptable Component.
31 | 32 |

Dolore magna aliqua uta enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IDPF EPUB Scriptable Components code & samples 2 | 3 | This repository is home to the EPUB Scriptable Components (ESC) Working Group (WG) code and samples. 4 | Contained herein are a set of samples of Scriptable Components (SC) based upon the [ESC Packaging specification](http://www.idpf.org/epub/sc/pkg/) and [ESC Communication API specification](http://www.idpf.org/epub/sc/api/). 5 | The goal is to form a collection of standards-based Scriptable Components as a source implementation for inspection and validation from all aspects of the industries production chain; authoring, validation, ingestion, and representation. 6 | The guiding principle is to create usable samples focused on meaningful aspects of the ESC landscape. As a baseline the repository structure has been set as follows: 7 | ``` 8 | . 9 | +-- LICENSE 10 | +-- README.md 11 | \---Samples 12 | +---1-basic_component 13 | | +---embedded 14 | | \---packaged 15 | +---2-nested_component 16 | | +---embedded 17 | | \---packaged 18 | \---3-messaging_component 19 | +---embedded 20 | \---packaged 21 | ``` 22 | 23 | 24 | 25 | ## Contributing to EPUB Scriptable Components code & samples 26 | 27 | Looking to contribute something to EPUB Scriptable Components code & samples? **Here's how you can help:** 28 | 29 | 30 | 31 | 32 | ### Reporting issues 33 | 34 | Please read the following guidelines before opening any issue. 35 | 36 | 1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available. 37 | 2. **Create an isolated and reproducible test case.** Be sure the problem exists in EPUB Scriptable Components code & samples with a [reduced test case](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report. 38 | 3. **Include a live example.** Make use of jsFiddle or jsBin to share your isolated test cases. 39 | 4. **Share as much information as possible.** Include operating system and version, browser and version, version of ePub Widget Framework, customized or vanilla build, etc. where appropriate. Also include steps to reproduce the bug. 40 | 41 | 42 | 43 | 44 | ### Pull requests 45 | 46 | - Try not to pollute your pull request with unintended changes--keep them simple and small 47 | - Try to share which browsers your code has been tested in before submitting a pull request 48 | 49 | 50 | 51 | 52 | ### Coding standards 53 | 54 | #### JS 55 | 56 | - End all lines with a semi-colon 57 | - Comma last 58 | - Indent of 4 spaces, remove tabs. 59 | - Make it readable and attractive 60 | - Modern screens can handle vertical space, use brackets on their own lines for visual clarity of blocks 61 | - Please use jsDoc annotations/comments to add typing information. 62 | 63 | #### HTML 64 | 65 | - Indent of 4 spaces, remove tabs. 66 | - Double quotes only, never single quotes 67 | - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags) 68 | - Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://` 69 | 70 | #### CSS 71 | 72 | - Adhere to the [RECESS CSS property order](http://markdotto.com/2011/11/29/css-property-order/) 73 | - Multiple-line approach (one property and value per line) 74 | - Always a space after a property's colon (e.g., `display: block;` and not `display:block;`) 75 | - End all lines with a semi-colon 76 | - For multiple, comma-separated selectors, place each selector on its own line 77 | - Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks) 78 | 79 | 80 | 81 | 82 | ### License 83 | 84 | By contributing your code, you agree to license your contribution under the [MIT](http://opensource.org/licenses/MIT) license. 85 | -------------------------------------------------------------------------------- /Samples/1-basic_component/embedded/basic_template/EPUB/package.opf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | urn:uuid:f4ec85a0-daf9-447b-d490-f458ca0aea0a 9 | uuid 10 | 2015-06-30T16:00:00Z 11 | 12 | Author Name's Nth Edition — Subject of Interest 13 | Subject of Interest, Author Name's, Nth Edition 14 | A useful brief description allowing for a reader to quickly discern the scope and scale of the product. 15 | Non-Fiction 16 | en 17 | 2015-06-01 18 | 19 | Darryl Lehmann 20 | Lehmann, Darryl 21 | Imagineeringart.com, Inc 22 | Copyright © Imagineeringart.com, Inc. 2015. All rights reserved. 23 | 24 | 25 | reflowable 26 | auto 27 | none 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | scriptable-component 53 | 54 | urn:uuid:2748c9f9-7362-49e1-85fb-7715f6d23862 55 | uuid 56 | 2015-06-30T16:00:00Z 57 | 58 | component_name 59 | Hello World 60 | A basic packaged EPUB Scriptable Component. 61 | en 62 | 63 | component_author 64 | Darryl Lehmann 65 | Lehmann, Darryl 66 | Imagineeringart.com, Inc 67 | Copyright © Imagineeringart.com, Inc. 2015. All rights reserved. 68 | 69 | 1.0.1 70 | pre-paginated 71 | landscape 72 | both 73 | width=480,height=320 74 | 75 | ARIA 76 | fullKeyboardControl 77 | fullMouseControl 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | --------------------------------------------------------------------------------