@lightningjs/blits 1.30.1 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +4 -3
  3. package/src/router/router.js +2 -0
  4. package/vite/preCompiler.js +6 -1
  5. package/.editorconfig +0 -7
  6. package/.eslintignore +0 -1
  7. package/.eslintrc.cjs +0 -65
  8. package/.github/workflows/comment-lint-results.yml +0 -125
  9. package/.github/workflows/comment-test-results.yml +0 -109
  10. package/.github/workflows/deploy-docs.yml +0 -27
  11. package/.github/workflows/run-blits-tests.yml +0 -142
  12. package/.github/workflows/run-lint.yml +0 -128
  13. package/.husky/pre-commit +0 -1
  14. package/.husky/pre-push +0 -1
  15. package/.vscode/extensions.json +0 -7
  16. package/.vscode/settings.json +0 -9
  17. package/banner.png +0 -0
  18. package/docs/.nojekyll +0 -0
  19. package/docs/README.md +0 -19
  20. package/docs/_sidebar.md +0 -37
  21. package/docs/built-in/directives.md +0 -50
  22. package/docs/built-in/for-loop.md +0 -204
  23. package/docs/built-in/layout.md +0 -168
  24. package/docs/components/component_state.md +0 -90
  25. package/docs/components/computed_properties.md +0 -45
  26. package/docs/components/lifecycle_events.md +0 -42
  27. package/docs/components/methods.md +0 -45
  28. package/docs/components/props.md +0 -56
  29. package/docs/components/user_input.md +0 -186
  30. package/docs/components/utility_methods.md +0 -320
  31. package/docs/components/watchers.md +0 -34
  32. package/docs/essentials/application_root.md +0 -19
  33. package/docs/essentials/components.md +0 -68
  34. package/docs/essentials/displaying_images.md +0 -67
  35. package/docs/essentials/displaying_text.md +0 -135
  36. package/docs/essentials/element_attributes.md +0 -195
  37. package/docs/essentials/settings.md +0 -117
  38. package/docs/essentials/template_syntax.md +0 -83
  39. package/docs/getting_started/file_structure.md +0 -58
  40. package/docs/getting_started/getting_started.md +0 -45
  41. package/docs/getting_started/intro.md +0 -20
  42. package/docs/index.html +0 -47
  43. package/docs/performance/lazy-loading.md +0 -161
  44. package/docs/plugins/global_app_state.md +0 -98
  45. package/docs/plugins/language.md +0 -172
  46. package/docs/plugins/text-to-speech-announcer.md +0 -120
  47. package/docs/plugins/theme.md +0 -176
  48. package/docs/router/basics.md +0 -175
  49. package/docs/router/hooks.md +0 -70
  50. package/docs/router/transitions.md +0 -146
  51. package/docs/sidebar.json +0 -171
  52. package/docs/transitions_animations/transitions.md +0 -150
  53. package/jsconfig.json +0 -12
  54. package/src/component/setup/props.test.js +0 -238
  55. package/src/component.test.js +0 -388
  56. package/src/components/Circle.orig.js +0 -31
  57. package/src/components/FPScounter.orig.js +0 -121
  58. package/src/components/RouterView.orig.js +0 -54
  59. package/src/components/Sprite.orig.js +0 -58
  60. package/src/components/index.orig.js +0 -28
  61. package/src/engines/L3/element.test.js +0 -579
  62. package/src/helpers/deepEqualArray.test.js +0 -127
  63. package/src/lib/codegenerator/generator.test.js +0 -3801
  64. package/src/lib/colors/colors.test.js +0 -290
  65. package/src/lib/componentId.test.js +0 -84
  66. package/src/lib/eventListeners.test.js +0 -236
  67. package/src/lib/reactivity/effect.test.js +0 -35
  68. package/src/lib/reactivity/reactive.test.js +0 -27
  69. package/src/lib/templateparser/parser.test.js +0 -1411
  70. package/src/router/router.test.js +0 -473
