vasille-web 6.0.0-rc.2 → 7.0.0-rc.2

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/README.md CHANGED
@@ -21,8 +21,9 @@
21
21
  - [How POWERFUL is SteelFrameKit](#how-powerful-is-steelframekit)
22
22
  - [Road map](#road-map)
23
23
  - [Change log](#change-log)
24
- - [5.1](#51)
25
- - [5.0](#50)
24
+ - [7.0](#70)
25
+ - [6.0 RC (never released)](#60-rc-never-released)
26
+ - [5.0 - 5.1](#50---51)
26
27
  - [4.0 - 4.3](#40---43)
27
28
  - [3.0 - 3.2](#30---32)
28
29
  - [2.0 - 2.3](#20---23)
@@ -129,18 +130,24 @@ We respect semantic versioning:
129
130
  - A minor version is increased when we add functionality.
130
131
  - Patch version is increased when we fix bugs.
131
132
 
132
- ### 5.1
133
+ ### 7.0
133
134
 
134
- Add support for web components compile target `web build components`.
135
- _Web components as custom tags are supported in any version._
135
+ - WIP
136
136
 
137
- ### 5.0
137
+ ### 6.0 RC (never released)
138
+
139
+ - Add `QueueRenderer`, `ArrayView`, `ArrayModelView`, `SetModelView`, `MapModelView`, `Iterate` and `ForEach` components.
140
+ - `const a = []` is not implicit array model, use explicit `arrayModel`. **[API change]**
141
+
142
+ ### 5.0 - 5.1
138
143
 
139
144
  - Add support for context and dependencies injection.
140
145
  - New developement direction: `fault tolerant`.
141
146
  - Renamed to `steel-frame`. **[API change]**
142
147
  - Removed `forward` and `backward` functions. **[API change]**
143
148
  - Removed `Debug` component. **[API change]**
149
+ - Add support for web components compile target `web build components`.
150
+ _Web components as custom tags are supported in any version._
144
151
 
145
152
  ### 4.0 - 4.3
146
153
 
package/lib/dev.js CHANGED
@@ -1,7 +1,6 @@
1
- import { Fragment } from "vasille";
2
1
  import { devMount as coreMount, devDynamicalModule } from "vasille-jsx/dev";
3
2
  import { devRouteApp as coreRouteApp } from "vasille-router/dev";
4
- import { DevPortal, DevRunner, errorToString, toDevValue, } from "vasille/dev";
3
+ import { DevFragment, DevPortal, DevRunner, errorToString, inspector, toDevValue, } from "vasille/dev";
5
4
  import { modal, prompt } from "./index.js";
6
5
  function createPortal(node, declaration, usage, name) {
7
6
  const portal = new DevPortal({ node: document.body }, node.runner, declaration, usage, name);
@@ -13,7 +12,6 @@ export function devModal(modalFn, declaration, name) {
13
12
  const run = function (parent, input, usage) {
14
13
  modal(modalFn, node => {
15
14
  const portal = createPortal(node, declaration, usage, name);
16
- const inspector = portal.runner.inspector;
17
15
  const event = {
18
16
  position: usage,
19
17
  target: portal.id,
@@ -24,7 +22,7 @@ export function devModal(modalFn, declaration, name) {
24
22
  ...event,
25
23
  });
26
24
  portal.runOnDestroy(() => {
27
- portal.runner.inspector.eventTrigger({
25
+ inspector.eventTrigger({
28
26
  eventName: "close",
29
27
  time: Date.now(),
30
28
  ...event,
@@ -37,7 +35,7 @@ export function devModal(modalFn, declaration, name) {
37
35
  if (!node) {
38
36
  throw new Error("Vasille: Modal context is missing");
39
37
  }
40
- const frag = new Fragment(node.runner);
38
+ const frag = new DevFragment(node.runner, null, null, name, {});
41
39
  if (!input.slot && slot) {
42
40
  input.slot = slot;
43
41
  }
@@ -51,14 +49,12 @@ export function devPrompt(modal, declaration, name) {
51
49
  const fragments = new Map();
52
50
  const run = function (node, input, timeout, usage) {
53
51
  let target = null;
54
- let inspector = null;
55
52
  const event = {
56
53
  position: usage,
57
54
  };
58
55
  return prompt(modal, node => {
59
56
  const portal = createPortal(node, declaration, usage, name);
60
57
  target = portal.id;
61
- inspector = portal.runner.inspector;
62
58
  inspector.eventTrigger({
63
59
  eventName: "open",
64
60
  time: Date.now(),
@@ -96,7 +92,7 @@ export function devPrompt(modal, declaration, name) {
96
92
  });
97
93
  };
98
94
  const renderer = (node, input, timeout, usage) => {
99
- const frag = new Fragment(node.runner);
95
+ const frag = new DevFragment(node.runner, null, null, name, {});
100
96
  node.create(frag);
101
97
  fragments.set(frag, { props: input, node: frag, usage });
102
98
  return run(frag, input, timeout, usage);
@@ -106,7 +102,7 @@ export function devPrompt(modal, declaration, name) {
106
102
  });
107
103
  }
108
104
  export function devMount(element, component, input, inspector) {
109
- return coreMount(element, component, new DevRunner(window.document, inspector), input, inspector);
105
+ return coreMount(element, component, new DevRunner(window.document), input, inspector);
110
106
  }
111
107
  export function devRouterApp(init, element, inspector) {
112
108
  return coreRouteApp(element, window, window.location, init, inspector);
package/lib/index.js CHANGED
@@ -10,7 +10,7 @@ export { Router } from "vasille-router/web-router";
10
10
  export { setMobileMaxWidth, setTabletMaxWidth, setLaptopMaxWidth } from "vasille-css";
11
11
  export { context, impute, receive, share, receiveOptional } from "vasille-context";
12
12
  function createPortal(node) {
13
- const portal = new Portal({ node: document.body }, node.runner);
13
+ const portal = new Portal({ node: document.body }, node.runner, node.sDeep + 1);
14
14
  node.create(portal);
15
15
  return portal;
16
16
  }
@@ -42,7 +42,7 @@ export function prompt(modal, create = createPortal) {
42
42
  }, timeout);
43
43
  function destroy() {
44
44
  timer && clearTimeout(timer);
45
- portal.destroy();
45
+ portal.destroy(portal.sDeep);
46
46
  }
47
47
  try {
48
48
  modal(portal, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vasille-web",
3
- "version": "6.0.0-rc.2",
4
- "description": "The same framework which is designed to build bulletproof frontends.",
3
+ "version": "7.0.0-rc.2",
4
+ "description": "The same devkit which is designed to build fault tolerant frontends.",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
7
7
  "exports": {
@@ -50,11 +50,11 @@
50
50
  "homepage": "https://github.com/vasille-js/vasille-js#readme",
51
51
  "dependencies": {
52
52
  "csstype": "^3.1.3",
53
- "vasille": "6.0.0-rc.4",
53
+ "vasille": "^7.0.0-rc.3",
54
54
  "vasille-context": "^6.0.0-rc",
55
55
  "vasille-css": "^5.0.0",
56
- "vasille-jsx": "^6.0.0-rc.3",
57
- "vasille-router": "^6.0.0-rc"
56
+ "vasille-jsx": "^7.0.0-rc.2",
57
+ "vasille-router": "^7.0.0-rc"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/node": "^24.3.0",
package/types/dev.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { App, Fragment, Runner as IRunner } from "vasille";
2
2
  import { TagOptions } from "vasille/web-runner";
3
- import { DevTagOptions, IDevRunner, Inspector, StaticPosition } from "vasille/dev";
3
+ import { DevTagOptions, Inspector, StaticPosition } from "vasille/dev";
4
4
  import { PromptProps } from "./index.js";
5
5
  import { WebRouterInitialization } from "vasille-router/web-router";
6
6
  import { CompositionProps } from "vasille-jsx";
7
7
  export declare function devModal<T extends CompositionProps>(modalFn: (node: Fragment<Node, Element, TagOptions>, input: T) => void, declaration: StaticPosition, name: string): (input: T, node: Fragment<Node, Element, TagOptions>, slot?: T["slot"], usage?: StaticPosition) => void;
8
- export declare function devPrompt<T extends PromptProps>(modal: (node: Fragment<Node, Element, TagOptions, IDevRunner<Node, Element, TagOptions>>, input: T) => void, declaration: StaticPosition, name: string): (node: Fragment<Node, Element, TagOptions, IDevRunner<Node, Element, TagOptions>>, input: T, timeout: number | undefined, usage: StaticPosition | undefined) => Promise<unknown>;
8
+ export declare function devPrompt<T extends PromptProps>(modal: (node: Fragment<Node, Element, TagOptions, IRunner<Node, Element, TagOptions>>, input: T) => void, declaration: StaticPosition, name: string): (node: Fragment<Node, Element, TagOptions, IRunner<Node, Element, TagOptions>>, input: T, timeout: number | undefined, usage: StaticPosition | undefined) => Promise<unknown>;
9
9
  export declare function devMount<T>(element: Element, component: ($: T) => void, input: T, inspector: Inspector): App<Node, Element, DevTagOptions, IRunner<Node, Element, DevTagOptions>>;
10
10
  export declare function devRouterApp<Routes extends string>(init: WebRouterInitialization<Routes>, element: Element, inspector: Inspector): App<Node, Element, DevTagOptions, IRunner<Node, Element, DevTagOptions>>;