CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-alilc--lowcode-types

Comprehensive TypeScript type definitions for the Alibaba LowCode Engine ecosystem, providing type safety for building low-code development tools and applications.

Pending
Overview
Eval results
Files

activity-events.mddocs/

Activity & Events

Activity tracking and event system for monitoring changes and coordinating between components in the editor.

Capabilities

Activity Types

Enumeration of activity types for tracking editor operations.

/**
 * Activity type enumeration for tracking editor changes
 */
enum ActivityType {
  /** Node/element addition */
  ADDED = 'added',
  /** Node/element deletion */
  DELETED = 'deleted',
  /** Node/element modification */
  MODIFIED = 'modified',
  /** Composite operations */
  COMPOSITE = 'composite'
}

/**
 * Activity data structure (deprecated)
 */
type ActivityData = {
  /** Activity type */
  type: ActivityType;
  /** Activity payload */
  payload: IActivityPayload;
};

Event Configuration

Event system configuration and types.

/**
 * Event configuration mapping
 */
interface EventConfig {
  /** Node property change events */
  [Node.Prop.Change]: (options: Node.Prop.ChangeOptions) => any;
  [Node.Prop.InnerChange]: (options: Node.Prop.ChangeOptions) => any;
  /** Node rerender events */
  [Node.Rerender]: (options: Node.RerenderOptions) => void;
  /** Generic event mapping */
  [eventName: string]: any;
}

Usage Examples:

import { ActivityType, EventConfig } from "@alilc/lowcode-types";

// Track activity
const activity = {
  type: ActivityType.ADDED,
  payload: {
    schema: nodeSchema,
    location: {
      parent: { nodeId: "container-1", index: 2 }
    }
  }
};

// Event handling
const eventHandlers: EventConfig = {
  'node.prop.change': (options) => {
    console.log('Property changed:', options);
  },
  'node.rerender': (options) => {
    console.log('Node rerendered:', options);
  }
};

Install with Tessl CLI

npx tessl i tessl/npm-alilc--lowcode-types

docs

activity-events.md

assets.md

code-generation.md

component-metadata.md

drag-drop.md

editor-config.md

index.md

models.md

plugins.md

schemas.md

shell-api.md

shell-enums.md

value-types.md

tile.json