@@ -1,127 +0,0 @@
1
- /*
2
- * Copyright 2024 Comcast Cable Communications Management, LLC
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- *
15
- * SPDX-License-Identifier: Apache-2.0
16
- */
17
-
18
- import test from 'tape'
19
- import deepEqual from './deepEqualArray.js'
20
-
21
- test('Type', (assert) => {
22
- const expected = 'function'
23
- const actual = typeof deepEqual
24
-
25
- assert.equal(actual, expected, 'deepEqual should be a function')
26
- assert.end()
27
- })
28
-
29
- test('The same arrays', (assert) => {
30
- const val1 = ['hello', 'world']
31
-
32
- assert.true(
33
- deepEqual(val1, val1),
34
- 'deepEqual should return true if the values are the same reference'
35
- )
36
- assert.end()
37
- })
38
-
39
- test('Equal simple arrays', (assert) => {
40
- const val1 = ['hello', 'world']
41
- const val2 = ['hello', 'world']
42
-
43
- assert.true(deepEqual(val1, val2), 'deepEqual should return true if simple arrays are equal')
44
- assert.end()
45
- })
46
-
47
- test('Not equal simple arrays', (assert) => {
48
- const val1 = ['hello', 'world']
49
- const val2 = ['world', 'hello']
50
-
51
- assert.false(
52
- deepEqual(val1, val2),
53
- 'deepEqual should return false if simple arrays are not equal'
54
- )
55
- assert.end()
56
- })
57
-
58
- test('Not Equal simple arrays (different length)', (assert) => {
59
- const val1 = ['hello', 'world']
60
- const val2 = ['hello', 'world', '!']
61
-
62
- assert.false(deepEqual(val1, val2), 'deepEqual should return false if simple arrays are equal')
63
- assert.end()
64
- })
65
-
66
- test('Equal nested arrays', (assert) => {
67
- const val1 = ['hello', ['world', '!']]
68
- const val2 = ['hello', ['world', '!']]
69
-
70
- assert.true(deepEqual(val1, val2), 'deepEqual should return true if nested arrays are equal')
71
- assert.end()
72
- })
73
-
74
- test('Not equal nested arrays', (assert) => {
75
- const val1 = ['hello', ['world', '!']]
76
- const val2 = ['hello', ['world', '!', '?']]
77
-
78
- assert.false(
79
- deepEqual(val1, val2),
80
- 'deepEqual should return false if nested arrays are not equal'
81
- )
82
- assert.end()
83
- })
84
-
85
- test('Equal arrays with objects', (assert) => {
86
- const val1 = [{ foo: 'bar', bar: 'foo' }, { hello: 'world' }]
87
- const val2 = [{ foo: 'bar', bar: 'foo' }, { hello: 'world' }]
88
-
89
- assert.true(
90
- deepEqual(val1, val2),
91
- 'deepEqual should return true if arrays with objects are equal'
92
- )
93
- assert.end()
94
- })
95
-
96
- test('Not equal arrays with objects (keys', (assert) => {
97
- const val1 = [{ foo: 'bar', bar: 'foo' }, { test: 'bla' }]
98
- const val2 = [{ foo2: 'bar', bar2: 'foo' }, { test: 'bla' }]
99
-
100
- assert.false(
101
- deepEqual(val1, val2),
102
- 'deepEqual should return false if arrays with objects are not equal'
103
- )
104
- assert.end()
105
- })
106
-
107
- test('Equal arrays with mixed values', (assert) => {
108
- const val1 = ['foo', { foo: 'bar', bar: 'foo' }, ['hello', 'world', ['this', 'is', { level: 2 }]]]
109
- const val2 = ['foo', { foo: 'bar', bar: 'foo' }, ['hello', 'world', ['this', 'is', { level: 2 }]]]
110
-
111
- assert.true(
112
- deepEqual(val1, val2),
113
- 'deepEqual should return true if arrays with mixed values are equal'
114
- )
115
- assert.end()
116
- })
117
-
118
- test('Not Equal arrays with mixed values', (assert) => {
119
- const val1 = ['foo', { foo: 'bar', bar: 'foo' }, ['hello', 'world', ['this', 'is', { level: 2 }]]]
120
- const val2 = ['foo', { foo: 'bar', bar: 'foo' }, ['hello', 'world', ['this', 'is', { level: 3 }]]]
121
-
122
- assert.false(
123
- deepEqual(val1, val2),
124
- 'deepEqual should return true if arrays with mixed values are not equal'
125
- )
126
- assert.end()
127
- })