@vnejs/plugins.text.smooth 0.2.1 → 0.2.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/dist/index.js CHANGED
@@ -6,10 +6,10 @@ import { TextSmoothCycle } from "./modules/cycle.js";
6
6
  import { TextSmoothEmitEnd } from "./modules/emit.end.js";
7
7
  import { TextSmoothInit } from "./modules/init.js";
8
8
  import { TextSmoothProcess } from "./modules/process.js";
9
- import { TextSmoothState } from "./modules/state.js";
9
+ import { TextSmooth } from "./modules/smooth.js";
10
10
  regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS, settings: SETTINGS_KEYS, params: PARAMS }, [
11
11
  TextSmoothInit,
12
- TextSmoothState,
12
+ TextSmooth,
13
13
  TextSmoothProcess,
14
14
  TextSmoothCycle,
15
15
  TextSmoothEmitEnd,
@@ -1,7 +1,7 @@
1
1
  import { ModuleCore } from "@vnejs/module.core";
2
2
  import type { TextSmoothPayload } from "@vnejs/contracts.text.smooth";
3
3
  import type { TextSmoothPluginConstants, TextSmoothPluginEvents, TextSmoothPluginParams, TextSmoothPluginSettings } from "../types.js";
4
- import type { TextSmoothCycleState } from "./state.js";
4
+ import type { TextSmoothCycleState } from "./smooth.js";
5
5
  export declare class TextSmoothCycle extends ModuleCore<TextSmoothPluginEvents, TextSmoothPluginConstants, TextSmoothPluginSettings, TextSmoothPluginParams, TextSmoothCycleState> {
6
6
  name: string;
7
7
  textUpdateRaf: number | null;
@@ -1,7 +1,7 @@
1
1
  import { ModuleCore } from "@vnejs/module.core";
2
2
  import type { ModuleGlobalStateTextSmooth } from "@vnejs/contracts.text.smooth";
3
3
  import type { TextSmoothPluginConstants, TextSmoothPluginEvents, TextSmoothPluginParams, TextSmoothPluginSettings } from "../types.js";
4
- export declare class TextSmoothState extends ModuleCore<TextSmoothPluginEvents, TextSmoothPluginConstants, TextSmoothPluginSettings, TextSmoothPluginParams, ModuleGlobalStateTextSmooth> {
4
+ export declare class TextSmooth extends ModuleCore<TextSmoothPluginEvents, TextSmoothPluginConstants, TextSmoothPluginSettings, TextSmoothPluginParams, ModuleGlobalStateTextSmooth> {
5
5
  name: string;
6
6
  subscribe: () => void;
7
7
  onStateClear: () => void;
@@ -1,5 +1,5 @@
1
1
  import { ModuleCore } from "@vnejs/module.core";
2
- export class TextSmoothState extends ModuleCore {
2
+ export class TextSmooth extends ModuleCore {
3
3
  name = "text.smooth";
4
4
  subscribe = () => {
5
5
  this.on(this.EVENTS.STATE.CLEAR, this.onStateClear);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.text.smooth",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -8,11 +8,11 @@ import { TextSmoothCycle } from "./modules/cycle.js";
8
8
  import { TextSmoothEmitEnd } from "./modules/emit.end.js";
9
9
  import { TextSmoothInit } from "./modules/init.js";
10
10
  import { TextSmoothProcess } from "./modules/process.js";
11
- import { TextSmoothState } from "./modules/state.js";
11
+ import { TextSmooth } from "./modules/smooth.js";
12
12
 
13
13
  regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS, settings: SETTINGS_KEYS, params: PARAMS }, [
14
14
  TextSmoothInit,
15
- TextSmoothState,
15
+ TextSmooth,
16
16
  TextSmoothProcess,
17
17
  TextSmoothCycle,
18
18
  TextSmoothEmitEnd,
@@ -2,7 +2,7 @@ import { ModuleCore } from "@vnejs/module.core";
2
2
  import type { TextSmoothPayload } from "@vnejs/contracts.text.smooth";
3
3
 
4
4
  import type { TextSmoothPluginConstants, TextSmoothPluginEvents, TextSmoothPluginParams, TextSmoothPluginSettings } from "../types.js";
5
- import type { TextSmoothCycleState } from "./state.js";
5
+ import type { TextSmoothCycleState } from "./smooth.js";
6
6
 
7
7
  export class TextSmoothCycle extends ModuleCore<
8
8
  TextSmoothPluginEvents,
@@ -3,7 +3,7 @@ import type { ModuleGlobalStateTextSmooth } from "@vnejs/contracts.text.smooth";
3
3
 
4
4
  import type { TextSmoothPluginConstants, TextSmoothPluginEvents, TextSmoothPluginParams, TextSmoothPluginSettings } from "../types.js";
5
5
 
6
- export class TextSmoothState extends ModuleCore<
6
+ export class TextSmooth extends ModuleCore<
7
7
  TextSmoothPluginEvents,
8
8
  TextSmoothPluginConstants,
9
9
  TextSmoothPluginSettings,
@@ -1,7 +1,7 @@
1
1
  import { beforeEach, describe, expect, it } from "vitest";
2
2
 
3
3
  import { TextSmoothInit } from "../modules/init.js";
4
- import { TextSmoothState } from "../modules/state.js";
4
+ import { TextSmooth } from "../modules/smooth.js";
5
5
  import { createTextSmoothTestModule, registerTextSmoothPluginVne } from "./setup.js";
6
6
 
7
7
  describe("TextSmoothInit", () => {
@@ -20,18 +20,18 @@ describe("TextSmoothInit", () => {
20
20
  });
21
21
  });
22
22
 
23
- describe("TextSmoothState", () => {
23
+ describe("TextSmooth", () => {
24
24
  beforeEach(() => {
25
25
  registerTextSmoothPluginVne();
26
26
  });
27
27
 
28
28
  it("STATE.CLEAR resets smooth state", async () => {
29
- const { module, observer } = createTextSmoothTestModule(TextSmoothState);
29
+ const { module, observer } = createTextSmoothTestModule(TextSmooth);
30
30
 
31
- (module as TextSmoothState).setState({ tokensVisible: 5, tokensLength: 10, uid: "abc" });
31
+ (module as TextSmooth).setState({ tokensVisible: 5, tokensLength: 10, uid: "abc" });
32
32
 
33
33
  await observer.emit("vne:state:clear");
34
34
 
35
- expect((module as TextSmoothState).state).toEqual({ tokensVisible: 0, tokensLength: 0, uid: "" });
35
+ expect((module as TextSmooth).state).toEqual({ tokensVisible: 0, tokensLength: 0, uid: "" });
36
36
  });
37
37
  });