i-slint-compiler 1.18.0

Internal Slint Compiler Library
Documentation
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0


export SubElements := Rectangle {
//                 ><warning{':=' to declare a component is deprecated. The new syntax declare components with 'component MyComponent {'. Read the documentation for more info}

    background: blue;

    Image {
        source: @image-url("foo.png");
    }

    Image {
        source: @image-url("builtin:/common/does-not-exist.svg");
//              >                                              <error{Cannot find image file builtin:/common/does-not-exist.svg}
    }

    Image {
        source: @image-url("data:text/plain;base64,SGVsbG8=");
//              >                                           <error{Unsupported media type: text/plain. Only image/* data URLs are supported}
    }

    Image {
        source: @image-url("data:not-valid");
//              >                          <error{Invalid data URI: data url is missing comma delimiting attributes and body}
    }

    Image {
        source: @image-url("data:image/png;base64,!!!invalid-base64!!!");
//              >                                                      <error{Invalid data URI payload: symbol with codepoint 33 not expected}
    }

    Rectangle {
        background: red;
    }


}