|
3053 | 3053 | }, |
3054 | 3054 | { |
3055 | 3055 | "name": "type", |
3056 | | - "type": "\"string\" | \"number\" | \"boolean\"", |
| 3056 | + "type": ["string", "number", "boolean"], |
3057 | 3057 | "doc": "The asserted type of the input array." |
3058 | 3058 | }, |
3059 | 3059 | { |
|
3295 | 3295 | "parameters": [ |
3296 | 3296 | { |
3297 | 3297 | "name": "input", |
3298 | | - "type": "string | number", |
| 3298 | + "type": ["string", "number"], |
3299 | 3299 | "doc": "Any expression." |
3300 | 3300 | }, |
3301 | 3301 | { |
3302 | 3302 | "name": "label_i", |
3303 | | - "type": "string literal | number literal | array<string literal> | array<number literal>", |
| 3303 | + "type": ["string literal", "number literal", "array<string literal>", "array<number literal>"], |
3304 | 3304 | "doc": "The i-th literal value or array of literal values to match the input against." |
3305 | 3305 | }, |
3306 | 3306 | { |
|
3399 | 3399 | "overloads": [ |
3400 | 3400 | { |
3401 | 3401 | "parameters": ["interpolation_type", "input", "stop_1_input", "stop_1_output", "...", "stop_n_input", "stop_n_output"], |
3402 | | - "output-type": "number | array<number> | color | array<color> | projection" |
| 3402 | + "output-type": ["number", "array<number>", "color", "array<color>", "projection"] |
3403 | 3403 | } |
3404 | 3404 | ], |
3405 | 3405 | "parameters": [ |
3406 | 3406 | { |
3407 | 3407 | "name": "interpolation_type", |
3408 | | - "type": "[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", |
| 3408 | + "type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"], |
3409 | 3409 | "doc": "The interpolation type." |
3410 | 3410 | }, |
3411 | 3411 | { |
|
3420 | 3420 | }, |
3421 | 3421 | { |
3422 | 3422 | "name": "stop_i_output", |
3423 | | - "type": "number | array<number> | color | array<color> | projection", |
| 3423 | + "type": ["number", "array<number>", "color", "array<color>", "projection"], |
3424 | 3424 | "doc": "The output value corresponding to the i-th stop." |
3425 | 3425 | } |
3426 | 3426 | ] |
|
3441 | 3441 | "overloads": [ |
3442 | 3442 | { |
3443 | 3443 | "parameters": ["interpolation_type", "input", "stop_1_input", "stop_1_output", "...", "stop_n_input", "stop_n_output"], |
3444 | | - "output-type": "color | array<color>" |
| 3444 | + "output-type": ["color", "array<color>"] |
3445 | 3445 | } |
3446 | 3446 | ], |
3447 | 3447 | "parameters": [ |
3448 | 3448 | { |
3449 | 3449 | "name": "interpolation_type", |
3450 | | - "type": "[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]" |
| 3450 | + "type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"] |
3451 | 3451 | }, |
3452 | 3452 | { |
3453 | 3453 | "name": "input", |
|
3459 | 3459 | }, |
3460 | 3460 | { |
3461 | 3461 | "name": "stop_i_output", |
3462 | | - "type": "color | array<color>" |
| 3462 | + "type": ["color", "array<color>"] |
3463 | 3463 | } |
3464 | 3464 | ] |
3465 | 3465 | }, |
|
3479 | 3479 | "overloads": [ |
3480 | 3480 | { |
3481 | 3481 | "parameters": ["interpolation_type", "input", "stop_1_input", "stop_1_output", "...", "stop_n_input", "stop_n_output"], |
3482 | | - "output-type": "color | array<color>" |
| 3482 | + "output-type": ["color", "array<color>"] |
3483 | 3483 | } |
3484 | 3484 | ], |
3485 | 3485 | "parameters": [ |
3486 | 3486 | { |
3487 | 3487 | "name": "interpolation_type", |
3488 | | - "type": "[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]" |
| 3488 | + "type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"] |
3489 | 3489 | }, |
3490 | 3490 | { |
3491 | 3491 | "name": "input", |
|
3497 | 3497 | }, |
3498 | 3498 | { |
3499 | 3499 | "name": "stop_i_output", |
3500 | | - "type": "color | array<color>" |
| 3500 | + "type": ["color", "array<color>"] |
3501 | 3501 | } |
3502 | 3502 | ] |
3503 | 3503 | }, |
|
3702 | 3702 | } |
3703 | 3703 | }, |
3704 | 3704 | "collator": { |
3705 | | - "doc": "Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.", |
| 3705 | + "doc": "Returns a `collator` for use in locale-dependent comparison operations. Use `resolved-locale` to test the results of locale fallback behavior.", |
3706 | 3706 | "syntax": { |
3707 | 3707 | "overloads": [ |
3708 | 3708 | { |
|
3713 | 3713 | "parameters": [ |
3714 | 3714 | { |
3715 | 3715 | "name": "options", |
3716 | | - "type": "{ \"case-sensitive\"?: boolean, \"diacritic-sensitive\"?: boolean, \"locale\"?: string }" |
| 3716 | + "type": { |
| 3717 | + "case-sensitive": { |
| 3718 | + "type": "boolean", |
| 3719 | + "default": false, |
| 3720 | + "example": true, |
| 3721 | + "doc": "If characters of different case-ness are considered different" |
| 3722 | + }, |
| 3723 | + "diacritic-sensitive": { |
| 3724 | + "type": "boolean", |
| 3725 | + "default": false, |
| 3726 | + "example": true, |
| 3727 | + "doc": "If characters with different diacritics are considered different" |
| 3728 | + }, |
| 3729 | + "locale": { |
| 3730 | + "type": "string", |
| 3731 | + "example": "en", |
| 3732 | + "doc": "IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale." |
| 3733 | + } |
| 3734 | + } |
3717 | 3735 | } |
3718 | 3736 | ] |
3719 | 3737 | }, |
|
3728 | 3746 | } |
3729 | 3747 | }, |
3730 | 3748 | "format": { |
3731 | | - "doc": "Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#image) expression. Strings may be followed by a style override object that supports the following properties:\n\n- `\"text-font\"`: Overrides the font stack specified by the root layout property.\n\n- `\"text-color\"`: Overrides the color specified by the root paint property.\n\n- `\"font-scale\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\n\n- `\"vertical-align\"`: Aligns vertically text section or image in relation to the row it belongs to. Possible values are: \n\t- `\"bottom\"` *default*: align the bottom of this section with the bottom of other sections.\n<img alt=\"Visual representation of bottom alignment\" src=\"https://github.com/user-attachments/assets/0474a2fd-a4b2-417c-9187-7a13a28695bc\"/>\n\t- `\"center\"`: align the center of this section with the center of other sections.\n<img alt=\"Visual representation of center alignment\" src=\"https://github.com/user-attachments/assets/92237455-be6d-4c5d-b8f6-8127effc1950\"/>\n\t- `\"top\"`: align the top of this section with the top of other sections.\n<img alt=\"Visual representation of top alignment\" src=\"https://github.com/user-attachments/assets/45dccb28-d977-4abb-a006-4ea9792b7c53\"/>\n\t- Refer to [the design proposal](https://github.com/maplibre/maplibre-style-spec/issues/832) for more details.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\n\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)", |
| 3749 | + "doc": "Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#image) expression. Strings may be followed by a style override object.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\n\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)", |
3732 | 3750 | "syntax": { |
3733 | 3751 | "overloads": [ |
3734 | 3752 | { |
|
3739 | 3757 | "parameters": [ |
3740 | 3758 | { |
3741 | 3759 | "name": "input_i", |
3742 | | - "type": "string | image" |
| 3760 | + "type": ["string", "image"] |
3743 | 3761 | }, |
3744 | 3762 | { |
3745 | 3763 | "name": "style_overrides_i", |
3746 | | - "type": "{ \"text-font\"?: string, \"text-color\"?: color, \"font-scale\"?: number, \"vertical-align\"?: \"bottom\" | \"center\" | \"top\" }" |
| 3764 | + "type": { |
| 3765 | + "text-font": { |
| 3766 | + "type": "string", |
| 3767 | + "doc": "Overrides the font stack specified by the root layout property.", |
| 3768 | + "example": "Arial Unicode MS Regular" |
| 3769 | + }, |
| 3770 | + "text-color": { |
| 3771 | + "type": "color", |
| 3772 | + "doc": "Overrides the color specified by the root paint property.", |
| 3773 | + "example": "#333" |
| 3774 | + }, |
| 3775 | + "font-scale": { |
| 3776 | + "type": "number", |
| 3777 | + "doc":"Applies a scaling factor on `text-size` as specified by the root layout property.", |
| 3778 | + "example": 1.2 |
| 3779 | + }, |
| 3780 | + "vertical-align": { |
| 3781 | + "type": "enum", |
| 3782 | + "doc": "Aligns a vertical text section or image in relation to the row it belongs to. Refer to [the design proposal](https://github.com/maplibre/maplibre-style-spec/issues/832) for more details.", |
| 3783 | + "default": "bottom", |
| 3784 | + "example": "bottom", |
| 3785 | + "values": { |
| 3786 | + "bottom": { |
| 3787 | + "doc": "align the bottom of this section with the bottom of other sections.\n" |
| 3788 | + }, |
| 3789 | + "center": { |
| 3790 | + "doc": "align the center of this section with the center of other sections.\n" |
| 3791 | + }, |
| 3792 | + "top": { |
| 3793 | + "doc": "align the top of this section with the top of other sections.\n" |
| 3794 | + } |
| 3795 | + } |
| 3796 | + } |
| 3797 | + } |
3747 | 3798 | } |
3748 | 3799 | ] |
3749 | 3800 | }, |
|
3836 | 3887 | } |
3837 | 3888 | }, |
3838 | 3889 | "number-format": { |
3839 | | - "doc": "Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)", |
| 3890 | + "doc": "Converts the input number into a string representation using the provided format_options.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)", |
3840 | 3891 | "syntax": { |
3841 | 3892 | "overloads": [ |
3842 | 3893 | { |
|
3847 | 3898 | "parameters": [ |
3848 | 3899 | { |
3849 | 3900 | "name": "input", |
3850 | | - "type": "number" |
| 3901 | + "type": "number", |
| 3902 | + "doc": "number to format" |
3851 | 3903 | }, |
3852 | 3904 | { |
3853 | 3905 | "name": "format_options", |
3854 | | - "type": "{ \"locale\"?: string, \"currency\"?: string, \"min-fraction-digits\"?: number, \"max-fraction-digits\"?: number }" |
| 3906 | + "type": { |
| 3907 | + "locale": { |
| 3908 | + "type": "string", |
| 3909 | + "example": "en", |
| 3910 | + "doc": "Specifies the locale to use, as a BCP 47 language tag" |
| 3911 | + }, |
| 3912 | + "currency": { |
| 3913 | + "type": "string", |
| 3914 | + "example": "USD", |
| 3915 | + "doc": "An ISO 4217 code to use for currency-style formatting" |
| 3916 | + }, |
| 3917 | + "min-fraction-digits": { |
| 3918 | + "type": "number", |
| 3919 | + "example": 1, |
| 3920 | + "doc": "Minimum number of fractional digits to include" |
| 3921 | + }, |
| 3922 | + "max-fraction-digits": { |
| 3923 | + "type": "number", |
| 3924 | + "example": 2, |
| 3925 | + "doc": "Maximum number of fractional digits to include" |
| 3926 | + } |
| 3927 | + }, |
| 3928 | + "doc": "Format options for the number" |
3855 | 3929 | } |
3856 | 3930 | ] |
3857 | 3931 | }, |
|
4143 | 4217 | "parameters": [ |
4144 | 4218 | { |
4145 | 4219 | "name": "array_or_string", |
4146 | | - "type": "array | string" |
| 4220 | + "type": ["array", "string"] |
4147 | 4221 | } |
4148 | 4222 | ] |
4149 | 4223 | }, |
|
0 commit comments