@xuda.io/runtime-bundle 1.0.1201 → 1.0.1203
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.
|
@@ -15,4 +15,4 @@ var app_obj,progs_obj,_,progs_str,hide_not_in_use_check,is_server,deployments,Ug
|
|
|
15
15
|
• xu-cdn: Loads external CSS/JS resources from CDN
|
|
16
16
|
• xu-ui-plugin: Integrates and configures UI plugins (sliders, charts, etc.)
|
|
17
17
|
• xu-store: Parses JSON5 object and stores key-values as dynamic fields in ${type} dataset
|
|
18
|
-
• xu-viewport: Handles viewport-based logic during rendering`);const UiElementSchema=z.lazy(()=>z.object({id:z.union([z.literal(`root`),UuidSchema]).describe(`Element identifier: "root" for top-level element, UUID for all others`),type:z.literal(`element`).describe(`Element type - only "element" allowed (no "comment" or "text" types)`),tagName:z.string().describe(`HTML tag name for the element (e.g., "div", "span", "input")`),attributes:UiAttributesSchema.optional().describe(`HTML attributes and Xuda directives (e.g., class, xu-bind, xu-on)`),content:z.string().optional().describe(`Text content for the element (replaces deprecated "text" type)`),text:z.string().optional().describe(`Alternative text property for element content`),children:z.array(UiElementSchema).optional().describe(`Array of child elements nested within this element`),workflow:z.array(WorkflowActionSchema).optional().describe(`Workflow actions associated with this UI element`),path:z.array(z.number()).optional().describe("Array representing the element`s position in the UI tree"),code:z.string().optional().describe(`Generated HTML code representation`),editCode:z.boolean().optional().describe(`Flag indicating if element is in code editing mode`),$folded:z.boolean().optional().describe(`UI editor state - whether element tree is collapsed`)}).describe(`UI element following Himalaya.js structure with Xuda extensions`));const DataSourceSchema=z.object({dataSourceType:z.union([z.literal(`table`).describe(`Connect to structured table from global Table Repository`),z.literal(`array`).describe(`Use static or dynamically populated array`),z.literal(`json`).describe(`Load structured data in JSON format`),z.literal(`csv`).describe(`Load data from CSV source`),z.literal(`none`).describe(`No data source attached - self-contained logic unit`),z.literal(``).describe(`Empty string indicating no datasource configured`)]).optional().describe(`Type of data source defining how data is retrieved and processed`),dataSourceFilterModelType:z.union([z.literal(`index`).describe(`Use predefined index with from/to values for fast range filtering`),z.literal(`query`).describe(`Use jQuery Mongo syntax for advanced conditional filters and logical rules`)]).optional().describe(`Filtering approach for table sources`),dataSourceSort:z.union([z.literal(`asc`),z.literal(`desc`)]).optional().describe(`Global sort direction for retrieved data`),dataSourceTableId:z.string().optional().describe(`Reference to table ID in Table Repository when dataSourceType is "table"`),dataSourceIndexId:z.string().optional().describe(`Default index ID used for efficient data lookup and filtering`),dataSourceIndexesObj:z.record(z.record(z.object({from:z.string().describe(`Starting value for index range (can be dynamic expression like @uid_in)`),locate_from:z.string().optional().describe(`Additional locate parameter for range start`),locate_to:z.string().optional().describe(`Additional locate parameter for range end`),to:z.string().describe(`Ending value for index range (can be dynamic expression)`),key:z.string().describe(`Field name being indexed and filtered`)}).describe(`Index field configuration with range values`))).optional().describe(`Index configurations mapped by index ID, defining field ranges and conditions for efficient filtering`),dataSourceReduce:z.boolean().optional().describe(`Whether to reduce results to single aggregated value (count, sum, avg) - requires DBS plugin`),filterModelMongo:z.object({}).optional().describe(`Static MongoDB-style filter query object built using jQuery QueryBuilder`),filterModelMongoFx:z.string().optional().describe(`Dynamic reference to input field containing filter query object (overrides filterModelMongo)`),sortModel:z.array(z.object({field_id:z.string().describe(`Field identifier to sort by`),sort_dir:z.union([z.literal(`asc`),z.literal(`desc`)]).describe(`Sort direction for this specific field`)})).optional().describe(`Array of field-level sorting rules for multi-column sorting`),dataSourceRealtime:z.boolean().optional().describe(`Enable real-time updates when source data changes (table sources only, requires @xuda.io/xuds-dbs-plugin-xuda)`),datafieldsOutputField:z.string().optional().describe(`Field name where raw query results will be stored within parent hierarchy`),dataSourceLimit:z.number().optional().describe(`Maximum number of rows or iterations to return for pagination`),dataSourceSkip:z.number().optional().describe(`Number of rows to skip before returning results, useful for pagination offset`),dataSourceUrl:z.string().optional().describe(`External URL endpoint for loading array/CSV/JSON data from REST APIs or static files`),dataSourceInputField:z.string().optional().describe(`Dynamic field reference in UI or app context for data source values (alternative to external URL)`)}).describe(`Comprehensive data source configuration defining how logic units retrieve, filter, and process data from tables, arrays, APIs, or external sources`);let properties_obj={menuType:z.literal(type).describe(`defines the object category`),menuName:z.string().describe(`Internal name displayed in the Studio interface`)};let properties=z.object(properties_obj).describe(`Core ${type} properties defining behavior, access, and UI framework settings`);const progFields=z.array(ProgFieldSchema).describe(`Defines the internal working fields of the ${type}. These include real and virtual fields used for data binding, user interaction, intermediate logic, and expression evaluation.`);const progEvents=z.array(ProgEventSchema).describe(`Defines all functional logic associated with the ${type}. Events support lifecycle hooks (like on_load, screen_ready, client_interval), event-based workflow, custom utility functions, and conditional logic.`);const progUi=z.array(UiElementSchema).describe(`Describes the rendered interface in a structured JSON format, derived from Himalaya.js (HTML-to-JSON). Each node can be bound to logic via attributes such as xu-exp, bind, for, and trigger. This enables conditional rendering, looping constructs, inline script execution, and seamless integration with workflow.`);const progDataSource=DataSourceSchema.describe(`Defines where the ${type} pulls or binds its data from, such as a database table, external service, or static source.`);let main_obj={_id:z.string().regex(/^[a-zA-Z0-9_]+$/).describe(`Unique ${type} identifier with format constraints`),app_id:z.string().describe(`Reference to the parent application this ${type} belongs to`),stat:z.union([z.literal(1),z.literal(2),z.literal(3),z.literal(4)]).describe(`Document status: 1=draft, 2=review, 3=active, 4=archived`),docType:z.literal(`studio`).describe(`Always "studio" - indicates this is a Studio-authored ${type}`),docDate:TimestampSchema.describe(`Unix timestamp when the ${type} document was created`),ts:TimestampSchema.describe(`Unix timestamp of the most recent modification`),order_ts:TimestampSchema.describe(`Timestamp used for ordering components in the Studio interface`),description:z.string().describe(`Describe in short the ${type}`),studio_meta:StudioMetaSchema};let XudaComponentSchema=z.object(main_obj);switch(type){case`component`:XudaComponentSchema.describe(`The component object in the Xuda platform defines a modular, self-contained program unit that encapsulates both front-end presentation and back-end logic. It serves as a reusable UI component that supports a full execution lifecycle, making it ideal for constructing low-code applications that are maintainable, scalable, and highly interactive. A component is engineered to allow seamless integration of logic, data, and rendering, enabling developers to build sophisticated interactive views without redundant code. Each component instance supports input/output parameters, can communicate with other components or programs, and can be dynamically rendered as a page, modal, or embedded panel.`);properties_obj.frameworkProperties=z.object({}).optional().describe(`Framework-specific rendering extensions and configuration`);properties_obj.renderType=z.string().describe(`Component layout type (e.g., "form", "grid", "list")`);properties_obj.rwMode=z.union([z.literal(`R`),z.literal(`W`),z.literal(`RW`)]).describe(`Access mode: R=read-only, W=write-only, RW=read-write`);properties_obj.uiFramework=z.string().describe(`Selected UI framework plugin (e.g., @xuda.io/xuda-framework-plugin-tailwind)`);properties_obj.menuTitle=z.string().optional().describe(`Display title for Studio UI or routing usage`);properties_obj.progParams=z.array(ProgParamSchema).optional().describe(`Array of input/output parameter definitions for ${type} interface`);main_obj=
|
|
18
|
+
• xu-viewport: Handles viewport-based logic during rendering`);const UiElementSchema=z.lazy(()=>z.object({id:z.union([z.literal(`root`),UuidSchema]).describe(`Element identifier: "root" for top-level element, UUID for all others`),type:z.literal(`element`).describe(`Element type - only "element" allowed (no "comment" or "text" types)`),tagName:z.string().describe(`HTML tag name for the element (e.g., "div", "span", "input")`),attributes:UiAttributesSchema.optional().describe(`HTML attributes and Xuda directives (e.g., class, xu-bind, xu-on)`),content:z.string().optional().describe(`Text content for the element (replaces deprecated "text" type)`),text:z.string().optional().describe(`Alternative text property for element content`),children:z.array(UiElementSchema).optional().describe(`Array of child elements nested within this element`),workflow:z.array(WorkflowActionSchema).optional().describe(`Workflow actions associated with this UI element`),path:z.array(z.number()).optional().describe("Array representing the element`s position in the UI tree"),code:z.string().optional().describe(`Generated HTML code representation`),editCode:z.boolean().optional().describe(`Flag indicating if element is in code editing mode`),$folded:z.boolean().optional().describe(`UI editor state - whether element tree is collapsed`)}).describe(`UI element following Himalaya.js structure with Xuda extensions`));const DataSourceSchema=z.object({dataSourceType:z.union([z.literal(`table`).describe(`Connect to structured table from global Table Repository`),z.literal(`array`).describe(`Use static or dynamically populated array`),z.literal(`json`).describe(`Load structured data in JSON format`),z.literal(`csv`).describe(`Load data from CSV source`),z.literal(`none`).describe(`No data source attached - self-contained logic unit`),z.literal(``).describe(`Empty string indicating no datasource configured`)]).optional().describe(`Type of data source defining how data is retrieved and processed`),dataSourceFilterModelType:z.union([z.literal(`index`).describe(`Use predefined index with from/to values for fast range filtering`),z.literal(`query`).describe(`Use jQuery Mongo syntax for advanced conditional filters and logical rules`)]).optional().describe(`Filtering approach for table sources`),dataSourceSort:z.union([z.literal(`asc`),z.literal(`desc`)]).optional().describe(`Global sort direction for retrieved data`),dataSourceTableId:z.string().optional().describe(`Reference to table ID in Table Repository when dataSourceType is "table"`),dataSourceIndexId:z.string().optional().describe(`Default index ID used for efficient data lookup and filtering`),dataSourceIndexesObj:z.record(z.record(z.object({from:z.string().describe(`Starting value for index range (can be dynamic expression like @uid_in)`),locate_from:z.string().optional().describe(`Additional locate parameter for range start`),locate_to:z.string().optional().describe(`Additional locate parameter for range end`),to:z.string().describe(`Ending value for index range (can be dynamic expression)`),key:z.string().describe(`Field name being indexed and filtered`)}).describe(`Index field configuration with range values`))).optional().describe(`Index configurations mapped by index ID, defining field ranges and conditions for efficient filtering`),dataSourceReduce:z.boolean().optional().describe(`Whether to reduce results to single aggregated value (count, sum, avg) - requires DBS plugin`),filterModelMongo:z.object({}).optional().describe(`Static MongoDB-style filter query object built using jQuery QueryBuilder`),filterModelMongoFx:z.string().optional().describe(`Dynamic reference to input field containing filter query object (overrides filterModelMongo)`),sortModel:z.array(z.object({field_id:z.string().describe(`Field identifier to sort by`),sort_dir:z.union([z.literal(`asc`),z.literal(`desc`)]).describe(`Sort direction for this specific field`)})).optional().describe(`Array of field-level sorting rules for multi-column sorting`),dataSourceRealtime:z.boolean().optional().describe(`Enable real-time updates when source data changes (table sources only, requires @xuda.io/xuds-dbs-plugin-xuda)`),datafieldsOutputField:z.string().optional().describe(`Field name where raw query results will be stored within parent hierarchy`),dataSourceLimit:z.number().optional().describe(`Maximum number of rows or iterations to return for pagination`),dataSourceSkip:z.number().optional().describe(`Number of rows to skip before returning results, useful for pagination offset`),dataSourceUrl:z.string().optional().describe(`External URL endpoint for loading array/CSV/JSON data from REST APIs or static files`),dataSourceInputField:z.string().optional().describe(`Dynamic field reference in UI or app context for data source values (alternative to external URL)`)}).describe(`Comprehensive data source configuration defining how logic units retrieve, filter, and process data from tables, arrays, APIs, or external sources`);let properties_obj={menuType:z.literal(type).describe(`defines the object category`),menuName:z.string().describe(`Internal name displayed in the Studio interface`)};let properties=z.object(properties_obj).describe(`Core ${type} properties defining behavior, access, and UI framework settings`);const progFields=z.array(ProgFieldSchema).describe(`Defines the internal working fields of the ${type}. These include real and virtual fields used for data binding, user interaction, intermediate logic, and expression evaluation.`);const progEvents=z.array(ProgEventSchema).describe(`Defines all functional logic associated with the ${type}. Events support lifecycle hooks (like on_load, screen_ready, client_interval), event-based workflow, custom utility functions, and conditional logic.`);const progUi=z.array(UiElementSchema).describe(`Describes the rendered interface in a structured JSON format, derived from Himalaya.js (HTML-to-JSON). Each node can be bound to logic via attributes such as xu-exp, bind, for, and trigger. This enables conditional rendering, looping constructs, inline script execution, and seamless integration with workflow.`);const progDataSource=DataSourceSchema.describe(`Defines where the ${type} pulls or binds its data from, such as a database table, external service, or static source.`);let main_obj={_id:z.string().regex(/^[a-zA-Z0-9_]+$/).describe(`Unique ${type} identifier with format constraints`),app_id:z.string().describe(`Reference to the parent application this ${type} belongs to`),stat:z.union([z.literal(1),z.literal(2),z.literal(3),z.literal(4)]).describe(`Document status: 1=draft, 2=review, 3=active, 4=archived`),docType:z.literal(`studio`).describe(`Always "studio" - indicates this is a Studio-authored ${type}`),docDate:TimestampSchema.describe(`Unix timestamp when the ${type} document was created`),ts:TimestampSchema.describe(`Unix timestamp of the most recent modification`),order_ts:TimestampSchema.describe(`Timestamp used for ordering components in the Studio interface`),description:z.string().describe(`Describe in short the ${type}`),studio_meta:StudioMetaSchema};let XudaComponentSchema=z.object(main_obj);switch(type){case`component`:XudaComponentSchema.describe(`The component object in the Xuda platform defines a modular, self-contained program unit that encapsulates both front-end presentation and back-end logic. It serves as a reusable UI component that supports a full execution lifecycle, making it ideal for constructing low-code applications that are maintainable, scalable, and highly interactive. A component is engineered to allow seamless integration of logic, data, and rendering, enabling developers to build sophisticated interactive views without redundant code. Each component instance supports input/output parameters, can communicate with other components or programs, and can be dynamically rendered as a page, modal, or embedded panel.`);properties_obj.frameworkProperties=z.object({}).optional().describe(`Framework-specific rendering extensions and configuration`);properties_obj.renderType=z.string().describe(`Component layout type (e.g., "form", "grid", "list")`);properties_obj.rwMode=z.union([z.literal(`R`),z.literal(`W`),z.literal(`RW`)]).describe(`Access mode: R=read-only, W=write-only, RW=read-write`);properties_obj.uiFramework=z.string().describe(`Selected UI framework plugin (e.g., @xuda.io/xuda-framework-plugin-tailwind)`);properties_obj.menuTitle=z.string().optional().describe(`Display title for Studio UI or routing usage`);properties_obj.progParams=z.array(ProgParamSchema).optional().describe(`Array of input/output parameter definitions for ${type} interface`);main_obj.properties=properties;main_obj.progDataSource=progDataSource;main_obj.progFields=progFields;main_obj.progEvents=progEvents;main_obj.progUi=progUi;break;default:break}const validateXudaComponent=data=>{try{return{success:true,data:XudaComponentSchema.parse(data),errors:null}}catch(error){return{success:false,data:null,errors:error.errors}}};const safeParse=(schema,data)=>{return schema.safeParse(data)};return XudaComponentSchema};
|
|
@@ -3698,7 +3698,13 @@ export const get_zod_schema = function (type) {
|
|
|
3698
3698
|
properties_obj.uiFramework = z.string().describe(`Selected UI framework plugin (e.g., @xuda.io/xuda-framework-plugin-tailwind)`);
|
|
3699
3699
|
properties_obj.menuTitle = z.string().optional().describe(`Display title for Studio UI or routing usage`);
|
|
3700
3700
|
properties_obj.progParams = z.array(ProgParamSchema).optional().describe(`Array of input/output parameter definitions for ${type} interface`);
|
|
3701
|
-
main_obj = { ...main_obj, ...properties, ...progFields, ...progEvents, ...progUi, ...progDataSource };
|
|
3701
|
+
// main_obj = { ...main_obj, ...properties, ...progFields, ...progEvents, ...progUi, ...progDataSource };
|
|
3702
|
+
main_obj.properties = properties;
|
|
3703
|
+
main_obj.progDataSource = progDataSource;
|
|
3704
|
+
main_obj.progFields = progFields;
|
|
3705
|
+
main_obj.progEvents = progEvents;
|
|
3706
|
+
main_obj.progUi = progUi;
|
|
3707
|
+
|
|
3702
3708
|
break;
|
|
3703
3709
|
|
|
3704
3710
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xuda.io/runtime-bundle",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1203",
|
|
4
4
|
"description": "The Xuda Runtime Bundle refers to a collection of scripts and libraries packaged together to provide the necessary runtime environment for executing plugins or components in the Xuda platform. ",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"pub": "npm version patch --force && npm publish --access public"
|