guardia-messenger/node_modules/react-native/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h
DESKTOP-TKLFCPRython f29f525c77 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

69 lines
2.0 KiB
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/renderer/attributedstring/AttributedString.h>
#include <react/renderer/attributedstring/TextAttributes.h>
namespace facebook::react {
/*
* Base class (one of) for shadow nodes that represents attributed text,
* such as Text and Paragraph (but not RawText).
*/
class BaseTextShadowNode {
public:
/*
* Represents additional information associated with some fragments which
* represent embedded into text component (such as an image or inline view).
*/
class Attachment final {
public:
/*
* Unowning pointer to a `ShadowNode` that represents the attachment.
* Cannot be `null`.
*/
const ShadowNode* shadowNode;
/*
* Index of the fragment in `AttributedString` that represents the
* the attachment.
*/
size_t fragmentIndex;
};
/*
* A list of `Attachment`s.
* Performance-wise, the prevailing case is when there are no attachments
* at all, therefore we don't need an inline buffer (`small_vector`).
*/
using Attachments = std::vector<Attachment>;
/*
* Builds an `AttributedString` which represents text content of the node.
* This is static so that both Paragraph (which subclasses BaseText) and
* TextInput (which does not) can use this.
* TODO T53299884: decide if this should be moved out and made a static
* function, or if TextInput should inherit from BaseTextShadowNode.
*/
static void buildAttributedString(
const TextAttributes& baseTextAttributes,
const ShadowNode& parentNode,
AttributedString& outAttributedString,
Attachments& outAttachments);
/**
* Returns a character used to measure empty strings in native platforms.
*/
inline static std::string getEmptyPlaceholder() {
return "I";
}
};
} // namespace facebook::react