@lightningjs/blits 0.6.7 → 0.6.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ # v0.6.8
4
+
5
+ _29 jan 2024_
6
+
7
+ - Reverted fix (initially) empty for-loops
8
+
3
9
  # v0.6.7
4
10
 
5
11
  _26 jan 2024_
@@ -31,6 +31,6 @@
31
31
  "vite": "^4.0.4"
32
32
  },
33
33
  "dependencies": {
34
- "@lightningjs/blits": "^0.6.7"
34
+ "@lightningjs/blits": "^0.6.8"
35
35
  }
36
36
  }
@@ -0,0 +1,19 @@
1
+ # Blits - Lightning 3 App Development Framework
2
+
3
+ With Blits, the App Development Framework for Lightning 3, it becomes a breeze to build great Lightning 3 applications.
4
+
5
+ Blits is built on top of the Lightning 3 Renderer and aims to provide a **great developer experience**, making it fun and easy to build your apps!
6
+
7
+ Built from the ground up by the LightningJS team, we're offering a **Complete App framework**, full of features to speed up development, while keeping it **lightweight** with a focus on **performance**.
8
+
9
+ The Blits framework uses a **readable** XML-style template syntax and comes with built-in reactivity.
10
+
11
+ ## Why Blits?
12
+
13
+ You may be wondering where the name Blits comes from?
14
+
15
+ Firstly, it's short, memorable and just has a nice ring to it.
16
+
17
+ "Blits" is a Dutch word (a significant portion of the Lightning Open Source teams is based in the Netherlands). It means _flashy_ and it's often used to for things that are _great_ or _cool_.
18
+
19
+ Finally it's a nerdy reference to the computer term "Bit Blits" commonly used in graphics processing, for rapidly moving a block of data into memory - quite similar to what Lightning is doing
@@ -0,0 +1,64 @@
1
+ [
2
+ {
3
+ "text": "Getting Started",
4
+ "items": [
5
+ {
6
+ "text": "Introduction",
7
+ "link": "/introduction"
8
+ },
9
+ {
10
+ "text": "Setup",
11
+ "link": "/getting_started"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "text": "Basics",
17
+ "items": [
18
+ {
19
+ "text": "Components",
20
+ "link": "/components"
21
+ },
22
+ {
23
+ "text": "Template Syntax",
24
+ "link": "/template_syntax"
25
+ },
26
+ {
27
+ "text": "Component State",
28
+ "link": "/component_state"
29
+ },
30
+ {
31
+ "text": "Hooks",
32
+ "link": "/lifecycle_events"
33
+ },
34
+ {
35
+ "text": "Props",
36
+ "link": "/props"
37
+ },
38
+ {
39
+ "text": "User Input",
40
+ "link": "/user_input"
41
+ },
42
+ {
43
+ "text": "Computed Props",
44
+ "link": "/computed_properties"
45
+ },
46
+ {
47
+ "text": "Watchers",
48
+ "link": "/watchers"
49
+ },
50
+ {
51
+ "text": "Styling",
52
+ "link": "/element_attributes"
53
+ },
54
+ {
55
+ "text": "Images",
56
+ "link": "/displaying_images"
57
+ },
58
+ {
59
+ "text": "Text-to-Speech",
60
+ "link": "/text-to-speech-announcer"
61
+ }
62
+ ]
63
+ }
64
+ ]
@@ -8,7 +8,7 @@ The _template_ key in the Componentn configuration object holds a string with an
8
8
 
9
9
  You can use different tags in your templates. And similar to HTML you can use arguments and nested tags. Self-closing tags and HTML-style comments are also supported.
10
10
 
11
- The default tag within a template is the `<Element>` tag, which corresponds to a node in the Lightning 3 renderer. For each element, you can define a set of predefined render properties, such as `x`, `y`, `w`, `color`, and more. Detailed information regarding the attributes supported by the <Element> tag can be found [here](./element_attributes.md).
11
+ The default tag within a template is the `<Element>` tag, which corresponds to a node in the Lightning 3 renderer. For each element, you can define a set of predefined render properties, such as `x`, `y`, `w`, `color`, and more. Detailed information regarding the attributes supported by the `<Element>` tag can be found [here](./element_attributes.md).
12
12
 
13
13
  Consider the following template example:
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.cjs",
6
6
  "exports": {
@@ -44,5 +44,9 @@
44
44
  "dependencies": {
45
45
  "@lightningjs/renderer": "^0.7.0",
46
46
  "@lightningjs/vite-plugin-import-chunk-url": "^0.3.0"
47
+ },
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://github.com/lightning-js/blits.git"
47
51
  }
48
52
  }
@@ -215,10 +215,6 @@ const generateForLoopCode = function (templateObject, parent) {
215
215
  ctx.renderCode.push(`
216
216
  const collection = ${cast(result[2], ':for')}
217
217
  const keys = []
218
- // if array is empty push an empty object to properly set up reactivity
219
- if(collection.length === 0) {
220
- collection.push({})
221
- }
222
218
  for(let __index = 0; __index < collection.length; __index++) {
223
219
  parent = ${parent}
224
220
  if(!component.key) keys.length = 0