@bedrock-oss/stylish
Version:
A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition
1 lines • 19.2 kB
Source Map (JSON)
{"version":3,"sources":["../src/index.ts","../src/eventRegistry.ts","../src/itemRegistry.ts","../src/blockRegistry.ts","../src/customCommandRegistry.ts","../src/autobind.ts"],"sourcesContent":["import { BlockComponentRegistry, ItemComponentRegistry, StartupEvent, system, world, WorldLoadAfterEvent } from \"@minecraft/server\";\r\nimport { registerAllItemComponents } from \"./itemRegistry\";\r\nimport { registerAllBlockComponents } from \"./blockRegistry\";\r\nimport { triggerStartupEvent, triggerWorldLoadEvent } from \"./eventRegistry\";\r\nimport { registerAllCustomCommands } from \"./customCommandRegistry\";\r\n\r\nexport { BindThis } from \"./autobind\";\r\nexport { ItemComponent } from \"./itemRegistry\";\r\nexport { BlockComponent } from \"./blockRegistry\";\r\nexport { OnStartup, OnBeforeItemUse, OnWorldLoad, RegisterEvents, createEventDecorator } from \"./eventRegistry\";\r\nexport { CustomCmd } from \"./customCommandRegistry\";\r\n\r\n/**\r\n * Initializes the library\r\n */\r\nexport function init() {\r\n system.beforeEvents.startup.subscribe((e: StartupEvent) => {\r\n registerAllComponents(e.itemComponentRegistry, e.blockComponentRegistry);\r\n registerAllCustomCommands(e.customCommandRegistry);\r\n triggerStartupEvent(e);\r\n });\r\n world.afterEvents.worldLoad.subscribe((e: WorldLoadAfterEvent) => {\r\n triggerWorldLoadEvent(e);\r\n });\r\n}\r\n\r\n/**\r\n * Registers V1 `worldInitialize` event and registers all components.\r\n * @deprecated Use {@link init() `init()`} instead. **Please note that Minecraft Script API v1.X is no longer supported and this will initialize for Minecraft Script API V2.X and later!**\r\n */\r\nexport function initV1() {\r\n init();\r\n}\r\n\r\n/**\r\n * Registers V1 `worldInitialize` event and registers all components.\r\n * @deprecated Use {@link init() `init()`} instead.\r\n */\r\nexport function initV2() {\r\n init();\r\n}\r\n\r\n/**\r\n * Registers all components.\r\n * @param itemRegistry Item component registry\r\n * @param blockRegistry Block component registry\r\n */\r\nexport function registerAllComponents(itemRegistry: ItemComponentRegistry, blockRegistry: BlockComponentRegistry) {\r\n registerAllItemComponents(itemRegistry);\r\n registerAllBlockComponents(blockRegistry);\r\n}\r\n","import {\n ItemUseBeforeEvent,\n StartupEvent,\n WorldLoadAfterEvent,\n world,\n} from \"@minecraft/server\";\n\n/**\n * Internal debug logger. Disabled by default. Enable via `setEventDebugLogging(true)`\n * to trace registration and dispatch when debugging.\n */\nlet debugEnabled = false;\nconst LOG_PREFIX = \"[stylish:events]\";\nfunction dbg(message: string, meta?: Record<string, unknown>) {\n if (!debugEnabled) return;\n try {\n if (meta) console.debug(LOG_PREFIX, message, meta);\n else console.debug(LOG_PREFIX, message);\n } catch {\n // ignore logging errors\n }\n}\n/** Enables or disables debug logging for event registration/dispatch. */\nexport function setEventDebugLogging(enabled: boolean) {\n debugEnabled = !!enabled;\n}\n\n// Track instance (non-static) methods and registries per event\nexport type Class<T = any> = abstract new (...args: any[]) => T;\n\n// Strongly-typed mapping between event names and their callback parameter types\nexport interface EventMap {\n startup: StartupEvent;\n worldLoad: WorldLoadAfterEvent;\n beforeItemUse: ItemUseBeforeEvent;\n}\ntype EventName = keyof EventMap;\n// Handlers may be sync or async. Promises are not awaited by the dispatcher.\ntype Handler<E extends EventName> = (e: EventMap[E]) => void | Promise<void>;\n\nconst registries: { [K in EventName]?: Array<Handler<K>> } =\n Object.create(null);\nfunction getRegistry<E extends EventName>(event: E) {\n return (registries[event] ??= []) as Array<Handler<E>>;\n}\nconst instanceEventMethods: WeakMap<\n Class,\n Map<EventName, PropertyKey[]>\n> = new WeakMap();\n\n// Lazy wiring of platform events (only after startup)\nconst subscribed: Partial<Record<EventName, boolean>> = {};\nlet startupTriggered = false;\n\nfunction dispatch<E extends EventName>(event: E) {\n return (e: EventMap[E]) => {\n const reg = getRegistry(event);\n dbg(\"dispatch\", { event, count: reg.length });\n for (const fn of reg) fn(e as any);\n };\n}\n\nfunction wirePlatformEvent<E extends EventName>(event: E) {\n dbg(\"wirePlatformEvent\", { event });\n if (subscribed[event]) {\n dbg(\"alreadyWired\", { event });\n return;\n }\n switch (event) {\n case \"startup\":\n case \"worldLoad\":\n // wired in init()\n break;\n case \"beforeItemUse\":\n dbg(\"subscribe\", { source: \"world.beforeEvents.itemUse\" });\n world.beforeEvents.itemUse.subscribe(dispatch(\"beforeItemUse\"));\n subscribed[event] = true;\n break;\n default:\n // Shouldn't reach here\n break;\n }\n}\n\nfunction maybeWirePlatformEvents(event?: EventName) {\n dbg(\"maybeWirePlatformEvents\", { startupTriggered });\n if (!startupTriggered) {\n return;\n }\n if (event) {\n if (getRegistry(event).length > 0) wirePlatformEvent(event);\n return;\n }\n for (const evt of Object.keys(registries) as EventName[]) {\n if (getRegistry(evt).length > 0) wirePlatformEvent(evt);\n }\n}\n\n/**\n * Creates a decorator function for the given event name.\n * The decorator can be used in two ways:\n * 1. As a method decorator on static or instance methods.\n * 2. As a direct function call to register a standalone function.\n *\n * @param event The name of the event to register for.\n * @returns A decorator function.\n */\n// Note: The method-decorator overload intentionally uses a permissive function\n// type to avoid cross-package type incompatibilities when consumers have a\n// different @minecraft/server instance. The direct function registration keeps\n// strong typing with our local EventMap.\nexport type EventDecorator<E extends EventName> = ((fn: Handler<E>) => void) &\n ((\n target: any,\n propertyKey: string | symbol,\n descriptor: any\n ) => any);\n\nexport function createEventDecorator<E extends EventName>(\n event: E\n): EventDecorator<E> {\n const impl = function EventDecorator(\n target: any,\n propertyKey?: string | symbol,\n descriptor?: any\n ): any {\n // Direct function registration: OnX(fn)\n if (\n typeof target === \"function\" &&\n propertyKey === undefined &&\n descriptor === undefined\n ) {\n dbg(\"register:function\", { event });\n getRegistry(event).push(target as Handler<E>);\n maybeWirePlatformEvents(event as EventName);\n return;\n }\n\n // Method decorator usage\n if (\n propertyKey !== undefined &&\n descriptor &&\n typeof descriptor.value === \"function\"\n ) {\n // Static method: target is the constructor function\n if (typeof target === \"function\") {\n dbg(\"register:static\", { event, propertyKey: String(propertyKey) });\n const bound = (descriptor.value as any).bind(target) as Handler<E>;\n getRegistry(event).push(bound);\n maybeWirePlatformEvents(event as EventName);\n return descriptor;\n }\n\n // Instance method: target is the prototype, store metadata to register later for each instance\n dbg(\"annotate:instance\", { event, propertyKey: String(propertyKey) });\n const ctor = (target as object).constructor as Class;\n let map = instanceEventMethods.get(ctor);\n if (!map) {\n map = new Map<EventName, PropertyKey[]>();\n instanceEventMethods.set(ctor, map);\n }\n const list = map.get(event) ?? [];\n if (!list.includes(propertyKey)) list.push(propertyKey);\n map.set(event, list);\n return descriptor;\n }\n } as any;\n return impl as EventDecorator<E>;\n}\n\nexport const OnStartup = createEventDecorator(\"startup\");\nexport const OnWorldLoad = createEventDecorator(\"worldLoad\");\nexport const OnBeforeItemUse = createEventDecorator(\"beforeItemUse\");\n\n/**\n * Registers all instance-bound handlers for the given object instance.\n * Intended to be called right after constructing an instance (before triggering startup).\n */\nexport function registerInstanceEventHandlers(instance: any) {\n if (!instance) return;\n const ctor = instance.constructor as Class;\n const map = instanceEventMethods.get(ctor);\n if (!map) return;\n for (const [event, keys] of map) {\n const reg = getRegistry(event as EventName);\n for (const key of keys) {\n const fn = (instance as any)[key];\n if (typeof fn === \"function\") {\n reg.push(fn.bind(instance));\n }\n }\n dbg(\"register:instance\", {\n event,\n class: (ctor as any)?.name ?? \"<anonymous>\",\n count: keys.length,\n });\n maybeWirePlatformEvents(event as EventName);\n }\n}\n\n/**\n * Class decorator – wraps the constructor so that any time an instance is created,\n * its instance event methods are automatically registered.\n */\nexport function RegisterEvents<T extends new (...args: any[]) => any>(\n Ctor: T\n): T {\n return class extends Ctor {\n constructor(...args: any[]) {\n super(...args);\n registerInstanceEventHandlers(this);\n }\n } as unknown as T;\n}\n\n/**\n * Invokes OnStartup event handlers.\n */\nexport function triggerStartupEvent(e: StartupEvent) {\n startupTriggered = true;\n // Wire any platform events that have pending handlers\n maybeWirePlatformEvents();\n const reg = getRegistry(\"startup\");\n dbg(\"triggerStartupEvent\", { count: reg.length });\n for (const fn of reg) {\n fn(e);\n }\n}\n\n/**\n * Invokes OnWorldLoad event handlers.\n */\nexport function triggerWorldLoadEvent(e: WorldLoadAfterEvent) {\n const reg = getRegistry(\"worldLoad\");\n dbg(\"triggerWorldLoadEvent\", { count: reg.length });\n for (const fn of reg) {\n fn(e);\n }\n}\n","import type { ItemComponentRegistry } from '@minecraft/server';\nimport { ComponentCtor } from './shared';\nimport { registerInstanceEventHandlers } from './eventRegistry';\n\r\nconst registry: ComponentCtor[] = [];\r\n\r\n/**\r\n * Decorator – attach to each component class to auto‐register it.\r\n */\r\nexport function ItemComponent<T extends ComponentCtor>(ctor: T) {\r\n if (!ctor.componentId) {\r\n throw new Error(`Component ${ctor.name} is missing static componentId`);\r\n }\r\n registry.push(ctor);\r\n}\r\n\r\n/**\r\n * Call this in worldInitialize to register all decorated components.\r\n */\r\nexport function registerAllItemComponents(\n itemComponentRegistry: ItemComponentRegistry\n) {\n for (const Ctor of registry) {\n const instance = new Ctor();\n // Register any instance event handlers on this object\n registerInstanceEventHandlers(instance);\n itemComponentRegistry.registerCustomComponent(\n Ctor.componentId,\n instance\n );\n }\n}\n","import type { BlockComponentRegistry } from '@minecraft/server';\nimport { ComponentCtor } from './shared';\nimport { registerInstanceEventHandlers } from './eventRegistry';\n\r\nconst registry: ComponentCtor[] = [];\r\n\r\n/**\r\n * Decorator – attach to each component class to auto‐register it.\r\n */\r\nexport function BlockComponent<T extends ComponentCtor>(ctor: T) {\r\n if (!ctor.componentId) {\r\n throw new Error(`Component ${ctor.name} is missing static componentId`);\r\n }\r\n registry.push(ctor);\r\n}\r\n\r\n/**\r\n * Call this in worldInitialize to register all decorated components.\r\n */\r\nexport function registerAllBlockComponents(\n blockComponentRegistry: BlockComponentRegistry\n) {\n for (const Ctor of registry) {\n const instance = new Ctor();\n // Register any instance event handlers on this object\n registerInstanceEventHandlers(instance);\n blockComponentRegistry.registerCustomComponent(\n Ctor.componentId,\n instance\n );\n }\n}\n","import type {\r\n CustomCommand,\r\n CustomCommandRegistry,\r\n} from \"@minecraft/server\";\r\nimport { registerInstanceEventHandlers } from \"./eventRegistry\";\r\n\r\n\r\n/**\r\n * Constructor type for Custom Commands. Constructors must not have parameters.\r\n */\r\nexport type CustomCommandCtor = new () => CustomCommand & Record<string, any>;\r\n\r\n\r\nconst registry: CustomCommandCtor[] = [];\r\n\r\n/**\r\n * Decorator – attach to each Custom Command class to auto-register it.\r\n */\r\nexport function CustomCmd<T extends CustomCommandCtor>(ctor: T) {\r\n registry.push(ctor);\r\n}\r\n\r\n/**\r\n * Call this in worldInitialize to register all decorated components.\r\n */\r\nexport function registerAllCustomCommands(\r\n customCommandRegistry: CustomCommandRegistry\r\n) {\r\n for (const Ctor of registry) {\r\n const instance = new Ctor();\r\n registerInstanceEventHandlers(instance);\r\n\r\n let runFn: ((...args: any[]) => any) | undefined;\r\n const maybeStaticRun = (Ctor as any).run;\r\n if (typeof maybeStaticRun === \"function\") {\r\n runFn = maybeStaticRun.bind(Ctor);\r\n } else if (typeof (instance as any).run === \"function\") {\r\n runFn = (instance as any).run.bind(instance);\r\n }\r\n\r\n if (!runFn) {\r\n throw new Error(\r\n `Custom command ${Ctor.name} has no run method. Define a static or instance run(origin, ...args).`\r\n );\r\n }\r\n\r\n customCommandRegistry.registerCommand(instance as any, runFn as any);\r\n }\r\n}\r\n","/**\r\n * Decorator – binds the method to the instance\r\n * Equivalent to calling `this.method = this.method.bind(this);`\r\n */\r\nexport function BindThis(\r\n _target: any,\r\n propertyKey: string,\r\n descriptor: PropertyDescriptor\r\n): PropertyDescriptor {\r\n const original = descriptor.value;\r\n return {\r\n configurable: true,\r\n enumerable: descriptor.enumerable,\r\n get(): any {\r\n // bind once\r\n const bound = original.bind(this);\r\n // overwrite the property on the instance so future accesses hit the bound fn directly\r\n Object.defineProperty(this, propertyKey, {\r\n value: bound,\r\n configurable: true,\r\n writable: true,\r\n enumerable: false,\r\n });\r\n return bound;\r\n },\r\n };\r\n}"],"mappings":";AAAA,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