kireji 0.11.0 → 0.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kireji",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "A web framework for stateful, entropy-perfect, multi-origin web applications. Currently in alpha. Expect breaking changes for version 0. Use with caution!",
5
5
  "files": [
6
6
  "src/",
package/src/build.js CHANGED
@@ -1064,7 +1064,7 @@ function ƒ(_, compressedSubjectOrigins) {
1064
1064
  includeColor: "full",
1065
1065
  includeEra: "full",
1066
1066
  includeMenuApps: "full",
1067
- includeUpdates: "full",
1067
+ // includeUpdates: "full",
1068
1068
  includeKirejiApp: "full",
1069
1069
  includeDesktop: "full"
1070
1070
  })
@@ -4,7 +4,7 @@ const data = { collision: [[], []] }
4
4
 
5
5
  // TODO: add a y coordinate use a default 0 for 2D meshes.
6
6
  for (let index = 0; index < points.length; index += 2)
7
- data.collision[0].push([points[index], points[index + 1]])
7
+ data.collision[0].push([Math.round(points[index]), Math.round(points[index + 1])])
8
8
 
9
9
  for (let index = 0; index < tris.length; index += 3)
10
10
  data.collision[1].push([tris[index], tris[index + 1], tris[index + 2]])
@@ -0,0 +1,21 @@
1
+ const scriptCharCount = new TextEncoder().encode(_["build.js"]).length
2
+ const sizeInMB = scriptCharCount / 10 ** 6
3
+ const sizeInKB = scriptCharCount / 10 ** 3
4
+ const maxSizeInMB = 5
5
+ const appNames = Object.keys(_.applications)
6
+ const longestHost = appNames.reduce((a, b) => (a.length >= b.length ? a : b))
7
+ const worstCaseURL = `https://${longestHost}/${_.version}/${encodeSegment(_.cardinality - 1n)}/`
8
+ const maxURLLength = 2000
9
+ const stateSizeInBits = toBits(_.cardinality - 1n, false)
10
+
11
+ return /* html */`
12
+ <h1>Demo Ecosystem</h1>
13
+ ${_.parts.core.update["part.html"]}
14
+ <ul>
15
+ <li>Apps: ${appNames.length}</li>
16
+ <li>JS Size: ${sizeInMB} MB (${sizeInKB} KB)</li>
17
+ <li>JS Usage: ${sizeInMB / maxSizeInMB * 100}%</li>
18
+ <li>State Size: ${stateSizeInBits} bits (${stateSizeInBits / 8000} KB)</li>
19
+ <li>Worst URL: ${worstCaseURL.length} characters</li>
20
+ <li>URL Usage: ${worstCaseURL.length / maxURLLength * 100}%</li>
21
+ </ul>`
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "application"
3
+ }
@@ -0,0 +1 @@
1
+ About Ecosystem
@@ -1,5 +1,5 @@
1
1
  const menuApplicationsCount = Object.keys(_.menuApplications).length
2
- const controlLinesCount = 4
2
+ const controlLinesCount = 2
3
3
  const separatorCount = 2
4
4
  return part["static.css"] + `
5
5
  task-menu::after {
@@ -2,8 +2,8 @@ const
2
2
  controls = [],
3
3
  sections = []
4
4
 
5
- if (_.includeUpdates === "full" || (!production && _.includeUpdates === "local-only"))
6
- controls.push(update["part.html"])
5
+ // if (_.includeUpdates === "full" || (!production && _.includeUpdates === "local-only"))
6
+ // controls.push(update["part.html"])
7
7
 
8
8
  if (_.includeColor === "full" || (!production && _.includeColor.startsWith("debug-")))
9
9
  controls.push(color["part.html"])
Binary file
Binary file