-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d9c7ae
commit b284a31
Showing
8 changed files
with
158 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/** | ||
* DO NOT EDIT! | ||
* This file was automatically generated via bin/generate-validator-spec.php. | ||
*/ | ||
|
||
namespace AmpProject\Validator\Spec\Tag; | ||
|
||
use AmpProject\Attribute; | ||
use AmpProject\Extension; | ||
use AmpProject\Format; | ||
use AmpProject\Protocol; | ||
use AmpProject\Validator\Spec\Section\DescendantTagList; | ||
use AmpProject\Validator\Spec\SpecRule; | ||
use AmpProject\Validator\Spec\Tag; | ||
|
||
final class AmpStorySocialShare extends Tag | ||
{ | ||
const SPEC = [ | ||
SpecRule::TAG_NAME => Extension::STORY_SOCIAL_SHARE, | ||
SpecRule::ATTRS => [ | ||
[ | ||
SpecRule::NAME => Attribute::LAYOUT, | ||
SpecRule::MANDATORY => true, | ||
SpecRule::VALUE => [ | ||
'nodisplay', | ||
], | ||
], | ||
[ | ||
SpecRule::NAME => Attribute::SRC, | ||
SpecRule::VALUE_URL => [ | ||
SpecRule::PROTOCOL => [ | ||
Protocol::HTTP, | ||
Protocol::HTTPS, | ||
], | ||
], | ||
], | ||
], | ||
SpecRule::MANDATORY_ANCESTOR => Extension::STORY, | ||
SpecRule::HTML_FORMAT => [ | ||
Format::AMP, | ||
], | ||
SpecRule::DESCENDANT_TAG_LIST => DescendantTagList::AMP_STORY_SOCIAL_SHARE_ALLOWED_DESCENDANTS, | ||
SpecRule::MANDATORY_LAST_CHILD => true, | ||
]; | ||
} |
46 changes: 46 additions & 0 deletions
46
src/Validator/Spec/Tag/AmpStorySocialShareExtensionJsonScript.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
/** | ||
* DO NOT EDIT! | ||
* This file was automatically generated via bin/generate-validator-spec.php. | ||
*/ | ||
|
||
namespace AmpProject\Validator\Spec\Tag; | ||
|
||
use AmpProject\Attribute; | ||
use AmpProject\Extension; | ||
use AmpProject\Format; | ||
use AmpProject\Tag as Element; | ||
use AmpProject\Validator\Spec\SpecRule; | ||
use AmpProject\Validator\Spec\Tag; | ||
|
||
final class AmpStorySocialShareExtensionJsonScript extends Tag | ||
{ | ||
const SPEC = [ | ||
SpecRule::TAG_NAME => Element::SCRIPT, | ||
SpecRule::SPEC_NAME => 'amp-story-social-share extension .json script', | ||
SpecRule::UNIQUE => true, | ||
SpecRule::MANDATORY_PARENT => Extension::STORY_SOCIAL_SHARE, | ||
SpecRule::ATTRS => [ | ||
[ | ||
SpecRule::NAME => Attribute::TYPE, | ||
SpecRule::MANDATORY => true, | ||
SpecRule::DISPATCH_KEY => 'NAME_VALUE_PARENT_DISPATCH', | ||
SpecRule::VALUE_CASEI => [ | ||
'application/json', | ||
], | ||
], | ||
], | ||
SpecRule::ATTR_LISTS => [ | ||
'nonce-attr', | ||
], | ||
SpecRule::HTML_FORMAT => [ | ||
Format::AMP, | ||
], | ||
SpecRule::REQUIRES_EXTENSION => [ | ||
Extension::STORY, | ||
], | ||
SpecRule::SIBLINGS_DISALLOWED => true, | ||
SpecRule::MANDATORY_LAST_CHILD => true, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/** | ||
* DO NOT EDIT! | ||
* This file was automatically generated via bin/generate-validator-spec.php. | ||
*/ | ||
|
||
namespace AmpProject\Validator\Spec\Tag; | ||
|
||
use AmpProject\Attribute; | ||
use AmpProject\Format; | ||
use AmpProject\Tag as Element; | ||
use AmpProject\Validator\Spec\SpecRule; | ||
use AmpProject\Validator\Spec\Tag; | ||
|
||
final class LinkRelModulepreload extends Tag | ||
{ | ||
const SPEC = [ | ||
SpecRule::TAG_NAME => Element::LINK, | ||
SpecRule::SPEC_NAME => 'link rel=modulepreload', | ||
SpecRule::MANDATORY_PARENT => Element::HEAD, | ||
SpecRule::ATTRS => [ | ||
[ | ||
SpecRule::NAME => Attribute::AS_, | ||
SpecRule::MANDATORY => true, | ||
SpecRule::VALUE => [ | ||
'script', | ||
], | ||
], | ||
[ | ||
SpecRule::NAME => Attribute::CROSSORIGIN, | ||
SpecRule::MANDATORY => true, | ||
SpecRule::VALUE => [ | ||
'anonymous', | ||
], | ||
], | ||
[ | ||
SpecRule::NAME => Attribute::HREF, | ||
SpecRule::MANDATORY => true, | ||
SpecRule::VALUE_REGEX => '.*\.mjs$', | ||
], | ||
[ | ||
SpecRule::NAME => Attribute::REL, | ||
SpecRule::MANDATORY => true, | ||
SpecRule::DISPATCH_KEY => 'NAME_VALUE_DISPATCH', | ||
SpecRule::VALUE_CASEI => [ | ||
'modulepreload', | ||
], | ||
], | ||
], | ||
SpecRule::SPEC_URL => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#html-tags', | ||
SpecRule::HTML_FORMAT => [ | ||
Format::AMP, | ||
], | ||
SpecRule::DESCRIPTIVE_NAME => 'link rel=modulepreload', | ||
]; | ||
} |