UNPKG

neos-script

Version:

[neos-script-sample](https://github.com/rheniumNV/neos-script-sample)

23 lines (22 loc) 16.5 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextRenderer = void 0; var jsx_runtime_1 = require("neos-script/jsx-runtime"); var core_1 = require("../../core"); function TextRenderer(props) { var id = props.id, persistentId = props.persistentId, updateOrder = props.updateOrder, Enabled = props.Enabled, HighPriorityIntegration = props.HighPriorityIntegration, OverrideBoundingBox = props.OverrideBoundingBox, OverridenBoundingBox = props.OverridenBoundingBox, Font = props.Font, Text = props.Text, ParseRichText = props.ParseRichText, NullText = props.NullText, Size = props.Size, HorizontalAlign = props.HorizontalAlign, VerticalAlign = props.VerticalAlign, AlignmentMode = props.AlignmentMode, Color = props.Color, Materials = props.Materials, LineHeight = props.LineHeight, Bounded = props.Bounded, BoundsSize = props.BoundsSize, BoundsAlignment = props.BoundsAlignment, MaskPattern = props.MaskPattern, HorizontalAutoSize = props.HorizontalAutoSize, VerticalAutoSize = props.VerticalAutoSize, CaretPosition = props.CaretPosition, SelectionStart = props.SelectionStart, CaretColor = props.CaretColor, SelectionColor = props.SelectionColor, _legacyFontMaterial = props._legacyFontMaterial, _legacyAlign = props._legacyAlign; return ((0, jsx_runtime_1.jsxs)(core_1.Component, __assign({ type: "FrooxEngine.TextRenderer", id: id, persistentId: persistentId, updateOrder: updateOrder, version: 5 }, { children: [(0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "Enabled", id: typeof Enabled === "object" && "id" in Enabled ? Enabled === null || Enabled === void 0 ? void 0 : Enabled.id : undefined, value: typeof Enabled === "object" && "value" in Enabled ? Enabled === null || Enabled === void 0 ? void 0 : Enabled.value : Enabled !== null && Enabled !== void 0 ? Enabled : true, isRaw: typeof Enabled === "object" && "isRaw" in Enabled && Enabled.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "HighPriorityIntegration", id: typeof HighPriorityIntegration === "object" && "id" in HighPriorityIntegration ? HighPriorityIntegration === null || HighPriorityIntegration === void 0 ? void 0 : HighPriorityIntegration.id : undefined, value: typeof HighPriorityIntegration === "object" && "value" in HighPriorityIntegration ? HighPriorityIntegration === null || HighPriorityIntegration === void 0 ? void 0 : HighPriorityIntegration.value : HighPriorityIntegration, isRaw: typeof HighPriorityIntegration === "object" && "isRaw" in HighPriorityIntegration && HighPriorityIntegration.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "OverrideBoundingBox", id: typeof OverrideBoundingBox === "object" && "id" in OverrideBoundingBox ? OverrideBoundingBox === null || OverrideBoundingBox === void 0 ? void 0 : OverrideBoundingBox.id : undefined, value: typeof OverrideBoundingBox === "object" && "value" in OverrideBoundingBox ? OverrideBoundingBox === null || OverrideBoundingBox === void 0 ? void 0 : OverrideBoundingBox.value : OverrideBoundingBox, isRaw: typeof OverrideBoundingBox === "object" && "isRaw" in OverrideBoundingBox && OverrideBoundingBox.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.BoundingBox]", name: "OverridenBoundingBox", id: typeof OverridenBoundingBox === "object" && "id" in OverridenBoundingBox ? OverridenBoundingBox === null || OverridenBoundingBox === void 0 ? void 0 : OverridenBoundingBox.id : undefined, value: typeof OverridenBoundingBox === "object" && "value" in OverridenBoundingBox ? OverridenBoundingBox === null || OverridenBoundingBox === void 0 ? void 0 : OverridenBoundingBox.value : OverridenBoundingBox, isRaw: typeof OverridenBoundingBox === "object" && "isRaw" in OverridenBoundingBox && OverridenBoundingBox.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.AssetRef`1[FrooxEngine.FontSet]", name: "Font", id: typeof Font === "object" && "id" in Font ? Font === null || Font === void 0 ? void 0 : Font.id : undefined, value: typeof Font === "object" && "value" in Font ? Font === null || Font === void 0 ? void 0 : Font.value : Font, isRaw: typeof Font === "object" && "isRaw" in Font && Font.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.String]", name: "Text", id: typeof Text === "object" && "id" in Text ? Text === null || Text === void 0 ? void 0 : Text.id : undefined, value: typeof Text === "object" && "value" in Text ? Text === null || Text === void 0 ? void 0 : Text.value : Text, isRaw: typeof Text === "object" && "isRaw" in Text && Text.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "ParseRichText", id: typeof ParseRichText === "object" && "id" in ParseRichText ? ParseRichText === null || ParseRichText === void 0 ? void 0 : ParseRichText.id : undefined, value: typeof ParseRichText === "object" && "value" in ParseRichText ? ParseRichText === null || ParseRichText === void 0 ? void 0 : ParseRichText.value : ParseRichText, isRaw: typeof ParseRichText === "object" && "isRaw" in ParseRichText && ParseRichText.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.String]", name: "NullText", id: typeof NullText === "object" && "id" in NullText ? NullText === null || NullText === void 0 ? void 0 : NullText.id : undefined, value: typeof NullText === "object" && "value" in NullText ? NullText === null || NullText === void 0 ? void 0 : NullText.value : NullText, isRaw: typeof NullText === "object" && "isRaw" in NullText && NullText.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "Size", id: typeof Size === "object" && "id" in Size ? Size === null || Size === void 0 ? void 0 : Size.id : undefined, value: typeof Size === "object" && "value" in Size ? Size === null || Size === void 0 ? void 0 : Size.value : Size, isRaw: typeof Size === "object" && "isRaw" in Size && Size.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[CodeX.TextHorizontalAlignment]", name: "HorizontalAlign", id: typeof HorizontalAlign === "object" && "id" in HorizontalAlign ? HorizontalAlign === null || HorizontalAlign === void 0 ? void 0 : HorizontalAlign.id : undefined, value: typeof HorizontalAlign === "object" && "value" in HorizontalAlign ? HorizontalAlign === null || HorizontalAlign === void 0 ? void 0 : HorizontalAlign.value : HorizontalAlign, isRaw: typeof HorizontalAlign === "object" && "isRaw" in HorizontalAlign && HorizontalAlign.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[CodeX.TextVerticalAlignment]", name: "VerticalAlign", id: typeof VerticalAlign === "object" && "id" in VerticalAlign ? VerticalAlign === null || VerticalAlign === void 0 ? void 0 : VerticalAlign.id : undefined, value: typeof VerticalAlign === "object" && "value" in VerticalAlign ? VerticalAlign === null || VerticalAlign === void 0 ? void 0 : VerticalAlign.value : VerticalAlign, isRaw: typeof VerticalAlign === "object" && "isRaw" in VerticalAlign && VerticalAlign.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[CodeX.AlignmentMode]", name: "AlignmentMode", id: typeof AlignmentMode === "object" && "id" in AlignmentMode ? AlignmentMode === null || AlignmentMode === void 0 ? void 0 : AlignmentMode.id : undefined, value: typeof AlignmentMode === "object" && "value" in AlignmentMode ? AlignmentMode === null || AlignmentMode === void 0 ? void 0 : AlignmentMode.value : AlignmentMode, isRaw: typeof AlignmentMode === "object" && "isRaw" in AlignmentMode && AlignmentMode.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "Color", id: typeof Color === "object" && "id" in Color ? Color === null || Color === void 0 ? void 0 : Color.id : undefined, value: typeof Color === "object" && "value" in Color ? Color === null || Color === void 0 ? void 0 : Color.value : Color, isRaw: typeof Color === "object" && "isRaw" in Color && Color.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncAssetList`1[FrooxEngine.Material]", name: "Materials", id: typeof Materials === "object" && "id" in Materials ? Materials === null || Materials === void 0 ? void 0 : Materials.id : undefined, value: typeof Materials === "object" && "value" in Materials ? Materials === null || Materials === void 0 ? void 0 : Materials.value : Materials, isRaw: typeof Materials === "object" && "isRaw" in Materials && Materials.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "LineHeight", id: typeof LineHeight === "object" && "id" in LineHeight ? LineHeight === null || LineHeight === void 0 ? void 0 : LineHeight.id : undefined, value: typeof LineHeight === "object" && "value" in LineHeight ? LineHeight === null || LineHeight === void 0 ? void 0 : LineHeight.value : LineHeight, isRaw: typeof LineHeight === "object" && "isRaw" in LineHeight && LineHeight.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "Bounded", id: typeof Bounded === "object" && "id" in Bounded ? Bounded === null || Bounded === void 0 ? void 0 : Bounded.id : undefined, value: typeof Bounded === "object" && "value" in Bounded ? Bounded === null || Bounded === void 0 ? void 0 : Bounded.value : Bounded, isRaw: typeof Bounded === "object" && "isRaw" in Bounded && Bounded.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.float2]", name: "BoundsSize", id: typeof BoundsSize === "object" && "id" in BoundsSize ? BoundsSize === null || BoundsSize === void 0 ? void 0 : BoundsSize.id : undefined, value: typeof BoundsSize === "object" && "value" in BoundsSize ? BoundsSize === null || BoundsSize === void 0 ? void 0 : BoundsSize.value : BoundsSize, isRaw: typeof BoundsSize === "object" && "isRaw" in BoundsSize && BoundsSize.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.Alignment]", name: "BoundsAlignment", id: typeof BoundsAlignment === "object" && "id" in BoundsAlignment ? BoundsAlignment === null || BoundsAlignment === void 0 ? void 0 : BoundsAlignment.id : undefined, value: typeof BoundsAlignment === "object" && "value" in BoundsAlignment ? BoundsAlignment === null || BoundsAlignment === void 0 ? void 0 : BoundsAlignment.value : BoundsAlignment, isRaw: typeof BoundsAlignment === "object" && "isRaw" in BoundsAlignment && BoundsAlignment.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.String]", name: "MaskPattern", id: typeof MaskPattern === "object" && "id" in MaskPattern ? MaskPattern === null || MaskPattern === void 0 ? void 0 : MaskPattern.id : undefined, value: typeof MaskPattern === "object" && "value" in MaskPattern ? MaskPattern === null || MaskPattern === void 0 ? void 0 : MaskPattern.value : MaskPattern, isRaw: typeof MaskPattern === "object" && "isRaw" in MaskPattern && MaskPattern.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "HorizontalAutoSize", id: typeof HorizontalAutoSize === "object" && "id" in HorizontalAutoSize ? HorizontalAutoSize === null || HorizontalAutoSize === void 0 ? void 0 : HorizontalAutoSize.id : undefined, value: typeof HorizontalAutoSize === "object" && "value" in HorizontalAutoSize ? HorizontalAutoSize === null || HorizontalAutoSize === void 0 ? void 0 : HorizontalAutoSize.value : HorizontalAutoSize, isRaw: typeof HorizontalAutoSize === "object" && "isRaw" in HorizontalAutoSize && HorizontalAutoSize.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "VerticalAutoSize", id: typeof VerticalAutoSize === "object" && "id" in VerticalAutoSize ? VerticalAutoSize === null || VerticalAutoSize === void 0 ? void 0 : VerticalAutoSize.id : undefined, value: typeof VerticalAutoSize === "object" && "value" in VerticalAutoSize ? VerticalAutoSize === null || VerticalAutoSize === void 0 ? void 0 : VerticalAutoSize.value : VerticalAutoSize, isRaw: typeof VerticalAutoSize === "object" && "isRaw" in VerticalAutoSize && VerticalAutoSize.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Int32]", name: "CaretPosition", id: typeof CaretPosition === "object" && "id" in CaretPosition ? CaretPosition === null || CaretPosition === void 0 ? void 0 : CaretPosition.id : undefined, value: typeof CaretPosition === "object" && "value" in CaretPosition ? CaretPosition === null || CaretPosition === void 0 ? void 0 : CaretPosition.value : CaretPosition, isRaw: typeof CaretPosition === "object" && "isRaw" in CaretPosition && CaretPosition.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Int32]", name: "SelectionStart", id: typeof SelectionStart === "object" && "id" in SelectionStart ? SelectionStart === null || SelectionStart === void 0 ? void 0 : SelectionStart.id : undefined, value: typeof SelectionStart === "object" && "value" in SelectionStart ? SelectionStart === null || SelectionStart === void 0 ? void 0 : SelectionStart.value : SelectionStart, isRaw: typeof SelectionStart === "object" && "isRaw" in SelectionStart && SelectionStart.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "CaretColor", id: typeof CaretColor === "object" && "id" in CaretColor ? CaretColor === null || CaretColor === void 0 ? void 0 : CaretColor.id : undefined, value: typeof CaretColor === "object" && "value" in CaretColor ? CaretColor === null || CaretColor === void 0 ? void 0 : CaretColor.value : CaretColor, isRaw: typeof CaretColor === "object" && "isRaw" in CaretColor && CaretColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "SelectionColor", id: typeof SelectionColor === "object" && "id" in SelectionColor ? SelectionColor === null || SelectionColor === void 0 ? void 0 : SelectionColor.id : undefined, value: typeof SelectionColor === "object" && "value" in SelectionColor ? SelectionColor === null || SelectionColor === void 0 ? void 0 : SelectionColor.value : SelectionColor, isRaw: typeof SelectionColor === "object" && "isRaw" in SelectionColor && SelectionColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncRef`1[FrooxEngine.FontMaterial]", name: "_legacyFontMaterial-ID", id: typeof _legacyFontMaterial === "object" && "id" in _legacyFontMaterial ? _legacyFontMaterial === null || _legacyFontMaterial === void 0 ? void 0 : _legacyFontMaterial.id : undefined, value: typeof _legacyFontMaterial === "object" && "value" in _legacyFontMaterial ? _legacyFontMaterial === null || _legacyFontMaterial === void 0 ? void 0 : _legacyFontMaterial.value : _legacyFontMaterial, readOnly: true, isRaw: typeof _legacyFontMaterial === "object" && "isRaw" in _legacyFontMaterial && _legacyFontMaterial.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.Alignment]", name: "_legacyAlign-ID", id: typeof _legacyAlign === "object" && "id" in _legacyAlign ? _legacyAlign === null || _legacyAlign === void 0 ? void 0 : _legacyAlign.id : undefined, value: typeof _legacyAlign === "object" && "value" in _legacyAlign ? _legacyAlign === null || _legacyAlign === void 0 ? void 0 : _legacyAlign.value : _legacyAlign, readOnly: true, isRaw: typeof _legacyAlign === "object" && "isRaw" in _legacyAlign && _legacyAlign.isRaw ? true : undefined })] }))); } exports.TextRenderer = TextRenderer; ;